So basically I don’t usually ask people for critiques because my head is generally pretty comfortable up my ownass, but the time has come for me to admit that if I am going to learn to create games in C like a real developer than I need to ask the real developers (YOU ALL) for help. I am relatively new to C, but have a strong background in programming other langues JAVA/C#/etc. Basically, I want to know what standard game dev practices im doing wrong, and how I can use an better OOP type structure in C making my game. If any of you ever wanted to tear a new A-hole into somebody who is probably doing things the wrong way then look no further and gimme some feedback! I hope you all are enjoying the experience as much as I am.
I added an enemy that just goes down the Y axis, still have to work that out.
I like it, this is a good start. You’ve got a player space, a player entity and some movement code. Good stuff.
Looking at the code, the first thing I notice is that the handling of player input is dealt with in the loop() function.
You may consider moving this code to a separate function. Or even better, look into making a class, or an abstract object, maybe name it Entity, that has all of the movement functions as its member functions. Then the enemies and player entities can both inherit from this base class, and save you some work.
Thank you so much for your input! I will certainly look into this and the link you posted for me as soon as I finish work for the day. Once I am finished I will push my changes with your advice, thank you again it really means a lot that you would take the time help me better myself! Cheers’