Page 1 of 1

Pooface with bombs!

Posted: May 5th, 2012, 9:58 pm
by uglypie
I made my first attempt at using the framework today, and decided to add some functionality to the pooface game.

New stuff:
1. You can leave blinking bombs behind you to get rid of poos (press space)
2. There are yellow lines along the edges of the screen that indicate where the goal is
3. There are dots being drawn that indicate how many goals you've eaten, how many bombs are left, and how many poos are left
4. You can now press enter at game over to start a new game
5. You can actually win the game if you survive enough rounds. It's harder this time around though, because the amount of poo increases exponentially.

So as you can see, nothing major, just playing around. But maybe some of you will get a kick out of it anyway :D

Re: Pooface with bombs!

Posted: May 6th, 2012, 1:54 am
by 4TN
The yellow lines are a nice touch as with the indicators.

Code On!

Re: Pooface with bombs!

Posted: May 6th, 2012, 10:16 am
by chili
Nice mod bro! I took a look at your code, and your style is pretty good too. I could give you various pieces of feedback, but I'll just give you one: you should consider using the SCREENWIDTH etc. constants instead of magic numbers.

Did you write the .bmp loading code yourself from scratch?

Re: Pooface with bombs!

Posted: May 6th, 2012, 12:32 pm
by ghilllie
simple modification yet decent!

Re: Pooface with bombs!

Posted: May 6th, 2012, 4:09 pm
by uglypie
Thanks guys :)

It was a pretty simple modification, but still fun to write. I wrote the bmp code myself, but I just noticed a bug in it, so don't expect it to work for all image sizes. I also didn't do any other failure checks, so it will probably fail on some bmp formats.

Using the SCREENWIDTH constants and such is a good tip. The whole program was more of a test of the framework than anything else, so I didn't bother with making things proper. I'll do that in my next project.

Right now I'm working on a Sokoban game. I'm trying to use the model / view perspective, so it's gonna be a bit more readable. I'll post it on the forum as soon as I'm done.

Looking forward to the next tutorial chili! :)

Re: Pooface with bombs!

Posted: May 6th, 2012, 4:26 pm
by LuX
Cool. I've been trying to load images to the framework from a resource, with no success.
If I knew c++ better, I probably could implement my image scanner script to c++, it's a bit similar to yours, only in VB...

Re: Pooface with bombs!

Posted: May 6th, 2012, 4:32 pm
by chili
uglypie: Yeah, like I said your code looks pretty clean and tight. I get that about not using the constants, I have the same habit, especially for little test projects. ;) You have some prior experience in programming I gather? Anyways, the new tutorial is already up. Try the homework bro!

LuX: Loading images in C++ is coming up very soon bro. Either Lesson 19 or Lesson 20.

Re: Pooface with bombs!

Posted: May 7th, 2012, 10:17 am
by uglypie
chili wrote:uglypie: Yeah, like I said your code looks pretty clean and tight. I get that about not using the constants, I have the same habit, especially for little test projects. ;) You have some prior experience in programming I gather? Anyways, the new tutorial is already up. Try the homework bro!
I've been programming for a while, so I'm fairly good with the syntax of C++. I've mostly been programming small algorithmic applications. I'm not experienced with bigger projects though, especially games. That's why I follow the tutorials. I haven't had the time to watch the new tutorial yet because I've been working on the Sokoban game, but when I do, I'll try the home work for sure :)

I made a new topic for the Sokoban game. Check it out ;)