Pandora Pandora Panic


Could anyone explain how to add foxblock's games to my build, I have everything set up to build PandoraPanic but I don't know how to add the new files and if I have to add some lines in another files so the program knows he has to use the new files (Never really used CodeBlocks before, only used visual studio before).
 
Dragons_Slayer said:
Could anyone explain how to add foxblock's games to my build, I have everything set up to build PandoraPanic but I don't know how to add the new files and if I have to add some lines in another files so the program knows he has to use the new files (Never really used CodeBlocks before, only used visual studio before).
I assume you already have added the .cpp and .h files via Project -> Add files..., they'll most likely end up in "Sources" and "Headers" though, I moved them to "My games -> States -> Minigames"

Next you have to add the games to the list of available games:

In "My game -> MyGame.cpp" add
Code:
void MyGame::stateManagement() {
    [...]
        else if (next == STATE_SNATCHABEER)
            state = new StateSnatchABeer;
        else if (next == STATE_THECOUNTJOB)
            state = new StateTheCountJob;
    [...]
    }
In "My game -> States -> Minigames -> Minigames.h" add:
Code:
enum MINIGAMES_LIST {
    [...]
        GAME_SNATCHABEER,
        GAME_THECOUNTJOB,
    [...]
    }
    static string MINIGAMES_NAMES[]= {
    [...]
    "Snatch A Beer"
    "The Count Job"
    [...]
    }
Make sure you have them added behind the same game so the connection between the game state and the game name is not screwed up.
Also you have to edit the MAX_GAMES integer (at the top of the file), just increase it by 2.

In "My Game -> States -> userStates.h" add
Code:
#include "StateSnatchABeer.h"
    #include "StateTheCountJob.h"
    [...]
    enum STATE_MODES {
    [...]
        STATE_SNATCHABEER,
        STATE_THECOUNTJOB,
    [...]
 }

Then to add the games to the select screen:
In "My Game -> States -> StateMain.cpp" add:
Code:
void StateMain::genPreview(uint next) {
    [...]
        else if (next == STATE_SNATCHABEER)
            subState = new StateSnatchABeer;
        else if (next == STATE_THECOUNTJOB)
            subState = new StateTheCountJob;
    [...]
 }

Phew, I hope that was all, the game will probably crash at some point if I forgort something, so report back if this happens (look what Penjin says in stdout.txt and stderr.txt, it helps identifying the error).
You also have to go through all these steps when you create your own game.
I might be a good idea to update the wiki with a more detailed description, I also recall it lacks the explanation how to add your game to the game selection screen.

Anyway, I hope I could help

foxblock out
 
Last edited by a moderator:
Well it doesn't crash, but it doesn't seem to work either. It builds fine, it runs but in the selection box the preview is just a white screen, and when I try to play it it's also just a white screen... Did I forgot something?

Also Code::Blocks is doing strange things lately, for some reason it wants to have a disc in my DVD drive, if that's not the case it gives a "no disk" error that keeps popping up until I pressed continue like 10 times or I put a random disc in my drive (doesn't matter which). How come?


EDIT: I forgot to place the images and sounds in the built map :p ! Now it works, thanks for the help! It's really cool, the graphics are funny, the soundfx really fit! good job, hope to see even more minigames by you (also have to try out your counting game)! Now I also know how to include my own (future) minigame in Pandora Panic, thanks again!

Also, after a Windows restart, Code::Blocks is acting normally again. I think for some reason, when starting my PC with a disk in the drive, he wants to keep it that way... really weird.
 
OK guys I've updated the wiki with the latest framework and Penjin snapshots and now the Data files will be in a separate package.
Test builds will be provided tomorrow ... I want to sleep at somepoint.
I'm lazy so the link is in my sig to the PandoraPanic! wiki page.

I'll try and give some insight as to what is actually new to Penjin.
  • Much of the code has be restructured to better support different render backends.
  • Classes can render in SDL without specifying the target surface, they will automatically render to the screen surface. This allows better code portability between GL and SDL backends.
  • Templated code means you can different types more dynamically.
  • MMUHack has been moved outside of State code scope and is handled automatically.
  • Blitting is peformed automatically.
  • Clearing screen operations have been moved to the GFX namespace for wrapping backend code to allow greater code portability.
  • PENJIN_FIXED fixed point support updated.
  • Other misc bug fixes and work that I forgot about due to being on vacation.
Foxblocks's games have been added to PandoraPanic! too.
EDIT: Also you only have to edit the StateManagement bit for mini-games in one place instead of two...

Any questions then you know where I am!
 
Well, well, well I just came to check out the latest build... a bit boring as nothing really changed for me :p
While playing I ran across a bug which never occurred before:
Game - Bad Vista
After hitting the basket the WIndows logo just bounces up and down (around 5px high) on one point and never stops, so the game never ends. As I said, that never happened before, sadly I cannot really say I did something special, to me that game always was a bit random ;)
Maybe there should be a check using an integer which increases by one everytime the windows logo hits somethign and automatically exits the game when it reaches 50. That should be enough for a normal game, but in case the above happens, the game will end after some time.
I should probably also add something like that to my Count game, which has the possibility to hang as the circles are created at random points and the game checks if they overlap. There may be a (very small) possibility in a very awkward case that the last circle may not be placed because all space is occupied. I did not do the maths, but I tried it 1000 times and that case never occurred, so I assume it's pretty save, but as always, there may be a small chance (there also may be not, I dunno, as I said I did not do the maths).

I also have an idea for another game, maybe I get that done sometime - be afraid! ;)

foxblock out
 
Public Repo for Penjin now online and active
http://code.google.com/p/penjin/

