Pandora Pandora Panic


Yes this idea would need some additional code, which I currently don't know how to code it... if anyone has some ideas there, I'd gladly accept changes to the source.

I do like the idea but I just have no way to do it currently.
 

I was going to post this in the video thread but couldn't find it. Just going through a game of PP on my Pandora. Nothing too special. I giggle and stuff sometimes <_<

Edit: This seems to be the only thing that runs perfectly on the Pandora, the rest of the stuff I try has sound problems even after some suggested tweaks. ;)
 
Drak said:
I was going to post this in the video thread but couldn't find it. Just going through a game of PP on my Pandora. Nothing too special. I giggle and stuff sometimes <_<

Edit: This seems to be the only thing that runs perfectly on the Pandora, the rest of the stuff I try has sound problems even after some suggested tweaks. ;)

That is good to see! It is also good to hear that you are pleased with how well it runs - sense of achievement all round I'm sure!

Steve
 
Last edited by a moderator:
I've seen at least 3 videos of PP! running on the device itself and in none of them my game (Arena) appeared... still waiting to see it on a real Pandora for the first time...
 
Hi,

I didn't read much of this thread. It is so long :)
Just want to inform you that I started a mini game today and have successfully added to the frame work.
Only think is missing are some lines of code for the game logic. Buttons and sprite movement work already ;)

As all the links in the first posts which point to information and wikis and such aren't working, i might be asking some questions here later ;)

The game itself is an idea I got yesternight while playing Mario&Luigi Superstar Saga. There is this box with a counter where you ahve to jump with Mario or Luigi alternatively. I and my fellow gfx-man are adapting this. However, the theme will be football oriented, as the Worldcup is about to begin :)

ATM, we do not have much gfx, just a sprite, which looks awesome, therefore i can#t post any screen shots :(
I do not finish a lot of my started projects, but this is so short that the probability is around 90% :)
 
Well to get some better understanding of the whole game logic I recommend looking at an existing minigame.
I also recommend the following games for this purpose:
SpaceInvaders, as it is a pretty simple game, so it should be easy to understand the basics
TestYourSight, as I added quite a lot comments, so it should be easy to track what is going on
You can also just take one of these cames, duplicate it and replace the function implementations with your ones to get a working framework.

Basically:
- Name your class StateYOURGAMENAME, also name your source files like that
- Make it a child class of mgBaseState
- All of the following functions will get called automatically by the game engine, so you only have to fill them with the correct content

init - all game initialization goes here, like loading images, sounds, etc.
render - render your sprites here
update - do all the game logic here (advance counters, etc)
userInput - handle user input here
pauseScreen - render the pause screen here (show instructions, etc.)
onpause / onresume - stop/start counters here, so they don't continue running while the pause screen is shown

For help on classes you can check the manual, but it is WIP, so only a few have been added yet:
http://projectinfini...s:penjin:manual

I hope this helps to get you started, feel free to send me a PM, too, in case you have more in-depth questions,

foxblock out

Edit: Forgot the actual framework implementation (which maybe only was what you were looking for anyway):
To add your game to the list, edit the following files:

MiniGameStates.h, add (below the one for Fire)
Code:
    else if (next == STATE_YOURGAMENAME)
          state = new StateYOURGAMENAME;
userStates.h, add
The header file of your game to the includes and
STATE_YOURGAMENAME to STATE_MODES

MiniGames.h, add
GAME_YOURGAMENAME to MINIGAMES_LIST
"YourGameName" to the string array
 
thanks. I figured most of this out while just copying StatePong.* to StateHeader.* and chaning it ;)
What i didn't found was this:

foxblock said:
MiniGames.h, add
GAME_YOURGAMENAME to MINIGAMES_LIST
"YourGameName" to the string array

To be on the safe side I want to clarify the following. I put my gfx in "built/images/Header", because the Pong gfx where in "built/images/Pong". Is that OK? The "built" is a bit strange, as i would think that it only contains data which is generate while building PandoraPanic.

As said, I have managed to display sprites, query the buttons and select my game in the selection screen. What is missing is understanding the "Achievements".

I must say it is a nice framework at lest for simple games, which is the purpose of it :)
 
Last edited by a moderator:
Yeah just as long as you have a unique folder to access your images, you can call it what you like, just keep it sensible! :)

