Computer Science Canada

Cool Game

Author:  A.J [ Fri Nov 14, 2008 6:32 pm ]
Post subject:  Cool Game

Here's a game I coded when I was bored out of my mind....

Moving - directional arrow keys
Objective - to collect all the points before the enemy catches you
Special features - cool shimmering affect, enemies crash when they collide

please comment Very Happy

Author:  SNIPERDUDE [ Sat Nov 15, 2008 4:45 pm ]
Post subject:  RE:Cool Game

Cool effects and whatnot, but why does it speed up when I come close to an enemy? Is it because their acceleration speeds up or does it just happen that way?

Cool game though.

Author:  S_Grimm [ Sat Nov 15, 2008 5:31 pm ]
Post subject:  RE:Cool Game

A suggestion : Keep track of how many enemies you vaporized.

A Comment. Great game. the effects of the enemies blowing up was spectacular.

Author:  A.J [ Sat Nov 15, 2008 8:46 pm ]
Post subject:  Re: Cool Game

Thanks for the comments SNIPERDUDE and A\V Mr. Green !

SNIPERDUDE wrote:

Cool effects and whatnot, but why does it speed up when I come close to an enemy? Is it because their acceleration speeds up or does it just happen that way?

Cool game though.


This is because I move the enemy using trig (I get the arctan of the angle formed between the player and the enemy) and i have a 'speed' attached to every enemy. This speed is calculated as follows:

enemy.speed = max (2, 250/(distance between player and enemy))

This means that the closer the enemy is to you, the faster it moves. And to ensure that the enemy never stops moving, I make it's speed 2 if 250/(distance between player and enemy) < 2.


AV wrote:

A suggestion Keep track of how many enemies you vaporized.

A Comment. Great game. the effects of the enemies blowing up was spectacular.


Funny you say that, cuz I just added that today!!!

I was thinking about adding more features, but I need some ideas....


Cud u guys help me out?

Thanks a bunch Very Happy

Author:  DanielG [ Sun Nov 16, 2008 3:30 am ]
Post subject:  RE:Cool Game

You could make the game more interesting by you being able to lay mines, which can act like the enemies, only they don't move and don't kill you (only explode when an enemy lands on them).

I can't think of anything else now, or any restrictions to the above to make them work well (improve the game, not to allow infinite mines or too few).

Author:  A.J [ Sun Nov 16, 2008 12:14 pm ]
Post subject:  Re: Cool Game

thanks DanielG...thats a great idea! Being able to place mines of some sort before the game starts...I'll look into that...

Author:  copthesaint [ Sun Nov 16, 2008 4:02 pm ]
Post subject:  RE:Cool Game

Good game
To make this harder why not increase the size of you 'man' circle thing ;p; by like the curent points you have so if you have 5 points increase the size of your 'man' 5 points *5
So it's bigger 25 on x and 25 on y

Author:  A.J [ Sun Nov 16, 2008 4:37 pm ]
Post subject:  Re: Cool Game

copthesaint wrote:

Good game
To make this harder why not increase the size of you 'man' circle thing ;p; by like the curent points you have so if you have 5 points increase the size of your 'man' 5 points *5
So it's bigger 25 on x and 25 on y


cud u be a bit clearer, copthesaint?

Author:  copthesaint [ Mon Nov 17, 2008 8:45 am ]
Post subject:  RE:Cool Game

You know the yellow circle you use to move arround?

When you obtain a point make the yellow circle a bit bigger and make the collition range a bit bigger also.
then maybe that would make it harder + It would be a good effect.

also if you wanted you could make the level bigger.

Questions.
Is this a project for marks?
Are you releasing code?

Author:  petree08 [ Mon Nov 17, 2008 9:26 am ]
Post subject:  Re: Cool Game

pretty cool,

The blur effect has been used alot on this site (meh i've used it alot to , found it on the forces source code)

quick question are you finding slopes or vectors when you calculate the AI's path?

here is an example of attraction using slopes that i posted a while back

http://compsci.ca/v3/viewtopic.php?p=129442&highlight=#129442

Author:  S_Grimm [ Mon Nov 17, 2008 11:26 am ]
Post subject:  RE:Cool Game

what copthesaint means is everytime your point count goes up, your radius of the player also goes up. I think that having it go up by 1 every time the player gets a point would make it too large, maybe every 2 or 3 points?

Author:  A.J [ Mon Nov 17, 2008 3:48 pm ]
Post subject:  Re: Cool Game

copthesaint wrote:

You know the yellow circle you use to move arround?

When you obtain a point make the yellow circle a bit bigger and make the collition range a bit bigger also.
then maybe that would make it harder + It would be a good effect.

also if you wanted you could make the level bigger.

Questions.
Is this a project for marks?
Are you releasing code?

Sure, I'll add that and see how it is. Thanks Very Happy
And, no, this is not for marks. Its just a small game that took me a about 30 min to code (without including coming back to the program and adding changes). I will release the code if people want to see it.

petree08 wrote:

pretty cool,

The blur effect has been used alot on this site (meh i've used it alot to , found it on the forces source code)

quick question are you finding slopes or vectors when you calculate the AI's path?

here is an example of attraction using slopes that i posted a while back

http://compsci.ca/v3/viewtopic.php?p=129442&highlight=#129442


I take the arctan of the angle formed from the enemy to the player. I then increment enemy(i).x by round (cosd (e (i).angle) * e (i).speed) and enemy(i).y by round (sind (e (i).angle) * e (i).speed).

Author:  petree08 [ Wed Nov 19, 2008 12:54 pm ]
Post subject:  RE:Cool Game

very nice, i used slopes in my earlier days but angles are a lot nicer to work with .

Author:  SNIPERDUDE [ Wed Nov 19, 2008 6:05 pm ]
Post subject:  RE:Cool Game

angles are a lot better to work with than slopes.

Author:  A.J [ Wed Nov 19, 2008 10:13 pm ]
Post subject:  Re: Cool Game

SNIPERDUDE wrote:

angles are a lot better to work with than slopes.


I agree Very Happy

Author:  DanielG [ Thu Nov 20, 2008 10:02 am ]
Post subject:  RE:Cool Game

yes, I recently remade a game made by a friend of mine two years ago, and without angles it would be nearly impossible.

Author:  SNIPERDUDE [ Thu Nov 20, 2008 10:26 pm ]
Post subject:  RE:Cool Game

Well then, Yay for Trig!

Author:  A.J [ Sat Nov 22, 2008 12:24 am ]
Post subject:  Re: Cool Game

DanielG wrote:

yes, I recently remade a game made by a friend of mine two years ago, and without angles it would be nearly impossible.

u talking about the "Tank Wars" game? cuz that DOES need A LOT of angles.


: