Jump to content

[WIP] Cyberlympics Racing


marcgfx
 Share

Recommended Posts

this is a project I've been working on for quite a few years. It's changed drastically over time. I originally wanted to simply see what is possible with html5. I still had a lot of graphics from a previous unfinished project, so it was a pretty easy start. I wanted to make an AI-battle thing, where coders could compete with little tanks. The whole game was built with html and javascript, using soundmanager2 for sound. It worked quite well, but there was not much interest. So I decided to make it into a racing game... I guess its something between micro-machines and mario-kart.

 

Tech:

I'm no longer building complex div structures, instead I am using WebGL. Soundmanager2 has been replaced by WebAudio.

 

Multiplayer:

The game could support up to 8 local players, but who has that many input devices.... Currently It's limited to 4, but will only work sensibly on NKR keyboards or with gamepads.

I've not dived into networking yet, so Websockets and Node.js are also very interesting for me. I'm frequently wondering if it's even possible as the game is very fast and small changes could have quite an effect. If anyone has any cool solutions for network-multiplayer I would gladly hear them.

 

Issues:

My main problems at the moment are the UI, performance, monetising, too many ideas and finding enough time. The UI is difficult, as I want to support keyboard/mouse/gamepad/touch, my current solution is much too busy and I hate it. Performance is an issue, because my current AI uses way too many resources and my shaders seem to be too complex. I have taken steps to mitigate this but on some devices there will be stuttering. 

 

Link:

http://data.cyberlympics.com/html/nav.html

 

141209screen.jpg

Link to comment
Share on other sites

Great work you have done.  I really dig this. The art is really cool, maybe add more detail to the road.

 

You say you want this to be like Mario Kart? Where are the bananas and turtles? Haha. Try to implement some sort of destruction among cars. Get more maps, bigger maps. I enjoyed playing this with the keyboard but got bored after 2 play throughs on that same track.

 

Nice job with the ghosting and lap times. Very cool.

 

Just so you know the last cart could not be played on a keyboard.

 

You UI in game is great so far imo. Keep it big, visible as you expand things. Straightforward so you don't have to search for things. It is a racing game after all.

 

For multiplayer implementation you are not restricted to Node. You can use anything really, so leverage what you have experience with.

 

As for making money, your primary goal should be the game design as a whole and keeping people interested to play. If you have an audience, you can make money. For now I would suggest getting some more maps, and implement a combat system like mario kart. Hell...be prepared to switch the views all together. I am not sure if that is a big deal or not. 

 

Once you have done that there are a world of more possibilities. 

 

BTW the music was great.

 

Well done.

 

:D

Link to comment
Share on other sites

thanks for the feedback :) . I don't really want it to be just like mario-kart, but I can't deny a lot of inspiration for the extras comes from it. There are not that many unique ideas I have added so far.

 

maps: there are already unlimited different kinds of maps. but it's not that obvious due to my shitty game-selection UI (one of my problems). bigger maps are possible, but I cant make them too crazy, as this could be quite taxing on performance. currently I don't have any kind of frustum culling, so the entire map data is sent to the GPU. Implementing frustum culling could actually hurt my performance, as I would need to do a lot of additional calculations in javascript.

 

networking: the thing is, everything is implemented in javascript so far. If I wanted to do the calculations on the server, I would likely have to use node.js so I dont have to rewrite the whole thing. but currently I don't dare tackle this. I am mostly concerned with how I would handle lag, I think it could get complicated very quickly. I haven't really done any real-time networking, so my experience is very limited.

 

As for making money, your primary goal should be the game design as a whole and keeping people interested to play. If you have an audience, you can make money. For now I would suggest getting some more maps, and implement a combat system like mario kart. Hell...be prepared to switch the views all together. I am not sure if that is a big deal or not.

 

making money is more of a side-quest. considering how much time I've invested, I would not be completely against it :)

what do you mean by combat-system? are you thinking of the arena-style modes? It's something I have also been thinking about, but I would need quite a few different extras e.g. weapons. It's very hard to accurately target an opponent in this top-down view. there have been some experiments (still on a racing track):

141222blasting.gif

 

What do you mean by switching views all together?... I think I just understood while typing. One single view for all players right? Yeah thats very possible :) and would make sense for an arena battle! thanks for the input :)

Link to comment
Share on other sites

