Yeah, that's true. I do something similar so I don't have to load duplicate sprites.
All sprites are loaded into the same place, and dupes are ignored. At draw time a sprite can be requested by using its filename.
Maybe if you're doing a comp sci course.
But that stuff puts off begginer hobbyists. You really just have to get in there and make something. Otherwise you're going to spend hours making this beautifully coded program that displays a .BMP file and say, hey fuck this I'm going to go jack off to...
I don't ever recast those pointers. I split my entities into tiers.
Object -> Actor -> Digger
All objects need to be drawn. So I list the objects in a vector and draw them.
All actors need to think. So I list the actors in a vector and update them individually.
All diggers need to be told to...
Math is a bitch. I started coding in my early teens (read: 11) and it was the biggest wall for me. Once I finished highschool that stopped being the bottleneck. Pay attention in maths class guys, it's the only one that matters.
I like this thread. It's like coders anonymous: Hi guys, my name...
I used to have a great way of doing this. I'd have a class with a std::vector of SDL_Surfaces, some integers and two functions.
I'd then have a text file, first line would be the total number of frames, then the time between each frame in ms then in each following line I would list the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.