[quote name='PokeParadox' date='Apr 10 2009, 09:45 PM' post='718930']
[quote name='B-ZaR' date='Apr 10 2009, 09:09 AM']
Oh, and don't look at the code unless you want to get blind. It's not very pretty as it was supposed to be a test. But hey, what works, works.
[/quote]
Don't worry... if it works... it works. Unfortunately for me, my code has to be on display since I'm providing the engine framework and explaining how to use it... some of it is not pretty!
[/quote]
Yeah, one thing I noted was that your classes don't work nicely with STL containers. If your classes are not meant to be copied (and so used with vectors etc), you should explicitly deny it by adding
CODE
ClassType(const ClassType& other);
ClassType& operator=(ClassType& other);
on the private side of your classes. This gives a compile-time error if any of the classes objects are copied. Currently the biggest problem is with Images (and Sprites because of that), that reserve dynamic memory, but don't copy it on copy. So if copy Image A to Image B, then delete Image A, Image B segfaults when used.
I would also like to be able to set a Sprite's Image directly, preferably with a pointer. This way, if I've got many sprites with the same image it can only be loaded once. Also this gives the possibility of quickly changing the image of a sprite (which I need in my new minigame, I'm now implementing it with Images).
[quote name='PokeParadox' date='Apr 10 2009, 09:45 PM' post='718930']
[quote name=''Mithrildor'' date=']
-Most games lack a visible max time (like the bomb in WarioWare)
[/quote]
[quote name=''PokeParadox'' date=']
-Some games don''''t have a time limit, but maybe they should? hmmmm.
[/quote]
I think this is due to the fact that there''s never been laid down any rules for the mini games. In the beginning there was a small discussion whether we should have short warioware type mini games, or if we should have longer mini games. My games (Alien and Spelling Contest) are designed after the warioware concept, while other has taken an other path. That''s what you get with a community project like this. :rolleyes:
However I think it gives the game certain charme
[/quote]
Basically we had two camps of people, and one hand we should make all games like WarioWare, the other hand we should not restrict the games... I basically decided we shouldn't exclude either type of game, because at that point I wasn't sure how many people were going to contribute...Anyway we have a nice patchwork of games and on a later revision we can organise boss stages and such.
[/quote]
I agree. For now we should concentrate on getting as many minigames as we can. Most of the games so far can be given some kind of time limits. This can be tweaked later. Some games also have implicit time limits, such as my turret minigame.
[quote name='PokeParadox' date='Apr 10 2009, 09:45 PM' post='718930']
[quote name='B-ZaR' date='Apr 10 2009, 12:12 PM']
This reminds me, are all the minigames supposed to implement the pause functionality on their own?
[/quote]There is a pausing variable and a pausing template function which you may override on a per-state basis. So you just check it for rendering and check it when updating. Some code snippets below:
Pause/unpause
CODE
example code
[/quote]
Yes, I noticed this. Couldn't this be handled outside the minigames? If pause is pressed, the engine won't call any of the minigame's methods? Nooo... now I see. The games may want to implement some functionality to be done on pause and after it, like stopping/starting counters. This could however be done with separate "onPause" and "afterPause" virtual methods. The only reason to still call the update/render methods during pause would be to keep animating game objects or something like that. Is this really necessary? The pause code in the minigames is probably mostly stuff you always copypaste and which "just has to be there". I smell future bugs
[quote name='PokeParadox' date='Apr 10 2009, 09:45 PM' post='718930']
[quote name='Mithrildor' date='Apr 10 2009, 01:07 PM']
Yeah, remove the pause and add timelimits!
[/quote]
Ack but we went through all the games putting the pause checking in... trying to get every game behaving similarly! We can't please everyone... :/
Timelimits is an easier thing to add though...
[/quote]
This is why I'd recommend to make the pause functionality an engine side feature. You wouldn't need to go through all the minigames to implement it. Timelimits and wariowarebomb-like graphics could also be an engine feature. For example, minigames could choose to implement "virtual unsigned int getTimelimit() const", which would return the wanted time limit in milliseconds. Then the graphics could be overlaid after the minigame's render() method.