Allegro.cc - Online Community

Allegro.cc Forums » The Depot » [Final Release] Toggles and other games

This thread is locked; no one can reply to it. rss feed Print
 1   2 
[Final Release] Toggles and other games
Onewing
Member #6,152
August 2005
avatar

It's interesting how it's turned out so far. People from other sites seem to play 1945 or Mymaze and not Toggles while it seems like only Toggles is played here. Hmmm...

===========================Edit============================
Alright folks, I've added one last final update! This is for linux and windows users. Here's what's changed:

  • Fixed a bug that causes users names not to appear on the online high scores (when user entered a space in their name).

  • Improved the water-rippling algorithm. It's not a huge change, but it's better now. I measured the game running at 34FPS on my computer when there was the most rippling possible (in other words, 34FPS is as low as it would go). With the update, the lowest it goes is 41FPS and I've made it to where it doesn't hit this minimum as much. Now, on average it runs between 45 and 50 FPS. It's still not 60+, but it's better. :)

If you already have the game and are a windows user, just get the patch:
Toggles Patch
If you don't have the game and are a windows user, it's just the original link:
Toggles

If you already have the game and are a linux user, just get the source code and recompile:
tog-src.zip
If you don't have the game and are a linux user, get the new version:
toggles-1.2.15.zip

------------
Solo-Games.org | My Tech Blog: The Digital Helm

miran
Member #2,407
June 2002

OK, I finally got to really play this and I have a few comments.

1. You should really try to improve the artistic aspect of this game. Gameplay wise, although not that exciting, it's fun enough to be a good distraction for a few minutes. But the graphics are really offputting. I'm not artistically competent enough to give anyone advice, but I think you can go a long way with things like a simple design, subtle gradients, soft colours that go well together (radioactive-slime-green against virgin-blood-red don't by the way), etc.

2. In connection with #1 the font is not good. I see you used my font editor to create it, but to be honest, the "effects" commands in the editor are lame and almost completely useless and shouldn't be used by anyone. The font editor is meant for two purposes: hand drawing small fonts (as in 8x8 and similar) and converting TTF fonts to monochrome bitmap fonts to be later filled in with fancy effects using a real image manipulation program. Or even better, get yourself one of the TTF rendering libraries and use an actual one colour TTF font with antialiased edges. Most often multicolour fonts with lots of effects applied to them are only really useful for things like titles and captions and logos.

3. The "how to play" screen explains everything except what the goal of the game actually is. You should put a line saying something like "push the required number of toggles under water using the mouse before time runs out" somewhere. And the purpose of that selection wheel at the end of each level could also be explained in-game. I had to read the readme of all horrors to find out what that means. I still haven't figured out yet what constitutes a combo though and how to get one. :P

4. Scoring could be more balanced. It seems like you don't get a lot of points for finishing a level and so I was basically just hoping to get the pot of gold at the bonus wheel screen to get those extra 3000 points. Like get 83 points for finishing the level and then 3000 for the pot of gold. Or do the combos give you extra score? I don't get how you could get 400.000+. :o

5. Online scores. What happens when the server can't be reached? Does the loading function time out after a while? How long does it take? This could really get annoying if you're not connected to the internet or if the server is down. In my game I put the server communication code in a separate thread, so everything happens seamlessly in the background...

Anyway, it's a good game, I just wish it looked nicer.

EDIT: A few more things I forgot:

6. If you get a combo and then immediately loose the game, the word "Combo!!!" stays on the screen.

7. The bonus selection wheel shows pixels that are obviously supposed to be magenta but aren't quite pure enough to be skipped by draw_sprite().

8. As I mentioned a few days before, the mouse cursor doesn't work in Linux unless I move the mouse. Changing mouse_icon in the config file doesn't make a difference either. I haven't checked the code, but are you sure you're drawing the cursor in every frame?

9. The ultima powerup is useless. If you use it, a green circle starts to appear and then you loose because time runs out. You should freeze time when ultima is used.

--
sig used to be here

Onewing
Member #6,152
August 2005
avatar

Quote:

OK, I finally got to really play this and I have a few comments.

Thanks for taking the time to play! I'll try not to over-reply to all your comments. In other words, I'll try to be concise.

Quote:

1. You should really try to improve the artistic aspect of this game.

Heh, I got carried away. Yes, I plan on making my next game a little more subtle on the eyes. I thought Toggles might be overbearing, so I tried to make a way for users to be able to make their own theme. However, that didn't work out too well either.

Quote:

2. In connection with #1 the font is not good.

I think I started to pick up on this during the last phase of coding. There's only two fonts in the game, the main font and the help font. I think the help font looks quite a bit better then the main font. This is just a matter of practice and trial and error. BTW, I really wish your Font Editor had an undo button. :-/

Quote:

3. The "how to play" screen explains everything except what the goal of the game actually is.

I thought the quick instructions went over this. Is it just not clear?

Quote:

4. Scoring could be more balanced.

I wanted the scoring to be complex, so that way people could develop different strategies to play the game. I guess I made it too complex to the point where it doesn't even make sense.

Quote:

It seems like you don't get a lot of points for finishing a level

Finishing a level, no, getting 100% of the toggles under water does give you a little bonus. 100% of the toggles is worth 100 points times the current level. This was set up for the strategy of not adding rows and columns on the penalty wheel so it's easy to get all the toggles down in the next level. You could get a nice 2000 points in level 20 for getting all 100% of toggles down. However, that's not as much as the 3000 bonus bag (which rarely shows up).

Quote:

Or do the combos give you extra score?

Yes! Combos are the way to get that 400,000+ scores. If you get X consecutive* toggles down in under three seconds, you get a combo, which gives you a certain amount of points times the current level. The first combo is worth 10 points times the current level if you get 10 consecutive toggles down. The second combo is worth 50 points times the current level if you get 25 consecutive toggles down. Thus, once you get the first combo, you just need to hit 15 more toggles to get the second combo (all within that 3 second timeframe)! The third combo is at 45 consecutive toggles and is worth 500 points and the fourth combo is at 70 consecutive toggles and is worth 1000 points.

For one last example, I managed to get the fourth combo in level 21 for my top score. That means in three seconds I got (10 * 21) + (50 * 21) + (500 * 21) + (1000 * 21) + 70 * 5 = 33,110 points! The parenthesis represents each of the four combos and the 70 * 5 is for the 70 toggles I must have hit to get the fourth combo (each 5 levels the toggles are worth 1 more point, thus when you get to level 20, toggles are worth 5 points). I got to level 30 on that top score.

Quote:

Does the loading function time out after a while?

Yes, 15 seconds.

Quote:

In my game I put the server communication code in a separate thread, so everything happens seamlessly in the background...

Threads are new grounds to me, other than what I learned in school. I'll have to learn how to make them portable across linux and windows (or does pthreads work on both OS's?). I'm working on a program now that might require these, so afterwards I might upgrade Toggles as well.

