Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  Top Down Racing Game Applet  (Read 11288 times)
0 Members and 1 Guest are viewing this topic.
Sticko
Guest
« Posted 2007-12-08 22:39:08 »

Hi all,

Been working on a car racing game.  All comments are much appreciated!

http://www.brasurf.com.au/CraigsRace/



Cheers,
Craig.
Offline moogie

JGO Knight


Medals: 12
Projects: 6
Exp: 10 years


Java games rock!


« Reply #1 - Posted 2007-12-10 22:22:08 »

Looking good.

It does seem a little hard to control... that or my reflexs are really bad Tongue
Offline thijs

Junior Member




Lava games rock!


« Reply #2 - Posted 2007-12-10 22:45:05 »

Cool game, with a little bit more work this could be a really nice game to play!

I was pleasantly surprised by the map rotation, combined with zooming ala GTA 1 (zooming out at high speeds / in at slower speeds) it would work out even nicer I think.

PS: I noticed short pauses / sudden accelerations while playing... probably a thread blocking that causes your gameloop trying to catch up?

<a href="http://www.dzzd.net">3DzzD!</a>
<a href="http://www.arcazoid.com">Arcazoid!</a>
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Sticko
Guest
« Reply #3 - Posted 2007-12-11 13:55:29 »

Looking good.

It does seem a little hard to control... that or my reflexs are really bad Tongue

My car physics are a little off.  Drives a little like a hovercraft!   Grin
Sticko
Guest
« Reply #4 - Posted 2007-12-11 14:01:36 »

Cool game, with a little bit more work this could be a really nice game to play!

I was pleasantly surprised by the map rotation, combined with zooming ala GTA 1 (zooming out at high speeds / in at slower speeds) it would work out even nicer I think.

PS: I noticed short pauses / sudden accelerations while playing... probably a thread blocking that causes your gameloop trying to catch up?

Zooming!  Brilliant!  Can't believe I didn't think of that!  I'll get started on it.  Thanks for the idea.   Smiley

The pauses / accel...  Yea.  I have one thread for the game loop and drawing, running at 30fps, and the EDT is left to do the the user input and whatever else.  But, if the PC can't do 30fps, then it'll all go bad.  Will have to think about how to fix that.  Roll Eyes
Offline jojoh

JGO Knight


Medals: 5
Projects: 7


games4j.com


« Reply #5 - Posted 2007-12-11 18:30:23 »

Get stuck at "Creating cars ... " WinXP, Java 1.6, FF 2.0   Sad

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #6 - Posted 2007-12-11 19:11:37 »

Works well here: WinXP, Java 1.6.0_03, Opera 9.24
I found the controls to work pretty actually.
Still it was quite hard, and within half a lap the opponents were out of screen. Would be nice if the opponents would adapt their driving to my own skills so hat I would still feel like i'm in the race after 10 secs  Smiley

All in all, a good start!

Sticko
Guest
« Reply #7 - Posted 2007-12-12 03:53:46 »

Get stuck at "Creating cars ... " WinXP, Java 1.6, FF 2.0   Sad

Sometimes my Internet connection is rather ... sub optimal.   Roll Eyes  I also need to jar up the main contents, which should improve things.   Smiley
Sticko
Guest
« Reply #8 - Posted 2007-12-12 03:57:29 »

Works well here: WinXP, Java 1.6.0_03, Opera 9.24
I found the controls to work pretty actually.
Still it was quite hard, and within half a lap the opponents were out of screen. Would be nice if the opponents would adapt their driving to my own skills so hat I would still feel like i'm in the race after 10 secs  Smiley

All in all, a good start!

Currently the other cars are just replays of the fastest people.   I think my mate Cam set most of the records!  My server will delete each time after it's 7 days old.  However, I totally agree, the player needs to feel like they're winning, so I think I need computer cars.  Oooh ... that's not going to be easy!!!    Shocked
Offline jojoh

JGO Knight


Medals: 5
Projects: 7


games4j.com


« Reply #9 - Posted 2007-12-12 13:24:03 »

Hey, got it to start! Quite cool game. I thought the control of the car was quite nice. It has to be skidding a bit to be fun, and a nice twitch with the grip/pit stop thing. Boost runs out a bit too fast IMHO. I also noticed the pause and super catch up effect.