thanks for trying it out on so many browsers. unfortunately I have no idea what the issue could be :( . I develop using chrome and I'm most astonished it actually works on IE :). Currently it seems to work for me on mac/windows using chrome/safari/firefox. 

 

when you say light don't go to red. do they stay black all the time? it cant be a shader/graphics issue, as you can see something (one person only got black). sounds a bit like a javascript error. what I have had some times, is that the AI does not load, so the opponents don't start. I guess there is some fixing still to do. thanks for the feedback!

Link to comment
Share on other sites

thank you very much milton, I have found the faulty code thanks to your description. I recently had to implement my own doppler effect, as the feature has been deprecated in webaudio. for this to work, I calculate the speed of objects relative to the listener. when the speed is zero, my code results in a NaN value.  I then try to set playback rate of audio to NaN. for some reason, this causes no issues on my system. thank you very much for your help, I have updated the build (will require a forced refresh, I obviously have not handled updates well yet).

Link to comment
Share on other sites

Yep, works now. 50+ FPS on Chrome, so that's a lot more relaxed, looks pretty smooth. How do I skip to the results once I've won? Usually I have to wait quite a long time before all the AI drivers are in :)

 

The mode I usually like best is Timetrial btw, racing against the lap record (ghost driver).

Link to comment
Share on other sites

I got really confused with the screen where you select the car, I really wasn't sure what I was doing. Maybe that's just me. I think the UI needs to be reworked in general (made prettier + easier to understand).

 

Regarding the gameplay, the sound was really bad on Firefox. The game itself is pretty cool, I can only imagine how much work has been put in it. Only thing I'd suggest is to add more effects (smoke, tire prints...), and enable drifting (it didn't seem to be possible).

Performance seemed good to me.

 

Keep up the awesome work ;)

Link to comment
Share on other sites

@milton: thanks for trying again, glad my fix helped (as I could not test it myself). waiting for AI drivers is annoying, I have been thinking about just making a cut after a few seconds when the last human player finishes. thanks for reminding me :)

 

@remvst: thanks for trying! UI is my largest bane at the moment. I hate it too. I've been working on a new UI system, that should support all kinds of input devices. I hope to get some work done on this soon. tire-prints is something I would really like to add, but it would have to be something I don't use on slow systems. The amount of polys added could be quite massiv. as it does not have much impact on the game itself, it has very low priority though. on some tracks you can see dust, but thats surface dependant. drifting can also be done on surfaces with less friction, or with other types of cars I am working on :)

Link to comment
Share on other sites

  • 2 weeks later...
I've had a really hard time redesigning the GUI. The solution so far was way too complex and condensed too many features into a single screen. As I wanted to support all kinds of input-devices (gamepad, keyboard, mouse, touch), the design had to be much simpler. The new GUI does not yet have all of the functionality of the old one, but I hope to add features later on.

 

previous:


 

new:


 

I've also updated the vehicles you can use (only 4 from this screenshot):

150501cars.jpg

the others are still not well implemented and very hard to handle. The AI also does not know what to do with them.

Link to comment
Share on other sites

thanks :)

 

today I refactored gamepad/keyboard input. the gamepad code tended to interfere with the keyboard, now I can switch between them with no issue (I hope).
 
