Pandora Pandora Panic


foxblock said:
Well, thanks for all your help, but I've got a problem:
Whenever I try to load an image sequence the game crashes... Do the image's dimensions have to be base 4 or 8?
here is the image I am trying to load: http://foxblock.goog.../enemypunch.png
And this is the code:
Code:
AnimatedSprite enemy;
  //----------------
  void StateSnatchABeer::render(SDL_Surface *screen) {
  //...
  enemy.loadFrames("images/SnatchABeer/enemypunch.png",4,1);
  enemy.setTransparentColour(MAGENTA);
  enemy.setCurrentFrame(0);
  enemy.setLooping(false);
  //...
  enemy.render(screen)
  }

Many thanks for the music Gruso, I really like it and will definitely include it (in fact, I already did ;) ). Great Work!

foxblock out
Check the case of the path filename and file extension. I think your image is not actually loading and then you proceed to render an unloaded animation.

I thought I'd made things a bit more clean when things go wrong, but apparently not! :p

General Update
I'm home and I've been looking through my OpenGL ES2 programmer's guide and I'm feeling reasonably confident I can add support for it... just have to get the emulator setup in Ubuntu and I'm away. I'm still getting GFX issues with the GL support... it's mainly blending issues and texture conversion errors... I'm working on it!
 
Last edited by a moderator:
foxblock said:
Many thanks for the music Gruso, I really like it and will definitely include it (in fact, I already did ;) ). Great Work!

foxblock out
Glad you like it. :)

One of these days I'll step up to writing my own stuff. I'm almost there...
 
Last edited by a moderator:
PokeParadox said:
Check the case of the path filename and file extension. I think your image is not actually loading and then you proceed to render an unloaded animation.

I thought I'd made things a bit more clean when things go wrong, but apparently not! :p

Nope the path was correct, the thing I forgot was calling
Code:
enemy.clearFrames();
before I load a new animation and
Code:
enemy.update();
to, well...update the animation (I thought it would do that by itself, but it didn't aparently ;)

So I've got everything working right now, just need to draw some additional graphics and then it's done!
I might upload it today, but don't bet on it ;)

foxblock out

EDIT: No release today, I basically finished the game and (hopefully) eliminated all bugs, but I still want to add some sounds, which I'm going to do tomorrow, so hold your breath until then ;)
 
Last edited by a moderator:
foxblock said:
Nope the path was correct, the thing I forgot was calling
Code:
enemy.clearFrames();
before I load a new animation and
Code:
enemy.update();
to, well...update the animation (I thought it would do that by itself, but it didn't aparently ;)

So I've got everything working right now, just need to draw some additional graphics and then it's done!
I might upload it today, but don't bet on it ;)

foxblock out
OK for tilesheets it now automatically clears the frames when loading a new animation sheet. If you load frame by frame, you have to manually clear out the frames still.

The update() has to be called manually from the update section of code... this just lets you do weird things if you want to. I could just get it to call update before render automatically, but then those weird things would be difficult to do.

Anyway glad you have it sorted now!
 
Last edited by a moderator:
It is done!

Grab it here: http://rapidshare.co...hABeer.rar.html OR http://brainmash.pir...SnatchABeer.rar
You know how to add it to your build ;)

Well one thing though, I've got a strange problem: A sound is not playing, although it plays if I copy it to another place in the code, but the code after it is definitely called...kinda hard to describe it.
Would be nice of you (PokeParadox) to have a look at it, I can't figure it out. It's around line 130 in StateSnatchABeer.cpp. Freaking shit kills my brain (and two hours of time) -.-

However, the rest works fine, I added some sounds today as promised, some of them using my beautiful voice, because I could not find any suitable ones on freesound.org...
Some words about the game: It's a quickdraw game, where you have to press the A-Button at the right time to snatch a beer and win. The beer slides in from the left after some time (random between 3 and 8 seconds). It speed is dependant on the level with the maximum beeing lvl 27 (I made it that way so it would not go at the speed of light on later levels).


Enjoy, and please comment...

foxblock out

I'm out, getting drunk...
 
foxblock said:
It is done!

Grab it here: http://rapidshare.co...hABeer.rar.html OR http://brainmash.pir...SnatchABeer.rar
You know how to add it to your build ;)

Well one thing though, I've got a strange problem: A sound is not playing, although it plays if I copy it to another place in the code, but the code after it is definitely called...kinda hard to describe it.
Would be nice of you (PokeParadox) to have a look at it, I can't figure it out. It's around line 130 in StateSnatchABeer.cpp. Freaking shit kills my brain (and two hours of time) -.-