Quote:

If you get a combo and then immediately loose the game, the word "Combo!!!" stays on the screen.

Gotcha, that'll be an easy fix.

Quote:

7. The bonus selection wheel shows pixels that are obviously supposed to be magenta but aren't quite pure enough to be skipped by draw_sprite().

It use to show a lot more. ;D Anyway, I'll fix it.

Quote:

I haven't checked the code, but are you sure you're drawing the cursor in every frame?

That's really odd. If the config is set to 0, right before the buffer is drawn to the screen, the mouse (which is just a bitmap) is drawn to the buffer at mouse_x, mouse_y. Although, I do call poll_mouse() right before...

Quote:

9. The ultima powerup is useless. If you use it, a green circle starts to appear and then you loose because time runs out. You should freeze time when ultima is used.

This is by design. I wanted ultima to be an automatic win of the current level unless time ran out. However, I suppose I could just make ultima an automatic win.

  • About the "consecutive" toggles I mentioned above. I'm talking about getting toggles down without bringing one up. If you bring one toggle up (above the water), it resets how many consecutive toggles you've managed back to 0.

------------
Solo-Games.org | My Tech Blog: The Digital Helm

miran
Member #2,407
June 2002

Quote:

Yes, 15 seconds.

I don't know. Just now the "loading high scores..." message didn't go away for more than 30 seconds, so I kill the game. After returning from fullscreen mode I was greeted by this friendly message:

