MarkoeZ said:
Rooster made a great background tune for the math game. I have it playing and all, but do i need to stop it on exit? because since i added the music i have some crashes on exit. Not all the time but i cannot find a pattern either, it seems random.
Edit: btw i think this is the first pandora (game) community software project that gas gone beyond: idea - discussion - arguing -disagreeing - dieing
It's nice to see something like this getting bigger, and being a (small) part of it feels good too
Edit 2: Btw, another noob question: should the code below not get rid of the 2nd zero? i made it a number between 0 and 8 for now and added one, but that's not really a good way i think.
CODE
number2 = rand()%10; //
while (number2 == 0)
{
number2 = rand()%10;
}
you can do in the class de constructor:
CODE
StateName::~StateName()
{
if(music.isPlaying())
music.stop();
}
I'm also very pleased by the response, and especially pleased to see the interest in this project continue.
Your code there will get rid of a zero value, but it's not very efficient. Again I provide a Random object.
CODE
#include "Random.h"
void StateName::function()
{
Random rand;
rand.setLimits(1,9); // good if you have a long string of random numbers needed in the same range.
int num = rand.nextInt();
/// OR
rand.nextInt(1,9); // good if you only need one random number (only recently added)
Random().nextInt(1,9); // same as above but the Random object is temporary
}
todd said:
I think part of what makes this different is that there was code involved from the start: a framework, an example, and instructions on how to set it up. I was able to go from interested to coding in about half an hour -- and that without any prior C++ experience!
I think what also helped is Pokeparadox's explicit invitation for noob questions: I didn't give up in despair because I was invited to post my issues and I received timely, encouraging, helpful responses.
On a similar note, I was thinking today about how we're (I'm) not limited to using Penjin3D for PandoraPanic. It (or something similar) could make a framework for nearly any game. I still haven't looked at the framework too closely. But it provides:
- a menu
- level transitions
- score-keeping
- leaderboard
- possibly other stuff I haven't noticed yet
None of that stuff should be too hard, but it's just junky-junk that can slow you down on your way to actually writing your unique game logic. It could be fun to extend this out & polish it up (better, more pedestrian fonts!) to facilitate further easy game development on the Pandora. Which may be (at least in part) Pokeparadox's original intent with it.
CODE
number2 = rand() % 9 + 1;
I've been developing Penjin in my spare time for a number of years while at uni and now I've left. The goal has always been to make a multiplatform engine in c++ and try and keep it relatively simple to use, while providing useful features. It's very reassuring to hear that someone with no c++ experience can be brave enough and succeed in using my framework.
I of course welcome these questions, because we learn by asking questions. Generally I'll answer pointing to a class I've already developed, but all the code is there if you need to see what's happening under the hood.
Also I must add, that I do want this project to succeed, and to do that the community should be involved... it would be a poor community project otherwise.
Absolutely. Please use the framework for whatever you want to do. The engine itself is free for any use as long as you don't claim you wrote it from scratch and try to sell it to a company or something(The engine itself, I mean... they probably have their own code that's way better regardless :lol
. I'm in talks with Karurosu(Pirate Games web coder) to see if we can get some sort of public access to the SVN going. There are some projects on there that we don't want public, but if we can sort this, then I'd be glad to accept any improvements to the Penjin framework code, especially the 3D aspects of the code :rolleyes:.
The only thing I ask is that if you make a game with Penjin3D, you give a nod to Pirate Games and Penjin3D (Anyone want to make a logo?
)
That code there is pretty much what is going on under the hood of my Random class.
MarkoeZ said:
todd said:
* long text here, see post
--Todd
still no correct exiting with music though, i tested by deleting just these 3 lines and it went smooth again:
See above
todd said:
Is this how it should be?
Are you sure you have the latest download of the framework? Because yes the exclamation is supposed to be there and that's exactly what was needed to fix the Timer class pausing bug. I already fixed it and it should be part of the currently uploaded framework