Currently the other cars are just replays of the fastest people.   I think my mate Cam set most of the records!  My server will delete each time after it's 7 days old.  However, I totally agree, the player needs to feel like they're winning, so I think I need computer cars.  Oooh ... that's not going to be easy!!!    Shocked
Maybe instead take the best player and then select players evenly spread out to the worst (or at least a quite slow one), so that one can place somewhere other than dead last all the time  Tongue AI cars and collision detection would be nice though.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline noblemaster

JGO Ninja


Medals: 20
Projects: 10


Age of Conquest makes your day!


« Reply #10 - Posted 2007-12-12 19:43:22 »

It's cool  Grin   I actually like the fact that your race against previous players! No real need for AI.

Offline stephencarmody

Senior Newbie




Java games rock!


« Reply #11 - Posted 2007-12-12 21:31:12 »

Wow, I didn't realise the bra boys had a website :-)

...and your hosting a Java game off it, nice!

BTW, the game is pretty good. Id like to see a ghost car of my (i.e. the players) best lap. It could be coloured slightly differently to the other ghost cars.
Offline cylab

JGO Ninja


Medals: 38



« Reply #12 - Posted 2007-12-12 21:38:20 »

The real opponents are great. To make it more challenging for different skilled players, you could split up the difficulty in different "leagues" (slowest 10%, average drivers, top 10) and make an evenly spread selection of 9 opponents in this leage. Thinking of this, you could easily implement a carreer mode this way. Lets say you split your recorded players into 10 groups, so a beginner would start in the first group and has to achieve at least a top 3 place before he can advance to the next better group of racers. This could actually be quite motivating.

Mathias - I Know What [you] Did Last Summer!
Sticko
Guest
« Reply #13 - Posted 2007-12-13 15:37:42 »

Wow, I didn't realise the bra boys had a website :-)

...and your hosting a Java game off it, nice!

BTW, the game is pretty good. Id like to see a ghost car of my (i.e. the players) best lap. It could be coloured slightly differently to the other ghost cars.


Naa, the website it mine (and I'm not a bra boy).  I just made it so I can check the surf off my balcony when I'm at work.  Grin

Great idea with identifying the winning ghost car.  Will defo do that.

I noticed you recorded 2 VERY fast race times!  Geez, I'm being beaten at my own game!!!   Smiley Smiley
Sticko
Guest
« Reply #14 - Posted 2007-12-13 15:42:17 »

The real opponents are great. To make it more challenging for different skilled players, you could split up the difficulty in different "leagues" (slowest 10%, average drivers, top 10) and make an evenly spread selection of 9 opponents in this leage. Thinking of this, you could easily implement a carreer mode this way. Lets say you split your recorded players into 10 groups, so a beginner would start in the first group and has to achieve at least a top 3 place before he can advance to the next better group of racers. This could actually be quite motivating.

Great idea!  And the beginners times would be wiped often, so the fast laps would disappear, while the experts would stay up for longer.   Love it!   And I don't have to do computer cars!!!   Grin
Offline stephencarmody

Senior Newbie




Java games rock!


« Reply #15 - Posted 2007-12-14 00:39:56 »

Quote
I noticed you recorded 2 VERY fast race times!  Geez, I'm being beaten at my own game!!!

Yeah.... *dusts imaginary fluff off shoulders*....I found some "unusual" physics. Are you going to use this forum as your main medium of communication regarding this game? I noticed you also have a blog but it seems inactive. I love this style of game and had actually started making something similar myself a couple of years ago. Unfortunately i'm too much of a perfectionists and can't managed to actually finish anything.  Have you ever played or heard of a game call Slicks 'n Slides? I wasted many hours when I was younger playing that with my brother and friends (up to four players at the same keyboard). For its time that game was awesome.

PS. I'm might have another go of your game now and see if I can beat my own best time :-) I reckon something in the 2:01's is possible!

<edit>hehe did it</edit>
Sticko
Guest
« Reply #16 - Posted 2007-12-14 01:57:59 »

Yeah.... *dusts imaginary fluff off shoulders*....I found some "unusual" physics. Are you going to use this forum as your main medium of communication regarding this game? I noticed you also have a blog but it seems inactive. I love this style of game and had actually started making something similar myself a couple of years ago. Unfortunately i'm too much of a perfectionists and can't managed to actually finish anything.  Have you ever played or heard of a game call Slicks 'n Slides? I wasted many hours when I was younger playing that with my brother and friends (up to four players at the same keyboard). For its time that game was awesome.

PS. I'm might have another go of your game now and see if I can beat my own best time :-) I reckon something in the 2:01's is possible!

<edit>hehe did it</edit>

I made that other blog before realising this site existed.  So, yea, this will be the main blog.  Oh yea, Slicks ruled!  I remember not all keyboards could handle having 4 people pressing at least 2 keys each.

I see your new fast time.  I just put in position labels on the players name, so now I know which "Stephen" car to chase!!!   Thanks for that idea BTW.   Smiley

<edit>Finally!  I beat your time!  Took me many attempts!   Cheesy  ...I think I'm a little competitive!  Smiley</edit>
Offline markus.borbely

Junior Member





« Reply #17 - Posted 2007-12-14 09:44:52 »

Very cool game, works like charm (macbook pro with mac os X leopard). But I seem to be very bad at it, I accelerate all I can and use all the boost, but even then I'm way behind the others.
Sticko
Guest
« Reply #18 - Posted 2007-12-14 15:40:40 »

Very cool game, works like charm (macbook pro with mac os X leopard). But I seem to be very bad at it, I accelerate all I can and use all the boost, but even then I'm way behind the others.

Sweet.  It works on a Mac.  ...I think that's good...   Wink

I'll be putting in skill levels, where you first start against easy opponents.  The speed against other players should be the same for everyone as it is based off frames drawn.  However, if the system clock is not accurate, the overall gameplay could be faster or slower.  Thanks for the testing and info!   Smiley
Offline stephencarmody

Senior Newbie




Java games rock!


« Reply #19 - Posted 2007-12-16 22:12:52 »

Just got fastest driver, a 2:01 flat, yes I beat you again Sicko!

Yeah a varying skill levels would help people, otherwise as the times of the top 8 get quicker and quicker it will seem more impossible to new players. And for competition sack I'll drop a few hints on getting fast laps:

1) Probably the most important thing is to drive in a straight line for as long as possible. Making small twitches and corrections where you should be driving straight actually slows down your car quite a lot (i'd say more than is realistic).

2) Now im not sure if this actually helps as I don't think it was used for any of the current top 8 times, but if you use boost around corners you actually gain grip. That means if your angle of entry into a corner is not good you can correct without penalty by using a little boost. But as I said this ultimately wanted help getting fast times as boost is best to be used in conjunction with the point (1)  i.e. straight line speed plus boost is very, very fast.
Offline SwampChicken
« Reply #20 - Posted 2007-12-17 11:11:15 »

