Jump to content
Corsair Community

[Game] Dodge the Enemies Space Game


t3hlazy1

Recommended Posts

I recently discovered that Corsair released the SDK, so I was tinkering with it yesterday. I don't want to release the code right now, because it's super hacky and poorly written, but I may do a rewrite and release it then. I'll be glad to talk about the code or how I did something in the comments or PMs.

[ame]

[/ame]

Features:

Character movement

Random enemy spawning

Random enemy speed

Score tracking (displayed by the MR Key getting brighter and brighter, for now)

Collision detection

Game over

Game restart

Game exit

To Do:

Moving background

Better score tracking

Increasing difficulty

Shooting ability OR no impossible sequences (way too tough to code though)

Power ups?

 

Thanks!

Link to comment
Share on other sites

Thanks guys!

Here's the code: http://pastebin.com/9H1LTn9R

I just opened one of the example projects, deleted its main function, and wrote my own.

My main critique with the code is the up/down detection. To fix this, I plan on rewriting the code to loop with a 1ms delay, instead of 75ms, but only do the game stuff every 75ticks. Not a big challenge, but I don't have time to do it right now.

Also I want to write a function like:

addToLedList(LedId, R, G, B)

that would iterate through the list of Leds already added, and, if the LedId has already been added, would either overwrite the old value or just do nothing.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...