Yeah... "built" may be a bit of a misnomer... maybe just "data" would be better. I think I called it built because that's where the finished games data is... or something.

Thanks for the complements! :D

Look forward to your game. :)
 
Creature XL said:
To be on the safe side I want to clarify the following. I put my gfx in "built/images/Header", because the Pong gfx where in "built/images/Pong". Is that OK? The "built" is a bit strange, as i would think that it only contains data which is generate while building PandoraPanic.

As said, I have managed to display sprites, query the buttons and select my game in the selection screen. What is missing is understanding the "Achievements".

I must say it is a nice framework at lest for simple games, which is the purpose of it :)
If your game is called "Header" that would be correct, in genreal:
put images in build/images/YOURGAMENAME
put sounds in build/sounds/YOURGAMENAME
put music (big sound files) in build/music/YOURGAMENAME
put any other resource file in build/scripts/YOURGAMENAME (usually not needed)

You probably confused the build folder with the obj folder which is where the compiled files go.

To understand "Achievements" I recommend reading: http://projectinfini...ievement_system in your case especially the "Logging events" and "Creating Achievements" sections.
In a nutshell: You can log "events" all over your game, these can be anything (from Hero.jump to Enemy.takeDamage). These events get picked up by the AchievementSystem and compared to the list of Achievements. When the events and conditions match an achievement is unlocked.
The system was designed to be very flexible (for any type of game), therefore it has a high level of abstraction which can be confusing.
Additionally PandoraPanic is a pretty atypical example of a game making use of achievements, as you have many different games, so single achievements usually matter for a single game only and therefore are pretty limited.

So, take a look at the existing achievements in AchievementSetup.h as well as the guide and if any questions remain, feel free to ask me (I can also easily add an achievement to your game once it's finished).

foxblock out
 
Last edited by a moderator:
Looks like I took over this thread :)

Well, I have to compile PP for Win32 (to show it to a development partner).
I have it almost done, only think missin gis linking the sdl_gfx.
I have build sdl_gfx with CodeBlocks and put the .dll into the lib-path and have added .lib files which I created with a DLL->LIB converter.
However, the linker is still not able to find "rotozoomer" and other lables which sound like they are part of sdl_gfx.

I think all in all I just need a sdl_gfx.lib or what ever library file for mingw.

any help?
 
I am also compiling PP for W32, so I might be able to help you there.

First of all, did you get these libraries and put them in your minGW folder? http://projectinfinity.org.uk/lib/exe/fetch.php?media=homebrew:engines:penjin:downloads:sdl.7z
This archive should include all the needed SDL libraries (apart from the binaries).
Sometimes there is a problem with "sdlgfx" and "sdl_gfx" (same file, just another name, PP requires the latter one, while the former one came with some old SDK).

Did you use the PandoraPanic.cbp file which also is on the SVN repo? If not, please use it, as it has everything already defined and should be ready to go (you just have to point it to the MinGW folder, the Penjin folder and probably some other, which should not matter for your case).
here is a shot guide: http://projectinfinity.org.uk/doku.php?id=homebrew:games:pandorapanic#on_windows

In case the error persists, please copy the exact message codeblocks gives you (in the build log) and post it here, this way we can better identify your problem.

foxblock out
 
I am close before giving up!
Below is the error I had this afternoon. And which was gone after I used the lib_gfx from the archive above.
At least I thought so.
Now I get this error again!