I'm going to setup a public repo for the PandoraPanic project too but for now enjoy bleeding edge Penjin updates.

foxblock, can you tell us anything about your game?
And about the BadVista bug, I'll look into it... it shouldn't be doing that clearly.
 
About the bug: Sorry, I can't provide you with a more detailed description, but I think it might be because it bounced on the left side of the basket so it would constantly hit the wall and therefore maybe not slow down (as it would usually do when hitting the floor) - that's just a guess though, I had no look at the code.

About my game: Well it's nothing exiting, you would control an object falling down while you had to evade obstacles (like walls with just a small breach). Not a new concept, but I thought it would fit into the theme, and has not been done before (well BallDrop is kinda like it). It was just an idea which popped up in my mind and I also have a special / crazy setting made up...
I am still struggling to come up with more original ideas, but I thought any minigame (unless it has already been made) could be a benefit for the project as currently there are not that many (compared to other minigame-collection like WarioWare).
The downside is that I am currently more focused on my own project, but at some time (soon) I might be interested in making another game (TheCountJob only took me some hours to make, but I basically already had the code written down it simply was in Flash for my Archos 605 game).

I still like making a minigame every now and then, also because I can complete it rather fast, so there might be more by me every now and then in the future... ;)

foxblock out
 
PokeParadox said:
Public Repo for Penjin now online and active
http://code.google.com/p/penjin/

I'm going to setup a public repo for the PandoraPanic project too but for now enjoy bleeding edge Penjin updates.

foxblock, can you tell us anything about your game?
And about the BadVista bug, I'll look into it... it shouldn't be doing that clearly.
Just to bump what I said on the previous page...
 
Last edited by a moderator:
And following from the previous post we now have the public PandoraPanic! Repo
(Initial commit is in progress as I type this...)
Please join the project there and help get this thing polished up for the Pandora launch! :)

EDIT1: It seems it's being naughty... the initial commit will have to wait...
EDIT2: Source is there now, but the build dir is still messing me about when I try to commit it to the svn.
EDIT3: should be ready now, phew!
 
foxblock said:
About the bug: Sorry, I can't provide you with a more detailed description, but I think it might be because it bounced on the left side of the basket so it would constantly hit the wall and therefore maybe not slow down (as it would usually do when hitting the floor) - that's just a guess though, I had no look at the code.

Argh... I thought I'd taken care of that stuff. I'm pretty sure the walls have friction as well as the floor. But I could be mistaken.

Thanks for finding the bug. Please let me know if anyone manages to reproduce it. A good description of what happens might, as you suggest, enable me to code a sanity check to catch it.

I don't think I even have codeblocks set up right now. I'll try to get to it ASAP. But if someone else sees an easy fix, I won't be offended.

--Todd
 
Last edited by a moderator:
Even with friction, it's conceivable that the icon will bounce less each time it hits something, but could get stuck in a corner. One possible solution would be to slightly randomize the momentum loss due to friction. Some bounces will cause no momentum to be lost, some will cause a little more or less to be lost, some could even give the icon a SLIGHT bit more momentum. That would fix any issues with it getting stuck, but the changes could be kept down to a level that they're not very noticeable by the user.
 
Just a note to say that you need to send me your gmail if you want to be added to the project as a commiter.
Sorry nothing has really progressed, but I'm finding it difficult to find the time and energy right now.
I know I need to step things up a notch since the Pandora release feels a lot more immanent now.

Oh I also added the bug to the googlecode site, other bugs reports would be useful submitted there where possible
 
It's a bit quiet here lately, so lets give this topic a bump. I have been working on my minigame called Arena for the past few weeks. It is alreade playable but there is still alot to be done. I have made a video of what I've got so far:


All graphics are done by me (inspired by Final Fantasy and Zelda), they will still be tweaked for the final version as I'm going to make them look more 16-bit SNES like instead of 8-bit NES. Besides that I want to implement a feature that randomly choose between 3 graphical styles, the first one will be a very retro looking "2 or 4-bit" style (like the old atari games), the second will be the 16-bit style I'm now working on and the last style will be hand-drawn graphics.

beside that the music and sounds are still placeholders and have to be replaced with some original stuff. and in terms of programming there is also still some things to work on (different monsters, levels,...).

That's all for now.
 
B-ZaR said:
Dragons_Slayer said:
<awesome stuff>
Wow, I like. just add diagonal movement, ok? :)

You can actually walk diagonally but not with the character (the sprite) actually facing that direction, it would be too much work, especially if I have to make swordswings in the diagonal directions!

EDIT: well actually I just tried implementing diagonal walking, and I think it's not really needed, I don't use it at all but I will keep it for those who want it.
 
Last edited by a moderator:
Dragons_Slayer said:
B-ZaR said:
Dragons_Slayer said:
<awesome stuff>
Wow, I like. just add diagonal movement, ok? :)

You can actually walk diagonally but not with the character (the sprite) actually facing that direction, it would be too much work, especially if I have to make swordswings in the diagonal directions!

EDIT: well actually I just tried implementing diagonal walking, and I think it's not really needed, I don't use it at all but I will keep it for those who want it.
No need for 8-direction animations, GB/SNES/GBA zelda style is actually preferable :)
 
Last edited by a moderator:
Dragons_Slayer said:
It's a bit quiet here lately, so lets give this topic a bump. I have been working on my minigame called Arena for the past few weeks. It is alreade playable but there is still alot to be done. I have made a video of what I've got so far:
* SNIP *
That's all for now.

Omg, that looks amazing!!! great job there, seems like you have not been wasting time :) music mood fits great, etc, wow...

edit: clarifications
 
Last edited by a moderator:
Back
Top