{"name":"590420","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/6\/46c73fc279df09fb4cba8d952d41d69a.png","w":460,"h":79,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/6\/46c73fc279df09fb4cba8d952d41d69a"}590420

I also found another bug. I got to level 18, flipped all the toggles but still lost the game because the bar didn't reach the gold line. There were some boxes(?) in the level though, which don't seem to be flippable, so maybe you're not calculating the percentages right? Or maybe I just don't understand again?

--
sig used to be here

Onewing
Member #6,152
August 2005
avatar

Quote:

Just now the "loading high scores..." message didn't go away for more than 30 seconds, so I kill the game. After returning from fullscreen mode I was greeted by this friendly message:

At one time, I had the TIMEOUT set to 30 seconds, but realized that was too long. I just did a grep on TIMEOUT in my sourcecode and I see I actually have it set to 10 instead of 15. So technically, it should only wait 10 seconds. I guess allegro_message("") sends the msgbox behind the allegro program in full screen?

Probably a better solution would be to just log the error in a text file, so players don't even have to worry about error messages. I'll add it to my list...

Quote:

I got to level 18, flipped all the toggles but still lost the game because the bar didn't reach the gold line. There were some boxes(?) in the level though, which don't seem to be flippable

The non-flippable toggles are calculated into the total percentage of toggles underwater (which is why they are particularly nasty). However, if all you have left is non-flippable toggles, the level should still be complete. Are you sure you got all the flippable Toggles underwater (honestly, because I haven't seen this before and that would be a pretty serious bug)?

------------
Solo-Games.org | My Tech Blog: The Digital Helm

miran
Member #2,407
June 2002

Quote:

I guess allegro_message("") sends the msgbox behind the allegro program in full screen?

I beleive TFM clearly states that allegro_message() must not be used while a gfx mode is set.

Quote:

that would be a pretty serious bug

I agree, that is a pretty serious bug. I'm positive all the flippable toggles were underwater because my strategy in that particular game was to always choose the +1% penalty. That meant that in level 18 the gold line was already getting close to 100% but the field was still very small so it wasn't difficult to clear it completely.

--
sig used to be here

Onewing
Member #6,152
August 2005
avatar

Well, it gets worse. I can't seem to reproduce the problem. I did the +1% for 26 levels. On level 24, I had less than the total percent needed but I had all the flippable toggles underwater and the level was completed (there were about 8 non-flippable toggles still in play).

Did you have all the flippable toggles down for a while before time ran out? If a toggle is in the process of going underwater, it's not considered part of the total percent underwater.

------------
Solo-Games.org | My Tech Blog: The Digital Helm

miran
Member #2,407
June 2002

Quote:

Did you have all the flippable toggles down for a while before time ran out? If a toggle is in the process of going underwater, it's not considered part of the total percent underwater.

At the time when the game over message was displayed all flippable toggles were underwater.

--
sig used to be here

Onewing
Member #6,152
August 2005
avatar

Alright, here's the logic in the code (with comments to explain it). Maybe there's a hole I'm not seeing:

1//in the board update function
2status = true;
3iCount = 0;
4/*snip*/
5for(int j = 0; j < iRow_Count; j++)
6 for(int k = 0; k < iRow_Count; k++)
7 {
8 /* snip */
9 
10 /* Go through all the toggles currently in play. Each one that is
11 is not visible (it's underwater) increments iCount, which is used to
12 calculate the percentage underwater.
13 If one toggle is visible, status is set to false, meaning you DON'T
14 have 100% of the toggles down, unless the visible toggles is of type
15 3, the unflippable toggles */
16 if(tToggles[j][k]->is_visible() != true)
17 iCount++;
18 else
19 if(tToggles[j][k]->iType() != 3)
20 status = false;
21 }
22 
23// If status never got set to false, then all the flippable Toggles MUST be down
24// Got 100% of Toggles down!!!!!!!!!!
25if(status)
26{
27 alive = false; // Basically says current level is over
28 /*snip*/
29}
30 
31/*snip*/
32 
33/* Further along in the update function is this routine. It sees that time is up,
34 so alive is set to false, meaning the current level is over, whether completed or
35not. Then, it checks to see if enough toggles have been toggled to go to the next
36level.*/
37if(gCurrent_Game.pTime_Progress->finished())
38{
39 alive = false;
40 if(!pToggle_Progress->finished())
41 board_game_over(gCurrent_Game);
42 else
43 {
44 /*snip*/
45 //Basically, go to next level flags are set here
46 }
47}

The only hole I can see is if you get all the flippable toggles down, but this is less than the percent needed and time runs out all within 1 logic frame, which sounds doubtful, but I guess possible, however unlikely.

[edit] And seems like something is messed up with the online highscores atm. I checked the database and all the scores are still there, so it's just something wrong with the display. I'll figure it out soon...

------------
Solo-Games.org | My Tech Blog: The Digital Helm

 1   2 


Go to: