Sokoban

The Partridge Family were neither partridges nor a family. Discuss.
uglypie
Posts: 21
Joined: May 5th, 2012, 5:05 pm

Re: Sokoban

Post by uglypie » May 11th, 2012, 8:44 pm

I'm glad you liked it keramsege :) You can of course use the sprite class in your code, but as you already noticed, it's quite primitive. A bmp file contains the width and height within it, so it should be fairly simple to avoid having to specify the width and height manually. However, if I remember correctly, the next tutorial was supposed to handle sprites and bmp files, so if I were you I'd rather wait for that.

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Sokoban

Post by chili » May 12th, 2012, 1:34 am

Nah, sprites and bmp files is 2 tutorials away from now, so you might as well play with uglypie's sprite class. You could probably just cut and paste it into your own project, just make sure you copy the #includes as well.
Chili

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Sokoban

Post by chili » May 12th, 2012, 1:43 am

uglypie wrote:Thanks chili and LuX :)I want to move on to a more challenging game, perhaps with some animations and stuff, but I haven't come up with any ideas yet. Perhaps it would be a good idea to watch some more tutorials first :)
Uglypie, I don't think there will be much in the tutorials for you to learn for a little while at least. I'm makeing one more tutorial about strings/console input, then a lesson on fileio, then loading bitmaps and displaying them (sprites), then text output, and then dynamic memory allocation (that's a lot of thens). I guess if you aren't familiar with stdio then it would be worth your while to watch them once to check it out, but I doubt there will be anything too difficult for you. ;)

Once we are able to load sprites and allocate heap memory, I plan on doing one more game. I also want to do it with animated sprites. After the game is done, we'll more on to the intermediate stuff (basic classes/objects and all that good OOP crap). Just a little taste of classes is all we need before I can finally go over the framework and explain how it all works. Then maybe people will stop pestering me about that. ;)
Chili

Post Reply