Rally 4k (title to be confrimed)

No there is no limit on memory.

I render something like a 3000 x 3000 map scale to the current zoom.

Ok moogie, don’t know if your still checking this thread but anyway…

I’ve progressed some on my racer:

http://stephencarmody.wikispaces.com/Racer4k

How are you going with yours?

Looking good!

I have spent the last few days trying different combinations and tricks to reduce my JAR size…

So far i have removed the mini-map and reduced the car colours to only red and blue. And through many optimisations i have managed to get it down to 4106 bytes. I may yet only have one colour car as i need to impelment the following:

  • collision detection
  • end of race condition and load next track
  • off-of-road detection

I may have to remove one of the track types… i dont want to but i am definitely feeling the pinch in bytes.

I have managed to gain 95 bytes by various methods and in doing so found some interesting “quirks” which i did not know about java. e.g. the first 3 numerical varibles declared in a method are cheaper (in bytes) to access than the rest of the numerical values. This saved me 20 bytes when i made sure that my index variables (i,j) were declared at the top of my method.

The rest of the savings came from heavily reusing variables and changing the embedded map data from mutliple streams into on concatinated stream.

I have also improved the AI a little.

Now i should have room to implement the remaining features and i will be able to post the complete game.

Update

I have added preliminary collision detection and the AI is a “little” smarter… (not much tho)

note the latest jar has not been compressed down.

Haha thats getting to fun to play.

I like how the cars shy away from you if your infront of them. I spent the entire lap just racing ahead then stopping and watching them avoid me at all costs :slight_smile: Then speeding up and repeating it all over again.

Could they drive a little faster?

Looking good though. Oh and whats the deal with the tiling…is the map essentially infinite in all directions? And also I noticed some weird effect on the left of the screen when driving to the right, sort of like a swirly pattern thing going on, but only when driving at top speed.

Yeah, it is fun making them run into you :slight_smile:

The collision detection is still a little if-fy in that they still manage to drive over you eventually. Have to work on that. And it has the assumption that you will never have a head on collision as if you do the “bouncing” is incorrect. Also, you and the car colliding with you are faceing almost identical directions then the bouncing is almost non-existant, which probably causes them to be able to drive over you, This will need to be fixed

They drive flat out on the straight, but slow down to half speed on the long turns and quarter speed on the sharp turns, These figures are purely place holders, once i finalize the AI I will test to see what are the best values.

Also when the pseudo physics is added the type of road surface will effect their top speeds.

Thanks for the compliment, it has been a real challenge to save bytes! I am almost able to say that i will be able to fit all the functionaliy into the 4096 quota… i was not certian for a while there. I just hope i have room for multiple tracks as well!

The map is really only a maximum of 100x100 ( but the current track is nowhere near that size) if you go out of the map bounds there is nothing but grass. It is cheaper to do it that way than to have a boundry!

Yes i also notice the non-drawing of the tiles on the left edge if out side the map, the same occurs on the top edge, but I think i will leave that “feature” in as it does not detract from the game as you really should not be that far off the track :slight_smile:

updated

I have “finalised” the collision detection and have mostly fixed the drive over each other bug, It still does it in extreme circumstances such as hard breaking.

for fun i have left my test settings in the updated version, that is, there are 25 opponent vehicles… it is funny to watch, especially at the end of the lap :slight_smile:

UPDATED: more tracks

There are now multiple tracks to play, in order to get to these tracks you have to win all the previous races.

The opponents are now a little faster on the long turns and should be a little more difficult.

The final game will increase the number of opponents for race.

Does any one know if javagamefactory is offline? i wanted to try and make a webstart version, however i do not have a host which supports jnlp extensions.

OI moogie! Wheres your entry?

I don’t see it on the games list.

Unfortunately my time management skills or lack of, got the better of me for this contest.
All is not lost though, it just means i’ve now got a whole year to perfect my inaugural entry!

Hope the same hasn’t happened to yours. I’m very interested in seeing the finished product.


Stephen

I am actually creating the jnlp file now…

I have managed to get it down to the required 4096 bytes. It has been Extreamly difficult shaving bytes. But i got there! phew!