I was cutting lawn more than actually racing....  Embarrassed
(also got lapped about 5 times)

lol
Sticko
Guest
« Reply #21 - Posted 2007-12-18 03:26:25 »

Just finished putting in levels!  Yay!   Smiley

You can jump to levels when you discover the unlock codes.  Here is an example of the level 2 unlock code:

http://www.brasurf.com.au/CraigsRace/

I kept all the fast times and put them on the final level.

Again, all comments are much appreciated!

Cheers,
Craig.
Sticko
Guest
« Reply #22 - Posted 2007-12-18 07:28:08 »

Just got fastest driver, a 2:01 flat, yes I beat you again Sicko!

Not anymore!!!  Just did a 2:00.73!!!   Maaan.....I was so nervous of messing up the last lap (like Cam and Andy did).  I'm still shaking!!!!

PS:  To jump to Level 7 where the fast times are, enter the unlock code: 7000
Offline SwampChicken
« Reply #23 - Posted 2007-12-18 12:00:01 »

Just tried again..... managed to finish a race this time... Grin

Sticko,
How are you saving the routes of the top 10 players to replay/race against them?
(It must be more complex than saving an array of points cause I've seen then skid off course and stall like I do.. hehe)

Good game though.

One suggestion - make the cars a bit bigger (double their current size?)
Offline halfwitgoat

Junior Member


Projects: 2



« Reply #24 - Posted 2007-12-18 20:42:51 »

2:00.86. Not quite top, but at least I managed not to mess up the last lap this time.  Cheesy

I love that you can play against other player's times. More games could do with this.

Andy.

Sticko
Guest
« Reply #25 - Posted 2007-12-18 21:43:35 »

Sticko,
How are you saving the routes of the top 10 players to replay/race against them?
(It must be more complex than saving an array of points cause I've seen then skid off course and stall like I do.. hehe)

Nope.  You're spot on.  These are the attributes on my data class:
   private char elapsedFrames;
   private short x;
   private short y;
   private short direction;
   private boolean firingRockets;

I also do some compression, so when the race is over, I make sure there are no more then 1000 points.  Eg: If there are 3000 points recorded, I'll create another array taking every third point and save the fact that I took every 3rd point.  Then on loading, I workout the missing points by doing stuff like this:  int x = ((ph2.getX() - ph1.getX()) * loop / compressionNum) + ph1.getX();

I also have smarts in there so if you've stopped, it doesn't keep recording points.

Oh, and finally, I also zip the data before sending too.  Doing this reduces the size to around 10K per replay.

One suggestion - make the cars a bit bigger (double their current size?)

Yea, I'm going to try to do zooming, so when you're going slow, it's zoomed right in, but when yor flying along, it's zoomed right out and you can see a long way ahead on the track.  ...I hope my maths skills are up to the challenge!   Grin
Offline stephencarmody

Senior Newbie




Java games rock!


« Reply #26 - Posted 2007-12-20 08:28:47 »

I've been away for a few days, but don't worry I beat all your times again :-) My level 7 time broke the 2min barrier. *runs into kitchen for the some ice to jam fingers in*

I don't quite understand the level system, what's stopping me from recording a sub 2min time at level 1?

Keeping with your configuration of 8 top laps per level and 7 levels, I would have implemented levels by keeping the data of the top 56 laps. The player would start their first race in the level 7 bracket against cars 49-56. Their recorded time for that race would slot into the overall 56 best laps (if the times good enough) and their next race would be against the bracket of 8 times that their last time slotted into. i.e I recorded a 2:02 in my first race, so the next race I should have is say in level 6 against cars 9-16.

But anyway its still a great game, as is proof by my repeated returns to reclaim top honours.

Sticko
Guest
« Reply #27 - Posted 2007-12-20 09:54:49 »

I've been away for a few days, but don't worry I beat all your times again :-) My level 7 time broke the 2min barrier. *runs into kitchen for the some ice to jam fingers in*

