Hey guys, I wanted to share this little project I started to help me learn about Codea. I am hoping some of you will have time to look through it or test it out for yourself and play it. I’d like to learn from any feedback you all may have and also help other beginners learn as well.
EDIT: Here’s the new version of “Simeon Says”: https://gist.github.com/mcoggin/a92928c949f0fa4ab798
If you long-press on the project tile in codea, you have a popup menu, that proprose ‘copy’. Select ‘copy’ and paste the result here => the 4 tabs will be included and it is much easier to copy/paste for us. Thanks.
Hi @Matthew I just had a quick go with this and its great, simple design and didnt find any bugs, a few ideas though:
- Make the buttons a bit lighter when theyre off.
- Make a dialog box pop up or something along those lines saying when you’ve lost a life.
- Put the score in the top bar of the HUD?
Thanks @Luatee! You’re absolutely right. I have to decide which way to go about improving the game now. For your suggestion #1, I am stuck between simply creating a table of specific colors and having them be randomly chosen for each square, or getting more complex and learning about sprites to replace the basic rect(). I am leaning more towards sprites because this project is all about learning Codea. What do you think?
Choosing whether or not to learn another feature of Codea is also relevant for your second suggestion. I think I need to learn how to make use of tweens to properly code events like player feedback. I could set another timer like the wait() function does in Main, but I really think the whole goal of tweens is to make event systems and animations much more robust. Am I wrong?
As for #3 I am honestly not sure how to score the player! Lol! I let my girlfriend play this and she got to level 31 on her second try. I was so impressed by that and I also realized that the level number seams sufficient for scoring the player.
Thanks again for your time!
Well you could create sequences at random, I guess the best way to do this would be to create a table and add one to it for each level and make it a random number between one to four to select a tile then save it to a temporary table to restore and add a random tile for the next level. iDraw is a good app for making art and sprites, you could easily create the original Simon says table layout or make your own and add a twist its up to you.
As for the score, create a variable and add to it each level with a multiplier (could just multiply it to the level number) and then use text to display it in the HUD. Happy to help, if you need a small example just ask.
Oh it does create sequences for Simon on the fly during the game using table.insert. What I meant was right now, colors are being randomly generated for each square’s fill color and only the alpha is adjusted when the square is active. To improve this (i.e. make it look better), I think I’d either need to create a set of specific colors to chose from when initializing the squares and keep the alpha system, or create a set of sprites instead. My inclination is to go with sprites because I’ll have to learn more. In fact, I’d love to turn this little project into a nice tutorial for beginners as it has helped me grow as well.
I am totally going to check out iDraw! Thank you for suggesting that. And am I on the right track with using Tweens for the “lost a life” alert? I haven’t researched that part of codea yet but it seems relevant.
@Matthew fun version of Simon says Great first project in codea! btw I lost at level 17!
@Matthew the colours will look better if you take 50 from each r,g,b value not the alpha, this is what I use to make a button pressed look… iDraw is an expensive app and there are others like it, I think that is the best one though… You can use the normal fill() to change the colour of the sprites if you made say 4 white triangles or whatever shape buttons you want.
@matthew, great game! The colors are a bit off though as others have stated. I had one square that was black and its highlight was a dark purple and I could barely tell if it lit up.
I got a suggestion for scoring. Add in a variable that keeps track of the total time the player uses throughout the game. Don’t include the time that Simon uses. Now if two people lose at the same level, you can compare the time it took them to get to there. For instance if I complete levels 1 through 20 and lose at level 21, then my score would be:
Time: how long it took to beat those 20 levels
Lower times are better of course.
Excellent suggestions guys! I really appreciate the feedback here. @Luatee that solves my color problem! No more alpha. @Slashin8r, thank you! That’s a great idea for keeping score! Probably I will add in a penalty for losing lives too.
Does anyone have any suggestions for learning about Tweens calling events in the draw loop?
@matthew you know what? You could call this game ‘Simeon Says’ in honor of our guru!
The first time i read it i thought it was “Simeon” instead of “Simon”.
@Jmv38 totally going to! Great idea! So about those Tweens…anyone?
Hey guys I added tweens for animating the squares and providing player feedback, learned about multi-dimensional arrays to organize the squares in a grid mathematically. I created a list of colors and sounds to make the randomness a little less random and I added a splash start screen and a game over screen. I’m really proud of this first little project in Codea. If anyone wants to browse through my code and point me in the direction of better programming practices and optimization that would be really helpful. Thank you for all your time and suggestions. @Jmv38 Check out the new title
@Slashin8r that timer was really fun to implement thanks for that suggestion!
@Luatee I made the changes to the coloring of the squares and that was fun to implement as well. I ended up going further with the sounds and made a strict list of sound DATA to use. Check out the SoundTable Class.
@matthew wow this game is looking great. I love how you increased the difficulty by going beyond 4 squares.
Thanks a lot @Slashin8r! Animating those squares was really fun to learn how to do. I had to learn how to handle embedded tables and the algorithm to make the grid do what I wanted it to.