However, the rest works fine, I added some sounds today as promised, some of them using my beautiful voice, because I could not find any suitable ones on freesound.org...
Some words about the game: It's a quickdraw game, where you have to press the A-Button at the right time to snatch a beer and win. The beer slides in from the left after some time (random between 3 and 8 seconds). It speed is dependant on the level with the maximum beeing lvl 27 (I made it that way so it would not go at the speed of light on later levels).


Enjoy, and please comment...

foxblock out

I'm out, getting drunk...
Thanks! I'll check it out, should be a nice addition!
I will see if I can find out what's going on with your sounds too...

EDIT: I dunno what the problem is yet, but I must say, I LOVE your comments, made me chuckle.
EDIT2: And I love the game! very nice! I actually haven't HEARD any of the sounds but I think that's a problem here rather than your code, so don't worry. I'll sort myself out and then see if I can figure out that sound bug.
EDIT3: The problem is that your code is repeatedly loading and playing the sound. I'm going to add a check to see if the sound is playing in my copy, that should stop the repeat file loads and repeatedly playing the smash sound from the beginning!

I'm still having weird problems with textures here... stuff with alpha information only are not rendering properly... also I am not currently sure how to handle colour indexed image formats (PNG8/GIF)
I may have to put the OpenGL accelerated target on the backburn for a while... something I wanted to avoid.
 
Last edited by a moderator:
Why not make it easy for yourself and convert palettized stuff to the truecolor format you use everywhere else?

There really is no technical point for anyone to keep using real 8bit graphics, there is barely any on the GP2X, and certainly none on the contemporary handhelds :)
 
Alex. said:
Why not make it easy for yourself and convert palettized stuff to the truecolor format you use everywhere else?

There really is no technical point for anyone to keep using real 8bit graphics, there is barely any on the GP2X, and certainly none on the contemporary handhelds :)
A Sound point... I'm guessing the easiest way to do this would be to create a truecolour surface and blit the 8bit image to using SDL then convert this new surface?
 
Last edited by a moderator:
PokeParadox said:
EDIT3: The problem is that your code is repeatedly loading and playing the sound. I'm going to add a check to see if the sound is playing in my copy, that should stop the repeat file loads and repeatedly playing the smash sound from the beginning!

I'm still having weird problems with textures here... stuff with alpha information only are not rendering properly... also I am not currently sure how to handle colour indexed image formats (PNG8/GIF)
I may have to put the OpenGL accelerated target on the backburn for a while... something I wanted to avoid.

I had expected it... the solution is as simple as it is obvious. I feel kinda dumb, also because I already has the same problem with the "punch"-animation and I added a boolean variable to check if the animation had already started -.-

However, glad you like :D if there are any problems with the alpha-channels in the PNG images, I can replace them with magenta and do the alpha-ing in the code, no problem!
The sounds are playing fine here, so it really has to be on your end ;)

Other than that, I'm pretty happy how my first C++ adventure has turned out [/self-praise] and I already have plans for another game...

foxblock out

EDIT:
I fixed that sound but, but another strange bug appeared... however, I found a workaround and now everything should be fine...
I also changed the falling animation of the glass to make it look more realistically, but this also meant I had to change the 2nd chance a bit, overall it's now harder.
Additionally I edited a spelling error in one file and edited the bar-graphic.
Here is the updated archive: http://brainmash.piranho.de/SnatchABeer.rar

btw, did I mention there are some random events in this game?
 
Last edited by a moderator:
foxblock said:
PokeParadox said:
EDIT3: The problem is that your code is repeatedly loading and playing the sound. I'm going to add a check to see if the sound is playing in my copy, that should stop the repeat file loads and repeatedly playing the smash sound from the beginning!

I'm still having weird problems with textures here... stuff with alpha information only are not rendering properly... also I am not currently sure how to handle colour indexed image formats (PNG8/GIF)
I may have to put the OpenGL accelerated target on the backburn for a while... something I wanted to avoid.

I had expected it... the solution is as simple as it is obvious. I feel kinda dumb, also because I already has the same problem with the "punch"-animation and I added a boolean variable to check if the animation had already started -.-

However, glad you like :D if there are any problems with the alpha-channels in the PNG images, I can replace them with magenta and do the alpha-ing in the code, no problem!
The sounds are playing fine here, so it really has to be on your end ;)

Other than that, I'm pretty happy how my first C++ adventure has turned out [/self-praise] and I already have plans for another game...

foxblock out

Ah the alpha problems are a status update on my progress with getting the OpenGL backend of Penjin functional (and in turn making a GL accelerated version of PandoraPanic in the future.) You don't have to change anything with your images.

