#Simple SDL2 survival shooter in C

7 messages · Page 1 of 1 (latest)

stray matrix
#

made a simple survival shooter in c late night coding from scratch, little to no help. would like feedback

sullen oar
#

@stray matrix How many times did you ask AI for help this time my friend? 😄

stray matrix
stray matrix
sullen oar
fair summit
#

Genuinely great, looks good. I didn't do a full In-depth scan, but with a quick overview my main gripes are the magic numbers throughout. For example, stuff like player and bullet speed, screen dimensions, collision for player and bullet, and the SDL delay to name a few, it's fine since it's a small, personal project, but you'd typically name those constants just so it's not confusing, not just for the reviewers, but also for future refactors. Overall, It's a good thing to keep in mind when doing any project. Another thing I noticed is the spawn particles function, there was a redundant "count" variable. All it did was count up each iteration and broke the for loop when the variable reached 10 or above. Again I didn't look fully, but doesn't the i variable already do that? Still, nice project. For someone a month in, it's pretty cool work.