I don't quite understand the level system, what's stopping me from recording a sub 2min time at level 1?

Keeping with your configuration of 8 top laps per level and 7 levels, I would have implemented levels by keeping the data of the top 56 laps. The player would start their first race in the level 7 bracket against cars 49-56. Their recorded time for that race would slot into the overall 56 best laps (if the times good enough) and their next race would be against the bracket of 8 times that their last time slotted into. i.e I recorded a 2:02 in my first race, so the next race I should have is say in level 6 against cars 9-16.

But anyway its still a great game, as is proof by my repeated returns to reclaim top honours.

Unbelievable!!!  I didn't think sub 2 mins was possible!!!   Shocked

Times posted on lower levels will only last for a certain amount of time.  Level 1 is only 1 hour, level 3 is 1 week. Level 7 is permanent.  If the time is not permanent, the time will be deleted if it is the oldest time and all the grid positions have been filled.  Thus, good times will fall off the top scores.  When enough people play it, theoretically, it will get harder and harder as you go up levels.

I thought about doing what you suggested, however, that would mean cars would be starting on top of each other on the grid....but maybe that would be better as I'm not sure how many people will have the patents to work through all the levels?

Multiple tracks are coming soon, so ice up those fingers!   Grin
Sticko
Guest
« Reply #28 - Posted 2007-12-20 11:48:46 »

Hi all,

Just coded in zooming (like GTA had), however, I didn't make it automatic, as it felt funny and hard to drive.  So I made it manual with +,- keys.  Let me know if you find any issues with it.   ...you can now zoom out and watch the whole race to see peoples pit stop and boost strategies!   Grin


http://www.brasurf.com.au/CraigsRace/

Cheers,
Craig.
Offline stephencarmody

Senior Newbie




Java games rock!


« Reply #29 - Posted 2007-12-21 10:32:22 »

I played the game twice today, the first time the zooming was tied into the speed of my car which I must say was not helping me with the lap times. The second time I played, you must have made another change to the game as the zooming was no longer tied to the my car speed, as I could freely zoom in and out to a level I felt comfortable with. Also I noticed the boost key has changed. I was having problems with the spacebar locking up the input before, so I like the change to the ctrl key.

I was getting worried that Cam's 1:59:94, a mere 0:0:01s faster than mine previous, was unbeatable. Thankfully my dominance has been restored with a 1:59:73. I wonder if a sub 1:59 is possible?

Stephen
Pages: [1] 2
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

CogWheelz (11 views)
2014-07-30 21:08:39

Riven (21 views)
2014-07-29 18:09:19

Riven (14 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (32 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (42 views)
2014-07-24 01:59:36

Riven (42 views)
2014-07-23 21:16:32

Riven (29 views)
2014-07-23 21:07:15

Riven (30 views)
2014-07-23 20:56:16
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!