Mine blast

Hi, I’m very new to lua and game development. Just got my ipad2 at Christmas discovered codea and after looking at the examples and doing a bit of reading got started on this my first attempt at a game. It was coded completely on the ipad2. no pc or mac involved.
It’s called mine blast. It has a start, middle and end so complete game but I am planning on breaking out at level 7 and creating a bonus level and then onto a different type of game play using the same mine concept. Anyway the game is simple enough the mines randomly activate you have to touch and hold them down to deactivate them before they explode. Each level gets faster and faster giving you less time to deactivate the mines.

I appreciate my structured coding might not be the most structured :wink:
And may need a bit of refining feel free to add your own levels and refine my code. I’m interested I what you think
and your input/ideas on this.

Only tested on ipad2 using the latest version of codea

Anyway here you go

http://pastebin.com/0ZdDGXCm

Cool. I’ll try it when I have a chance!

2135 was as far as my reaction time allowed me to get.

Did you make drawdigit() yourself? I like the zoom/shadow effect on the text too.

Hi ipda
I took the numbers function from the examples and extended it to include all the characters and yes then i created the draw digit function myself. To be honest the shadow effect was a bit of luck wasn’t quite expecting it to give that result :slight_smile:

Lol ipda41001 2135 are you kidding you need to limber up on the hand / eye coordination I can get to level 8 and a score of 5235. After that it’s just crazy fast. Anyone else out there think they can beat that I challenge you. Anyway on a more programmatic topic I think the randomness of the activating mines in the game is not as random as it should be can anyone help.

My score shows it seemed random to me :slight_smile:

I don’t see a better way to do the random other than using a random seed (which I never do) or using two seperate random seeds. Another alternative is to implement a “skip the first choice if it’s too easy” which could be related to level. Something like alternating between near choices and far choices.