Simon Says Game

The Partridge Family were neither partridges nor a family. Discuss.
User avatar
Zedtho
Posts: 189
Joined: February 14th, 2017, 7:32 pm

Re: Simon Says Game

Post by Zedtho » July 15th, 2017, 12:04 pm

Will do! Thanks for helping

Changelog Alpha 1.1 (Probably last patch before the final release)
  • Features:
  • Squares are now 2.25 times bigger.
  • Added a TitleScreen.
  • Added a Watch and Repeat thing that tells you what to do.
  • The Squares now light up instead of dimming down.
  • Tweaked some values. (Input can now be given faster, the computer now outputs every 25 frames, still a bit slow though imo)

    Upcoming:
  • Scoreboard
  • Sounds
(Github has been updated.)
(By the way how do I delete a folder on github? There's this nasty plain Simon Says folder with an old broken version of the game on it)
(Also, should the scoreboard be either the number of the round or the number of squares since the beginning the User has gotten right)

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Simon Says Game

Post by albinopapa » July 15th, 2017, 10:52 pm

How about 10pts per correct answer and a bonus of 100pts for each round. First round 10 + 100, second round 10 + 10 + 100 fail on third round 10 + 10 + 0 + 0.

Yeah, using switch statements as states does clean up the code quite a bit. It also helps you mentally organize your code into behavior. I've worked on projects where I was trying to use if statements for everything and it quickly got confusing. That being said, you could also use if/else if/else for states as long as you organize them correctly. For instance, a switch/case block usually only deals with one condition and several possible outcomes. The if statements are normally bombarded with && and || additions. If you were to force yourself to stick with one condition for state and other if conditions inside that then it might not get so confusing.

Code: Select all

// if example
if( state == State::TilePicker )
{
    // only do stuff that deals with picking the tile
}
else if( state == State::TileFader )
{
    // only do stuff that deals with fading tiles like decrement the counter and fade colors
}
// etc
In these cases, the switch/case block is a better fit anyway and can be more efficient.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Simon Says Game

Post by chili » July 16th, 2017, 4:14 pm

Sounds or riot. :evil:
Chili

User avatar
Zedtho
Posts: 189
Joined: February 14th, 2017, 7:32 pm

Re: Simon Says Game

Post by Zedtho » July 16th, 2017, 9:16 pm

I can't find a resource from which I can download it from though :(. Soundbible.com is unavailable

Also, thanks for the answer albinopapa! Will check this stuff out more in depth tomorrow.

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Simon Says Game

Post by chili » July 17th, 2017, 6:08 am

This is what I use the most to snag sound effects.

https://freesound.org/
Chili

User avatar
Zedtho
Posts: 189
Joined: February 14th, 2017, 7:32 pm

Re: Simon Says Game

Post by Zedtho » July 18th, 2017, 4:14 pm

Pre-Release

The Game now has the following:
  • The basic game
  • Sounds
  • Titlescreen
  • Scoreboard
  • Directions as to what to do
The final game should have support for different screen sizes. Currently, I can't get input when I put the game to 1920x1080, but since the graphics are handled with non-hardcoded values,those do work.

The game, as always, can be downloaded from: https://github.com/Zedtho/Simon-Says

(Next up should be the full, and final, release)
(Thanks for the support everyone! The Screen size changing is giving me odd results at the moment...)

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Simon Says Game

Post by chili » July 19th, 2017, 3:07 pm

Dude, looking good. The flash effect on the buttons is spot on. And glad you added sound.

High score is a nice touch. What you might wanna do as a neat challenge is to save the highest score(s) in a file so they can be persistent over multiple plays. Would be a nice mini-task to practice file access stuffs.

Keep up the good work man.
Chili

User avatar
Zedtho
Posts: 189
Joined: February 14th, 2017, 7:32 pm

Re: Simon Says Game

Post by Zedtho » July 21st, 2017, 4:51 pm

Will add that then too. I think I'll have a star next to the highest score in the bottom left, which only gets drawn in the titlescreen. Don't want to have to write out H i g h s c o r e, because I've been making all of my stuff in paint :P

Thanks for all the support!

Tajari
Posts: 9
Joined: July 10th, 2017, 7:42 pm

Re: Simon Says Game

Post by Tajari » July 22nd, 2017, 10:58 am

Damn that is very impressive!

I agree that the flash effect really kicks things up a notch and the sounds are simply bravisimo!

Keep up the good work.

User avatar
Zedtho
Posts: 189
Joined: February 14th, 2017, 7:32 pm

Re: Simon Says Game

Post by Zedtho » July 22nd, 2017, 12:59 pm

Thanks for all the feedback :D

I was thinking of states for future projects and wondered how a state class would look like?
It seems like an enumeration, because those use :: a lot. I am wondering how I would change the state variable, though, since I can only can use one state at a given time. I might be understanding all of this wrong though.

Post Reply