I then noticed my doppler-effect was no longer working for the engine noises and went about looking for the issue. turns out I had messed up some code, by trying to find a bug introduced in the newest chrome webaudio implementation. damn :(
while I was working on the noise, I decided to redo the engine sound, I think its better now?
 
I had recently read, that shaders really hate branching (if(...)else..) and tend to go through all possible paths. as I only use two shaders for the visuals, I have a ton of branching. The worst code I have is for the background/track. it contains code for noisy merging of textures, fraktal generation code (mandelbrot, julia) and other shenanigans. loads of parameters and tons of branching. so I split that shader into background and track related stuff, also forcing another draw-call. I then killed all fraktals and shenanigans. In the end I believe it payed off, as its now running acceptably on my macbook with the highest settings.
 
while splitting the background/track stuff, I added 3 very simple shaders to visualize the 3 layers (background, track, objects)
150504layers.jpg

 

http://data.cyberlympics.com/html/nav.html

what I would love to know:
- engine sound has been overhauled, annoying or ok?
- I have gamepad support, does anyone use gamepads? I would be interested to know how the game feels to you.
- I've finally reworked the menu. some features are still missing, but it works with any input method and should be easier to handle. what did you think?
- shaders have just been updated, it should run faster now. did it run smoothly?
- I've added some default tracks, did you find them boring?

Link to comment
Share on other sites

First of all, you have a brilliant game here, please continue development. Engine sound is fine, and everything runs smooth.

 

On my 3rd level in championship, my opponents didn't start. I do like a head start, but this :)

 

problem.jpg

 

(I get 404's on http://ai.cyberlympics.com/data/neuroevolv_4/RaceBumble/2.txt and 9.txt).

 

I would try to make it have a more arcade feel. No technical info on what you're loading, and show some cool graphics in your menu/while loading.

Also, I'd like to get out of the rough a bit easier, sometimes I get stuck too long :(

 

Have you tried playing slicks/death rally? I wonder what games you use as reference.

Link to comment
Share on other sites

I've had that once myself, that opponents didn't start. will have to look into it, but could be quite difficult to find the reason. possibly the game starts before the AI has loaded. thanks for the bugreport :)

 

Arcade feel, sounds like a good idea. The cool graphics could be a little more difficult :) ... I'm quite good at creating the assets/vehicles, but its fairly low detailed stuff. I would love to do it, but I do not really feel up to the task.

 

there is a trick to get out of the rough: don't do anything for a second and you get placed back to the last checkpoint.

 

I don't really have active references. I just started out making the racing game using the engine/assets I had created. The top-down perspective makes it a little micro-machines like (that I played ~15 years ago) and the extras are a homage to what I remember of mario-kart on the super nintendo.

 

thanks for trying milton! 

Link to comment
Share on other sites

  • 5 months later...

a lot has happened since the last time I posted here. I will be updating more frequently, as so far this has been the most responsive/receptive forum :)

what have I been up to? well quite a lot to be honest...

 

- the main menu has been redesigned again

- I customized a font, looks way cooler I believe

- I've been working on network preparations, but it still stinks badly

 

someone said jumps would be cool, so I added them. then I removed jumps again, as the AI had no idea what to do and they were more annoying than fun. maybe later... the code is there now.

151006jump.gif

 

I was told my colors were way too saturated, now I can manipulate them with shaders.

151012saturate.jpg

 

tire tracks have been added when braking or sliding

151012ice.jpg

 

 

a playtester could not find out how to fire extras, as there was absolutely no information on how to handle the cars... so I finally added keyboard setting back.

I'm still having a hard time with handling multiple keyboard settings. my current situation:
 
the default 4 keyboard layouts:
123 789 arrows+the block above, number-blockqwe uioasd jkl 
 
now I've added an additional one for single-player (and people who might just hope to find the right keys):
arrows, hold space bar to turn sharply
x: extra (c,v are currently configured for shooting and special-attack, but no vehicle can shoot atm)
 
this causes an overlap, but the overlap is limited to the arrow keys, that do the same in both cases.
 
I needed some way to inform the user about the keyboard situation, so this is what I have come up with:
151016keysOpt.gif
green highlight: two of the settings use the same keys for the same thing
red highlight: two of the settings use the same keys for different things, we have a problem
 
what do you think about the keyboard stuff? too complicated?
Link to comment
Share on other sites

151021spider.jpg

still cleaning up a lot of stuff. not the most fun work, but has to be done.

I got some feedback about my levels being a bit dull, no movement in the environment. so I added a few spiders with very simple AI, to see how the engine would handle it. works pretty well, but it wont be something I want to put in the game :)

maybe I should make a game, where killing spiders is the goal?

Link to comment
Share on other sites

reworked the track shaders, here are new examples of muddy tracks:

151026mud2.jpg

 

made some visual improvements for the extras. I noticed it could be hard to tell if something activated. I'm still not sure how to handle the + symbols (speed-up) and the dumbells (mass increase -> makes you more resistant to getting pushed by other cars and you can knock over trees easier).

then I turned off some of the extras for the AI. slow-downs and time-stopping are reserved for human players. it's a little unfair, but it's just not much fun waiting and driving slowly... maybe because it happened way too often when a lot of players were active.

 

then I opened a can of worms and changed things involving sliding on ice/oil -> I had to change tons of parameters for all the extas. still fine tuning...

my next bold move was changing speed-up placements and the placement of the starting line. as the tracks are procedural this changed all my current levels, not all for the best. but it had to be done.

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...