obj\W32\Release\PenjinBase\Image.o:Image.cpp|| undefined reference to `rotozoomSurfaceXY'|
obj\W32\Release\PenjinBase\Image.o:Image.cpp|| undefined reference to `rotozoomSurfaceXY'|
obj\W32\Release\PenjinBase\Line.o:Line.cpp|| undefined reference to `lineRGBA'|
obj\W32\Release\PenjinBase\Line.o:Line.cpp|| undefined reference to `lineRGBA'|
obj\W32\Release\StateBallDrop.o:StateBallDrop.cpp|| undefined reference to `aaellipseRGBA'|
obj\W32\Release\StateBallDrop.o:StateBallDrop.cpp|| undefined reference to `aaellipseRGBA'|
obj\W32\Release\StateMain.o:StateMain.cpp|| undefined reference to `rotozoomSurfaceXY'|
||=== Build finished: 7 errors, 6 warnings ===|


When it was working, I had a "dll not found" error. I copied all dlls I could find into the folder of the .exe and it worked better.
But there was no SDL.exe, as I downloaded a build SDL.exe (same Version as my headers) It gave "SDL_Error" not defined.

WTF?
 
PokeParadox said:
Maybe you need to do a complete rebuild of the project... I'm unsure why you are getting all these problems.
Maybe because I am a first time user of CB and I only compiled once with VisualStudio2008 on windows ;)

Do you mean "hit da rebuild button"? I did this often.

I think that the link errors above are from the libsdl_gfx. At least "rotozoomer" is from that lib and the others sound as if they fit into that lib as well.
Will try to investigate more. However, I was so sure all would be well after getting the "include" and "lib" in that archive above :(


EDIT: What seven more confusing. some are .lib and some are .a. Is this just a different naming convention? I know the .a from Linux.

EDIT2: Looks like not all SDL_gfx are compiled with all features. Found this:
http://www.wormux.org/phpboost/wiki/compilation-using-mingw-native-and-cross-compilation

I hope that helps me :eek:

EDIT3: Scratch that. Obviously no make and no configure included in the mingw package. I leave it here and give a big s... about the Win32 compile :(
 
Last edited by a moderator:
I wasn't trying to be patronising or such, I mean it should work! :)

Yes your linking errors are definitely from SDL_gfx... rotozoom was integrating into that lib.

lib and a files are essentially the same.

Maybe you have some conflicting libs... I suggest you just use the lib-pack that foxblock listed.
If you want you can catch me on msn or whatever and do some live troubleshooting on this? But might be good to take a breather from it for a while.

My best guess is you have some SDL libs that do not mesh with the SDL_gfx from the lib-pack above. Naming of the file is important, PandoraPanic looks for the file called "SDL_gfx" so make sure the .lib or .a is called that.
 
PokeParadox said:
I wasn't trying to be patronising or such, I mean it should work! :)

Yes your linking errors are definitely from SDL_gfx... rotozoom was integrating into that lib.

lib and a files are essentially the same.

Maybe you have some conflicting libs... I suggest you just use the lib-pack that foxblock listed.
If you want you can catch me on msn or whatever and do some live troubleshooting on this? But might be good to take a breather from it for a while.

My best guess is you have some SDL libs that do not mesh with the SDL_gfx from the lib-pack above. Naming of the file is important, PandoraPanic looks for the file called "SDL_gfx" so make sure the .lib or .a is called that.

I actually did two days off of trying to compile it. Out of frustration as can be seen in my last post's edit.
I didn't even botehr to read the quoted reply till now :eek:
The fresh start you mentioned is what i will we do now. And I will only use the libs from foxblock. It might be very well possible that the mixture of the libs is bad. I'll edit this post if I have success after the break fast :)


EDIT:

Juchuuu It works. I had to jump thru so many loops.
And can you check the cbp for the windows compile?
It is not complete it seems. I had to add all the SDL-libs in the "additional libraries" window. It was not enuff to just use the "-SDL;-lSDL_gfx;..." stuff. The linker said: "Can't find -lSDL" :)

EDIT:
No, its not over yet :eek:
When I start the prog ( I didn't say 'app' :) )from the CB "play"-Button it works.
When I double click in the Explorer or run it from the command line I get a black SDL window and then it exits with the message:"application exits ...". In the stdout.txt I get "Penjii says: no arguments on command line given". Passing any argument doesn't change anything. What kind of argument is it expecting anyways?

However, on Linux its the SAME! And Linux tells me:
terminate called after throwing an instance of 'std::eek:ut_of_range'
what(): vector::_M_range_check

So, what now?
 
Last edited by a moderator:
foxblock said:
I am also compiling PP for W32, so I might be able to help you there.

First of all, did you get these libraries and put them in your minGW folder? http://projectinfinity.org.uk/lib/exe/fetch.php?media=homebrew:engines:penjin:downloads:sdl.7z
You should include the DLLs as well. I had to find an SDL_gfx.dll on the net. However, there was a link on the site from the VDrift-project I found thru google ;)
 
Last edited by a moderator:
Back
Top