Yes for your first try at my buggy undocumented engine you didn't too bad at all, ha ha ;) Glad you are thinking of another game, please tell us more when you are ready! :)
I have a few things to point out that may make your life easier(things I changed in your code.)
  • You don't need to check for #ifdef PLATFORM_GP2X anymore (and didn't really have to to begin with since this is a Pandora game) since Penjin will now automatically do the MMUHack for you when you compile for the GP2X (Not Wiz yet...).
  • Try to put all your updates in the update() function it can make tracking down problems easier
  • Don't needlessly clear the screen, your background can do that job
  • You no longer have to check whether or not to blit as Penjin will automatically blit a state's render function now and substate's are handled correctly too.
Granted some of these are because there are changes in my current copy of Penjin, but I just want to put it out there, since I'm planning to update the snapshots soonish.
 
Last edited by a moderator:
ah, damn, I still had the tab open when I edited my post with the updated version...

Sorry, you might have to edit my code again, as I added some stuff to it.
Would you mind sending me the edited version?
That way I can learn from it, because from your description I cannot totally imagine what you are talking about and what you've changed.

foxblock out
 
Hiya people, Just posting to tell that it's great to see so much activity!

i've been slacking off again, summer temperatures tend to do that to me ;) Been trying to learn some OpenGl in the meanwhile, but that's not really relevant here.

Keep up the good work!

Cheers


@PokeParadox: Looking forward to the next SVN update :)
 
PokeParadox said:
Updates ARE coming... wait a bit longer. :)
Yup, here they are... just kidding he is probably talking about the engine update which should be ready soon (right PokeParadox? ;) )

Anyway, I made a short video showing the 2 games I made. That's right, two, I made a second one, called "The Count Job", it's about counting.
Well then, here are the code/graphics/sounds, in case you want to include it in your local build and try it out:
http://brainmash.pir...TheCountJob.rar

Please share your thoughts, I can only learn through comments, suggestions and such, so don't be shy ;)

and without any further word, watch the video (and listen to some music, because it does not have sound, sorry):
.

foxblock out
 
Last edited by a moderator:
Awesome, foxblock! Snatch A Beer is hilarious, and not what I was expecting. Both the win and lose sequences made me laugh. The Count Job is nice too, a simple but effective concept. I just hope the early levels are easier. ;-) Oh, and colourblind mode? Are you MAD?!
 
Good work! The colour count looks tricky (as I also said on YouTube) but great to see another minigame for the collection!

Yes the engine updates are coming... I'm just updating the other Penjin projects to also work with the latest Penjin codebase and also improving the Penjin codebase by accommodating any changes need to make those projects work!

PandoraPanic!-wise you won't see many changes. A lot of the changes are with the framework itself and some things are easier somethings are improved and also the GL backend is coming along. Once the GL backend is done, I'll move onto implenting GL ES2.
I'll try to point out the major changes so their are no major "gotchas" for PandoraPanic! devs but... I got lazy with my changelog while on holiday... sorry. :lol:
 
Gruso said:
Are you MAD?!
Yes, at least 4 out of 5 psychologists say that...

Apart from that, I thought it would be a good idea to include a colourblind mode as it's critical to be able to distinguish the different circles, of course.
I am not colourblind myself, so I looked around the web, especially at this to find a good solution. In the end I created 5 different grey circles, which I hope is a good way to go, but as always I need feedback on that from those affected.
I basically looks like this (click for bigger):
pp_count_screen01.jpg

On the game itself: Yes, it might have a steep difficulty curve, but it's much easier on lower levels. You start with 3 different colours, 5 seconds time and a big difference in numbers and end up with 5 colours, 3 seconds time and the most occurring colour is only 1 apart from the second.

Anyway, thanks for all the feedback, I'll have a look into my brain to see what other ideas I can find

foxblock out
 
Last edited by a moderator:
At first I thought colourblind mode was just for the extra challenge. Then (in a funny coincidence) I was playing the free WoW themed version of Peggle last night and saw colourblind mode. That's when I realised it was for colourblind people, and that I was a massive dickhead.

Good on you for including it. :)
 
Gruso said:
At first I thought colourblind mode was just for the extra challenge.
Well, you can also activate it for an "extra-challange", because I think it's indeed harder to distinguish (at least for people who are not colourblind) ;)

I am throwing this right in here and ask you to tell me what you think of if. Please note this is not a mock-up, this is real, I've got it in my game ;) - it's still a WIP though
pp_box_screen01.jpg
(click to enlarge)

foxblock out
 
Last edited by a moderator:
I like it... I don't know if it fits with the rest of the GUI side of things though... Maybe if it still had the gradiant bacground behind the preview screen... hmmm
I do like the idea if trying to spruce up the level select screen though.

Yes I was hoping to make an update before now... (some idiot called in sick at work today, so I got handed a nice 10hr shift) plus the weekend is when I get all my shifts at work anyway... so I'm thinking Tuesday/Wednesday is the earliest you'll see an update from me right now. Sorry guys! <_<
 
Back
Top