Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

[WIP] Alternator Power: (New working title) Arcade racer for Windows 10, Android and SteamOS+Linux

Discussion in 'Works In Progress - Archive' started by FuzzyQuills, Sep 12, 2014.

  1. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Well, part of the reason is because the car's actually meant to be assembled with two main pieces, with the back piece fitting over the front piece. (That's why some parts are bumpy!)
     
  2. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    ...It's actually not quite finished yet! :D (Still missing headlights, and the emblem on the back's missing too)
     
  3. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,524
    Well then throw that stuff on and give me the keys:). It is looking great. Keep it up.
     
  4. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    LOL. :D
    Sure, once the game's next build is ready! ;)
    It uses a 3-digit encryption key to start the car... :p
     
    Last edited: Apr 29, 2015
  5. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Hello again, an unexpected announcement... A NEW LIGHTING SYSTEM IS COMING!

    I did some reading on Shadowgun's technique for their mobile titles (I had actually read about it previously!) and came across the perturbed normal bit. Then something clicked: why not make all lighting SH?

    Here's my current results, they're actually coming out quite good! (Done in a special side-project though, so the main one doesn't get too messy! :D)
    Here's the car in shadow:
    Unity_2015_05_01_12_49_39_690.png
    And here it is in the light:
    Unity_2015_05_01_12_49_54_209.png
    Unlike the current framework in the game, this is all done with ONE SHADER! (Previous framework used two separate ones) I hope to make it look a bit like the standard shader in Unity 5, only cheaper. Also works with normal maps really well!

    So likewise... CHANGELOG:
    VISUALS:
    - New framework coming soon for better lighting quality and performance:
    see above info for details. The shadows will be re-implemented for this too. (Might even have depth testing, who knows... :D)

    CORE:
    - New car added:
    The Ebony 5 enters the neoDash Grand Prix! ;)
    - Drifting on android fixed: after applying anti-cheat boost incorrectly, the drift button refused to work on the android device. that's fixed now.
    - Relative speed of ALL cars increased: When I did a mock-up of the supposed internal workings of all these cars, I realised that the cars in-game were slower than what they should be, so... I sped them up! (Actual mock-up I might as well post at a later date, will have to scan in the drawings... :D)
    Likewise, now the car's go a fair bit faster! :) Better suited for cars driven by nuclear turbine engines! ;)

    Current Issues:
    - after adding the Ebony 5 to the game, the performance took a bit of a hit with shadows on. likewise, I will probably have to have them either off or on reduced res by default now... :( (Reason is polycount being over 16k!)
    - Some collisions on the Ebony 5 fail when colliding with particular walls (Only a real problem on "The Asteroid Belt" where the first segment is a short tunnel)
     
    Baldinoboy likes this.
  6. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Another shot, this time with the car baked with the scene, again using the ONE shader: (This sort of setup wouldn't be used normally though, for obvious reasons... ;))
    Unity_2015_05_01_14_08_17_154.png
    How's it looking? I also took emission into account, so that the car's neons and headlights still light up. :) (Probably should incorporate that into the emission bits of the lightmapper too, for some nice FX)

    EDIT: Just fixed up the emission combine, it was a little too dark... :D
     
    Last edited: May 1, 2015
    Baldinoboy likes this.
  7. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Ok people... :D yes, the last post was three months ago, that was due to circumstances I won't reveal here. But anyway, some things did change a while back, and I am close to finishing a simpler project, so soon, I will be picking this project up again. :)

    Anyway, a changelog from the last time I posted to now (not much... but worth it):
    VISUALS:
    - The new lighting framework I talked of a while ago was successfully installed.
    The cars are now fully lit by light probes! the layouts on some courses could do with a bit of cleaning up and improvement, but atm, it works well. :)
    - (PRIMITIVE FEATURE) Dynamic reflection probes: atm, I am updating them every second frame, and the framerate's taking a hit from it. (The issue here is that unity's reflection probes as of 5.0.2 are buggy on a mali-400 GPU, and this means I can't use time-slicing!)

    (New category...) BACKGROUND DEVELOPMENTS:
    I was surprised by my cousin a while ago, who gave me a real old Sony VAIO laptop. After restoring it and running it through my usual testing... I discovered that it is FLAWLESS with audio recording, so now I have a better guitar amp setup! (Good ol' Pentium 4s, they really pay off when setup right! :))

    COMING SOON:
    - "Terra Mars" racetrack:
    yea, shortly after May, this project went to sleep, so... anyway, I will be picking up the project and this track again soon.
    - A revamped menu system: yep, the menu's now due for a massive makeover! I have the layout of the game modes in my booklet now, so I will be updating the menu system to match. :)
    - Many improvements that should have been done months ago ;): Any other coming soon improvements, fixes and additions I promised on one of my major posts on page 2 will be considered as I pick this up again. :)
    - A better solution to the dynamic reflection. I may end up switching to baked reflection probes for this, that way, the performance on high texture quality will be a lot better! :)
    - possibly a primitive multiplayer system. I haven't been game enough to upgrade unity just for UNET yet, judging by some of the STUPID bugs floating around atm... :D
    Other things I need to check over, I will have to track down everything that isn't done as of yet. (It really pays to leave something for 3 months... :D)

    ISSUES:
    - Shadows are slightly broken:
    after adding the depth testing, there is a weird cutoff bug on android where the shadows will vanish at certain angles. This may be due to a coordinate space difference between PC and android, as PC shadows work fine.
    - For those who had issues with lightmaps on android: the same issue hit me as well after a while, it's a bug in the directional lightmap keywords, and as a result, I had to split my shaders up again to fix it. Hopefully this is fixed now. (Might even be fixed up already, I only have Unity 5.0.2!)

    And another thing I will announce is that the other project I mentioned above is also a racing game! :) It will be getting a WIP thread (possibly, it may be a little simple for that. ;)) and I also thank you guys for the support so far with this project. :) On top of this, only 10 weeks left, and I am officially out of school, so wish me luck guys! :)
     
    Last edited: Jul 28, 2015
  8. carking1996

    carking1996

    Joined:
    Jun 15, 2010
    Posts:
    2,605
    Please show screenshots!
     
  9. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Sure I can! :) Once I get time today, will upload a few. :) (I'm still in class atm... :D)
     
  10. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Ok, as promised, I bring you screenshots of the game so far!

    Please note that these are all beta screens, and aren't final quality. Nonetheless, here are some screens of the new lighting. :) (There are still bugs in a couple of places, so please excuse those!)
    upload_2015-7-28_21-24-12.png

    upload_2015-7-28_21-26-27.png

    upload_2015-7-28_21-27-37.png

    upload_2015-7-28_21-28-51.png

    The reason why there's only one shot of "On Titan" (the first one) is because I will be going to give that track a bit of a makeover, since it doesn't really envision Titan's distant moon atm.

    EDIT: I also updated the changelog with relevant information.
     
    Baldinoboy likes this.
  11. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Ok people, here's Terra Mars so far:
    upload_2015-7-29_10-59-35.png
    I am yet to add distant geometry to it. (Might even have Earth in the background, although I don't know how far Earth is from mars... will probably be a bright blue star!)
     

    Attached Files:

  12. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    images.jpg
    As you guys may have noticed from the last post's date, I have not worked on this in ages. However, I can now say this isn't dead. It is still alive, and I just started work on it again this morning! :) :D ;) :O

    And I can also confirm that lo and behold, all the slowdown issues in the previous builds have seemingly vanished with an upgrade to Unity 5.4!

    So, changelog for now:
    CORE:
    - Engine upgrade: 5.2.4f1 to 5.4.3f1:
    Yes, you read that one right... :D it also seemed to undo a lot of the problems I had last time I worked on it.
    - Fixed an oversight in the formula for the item bubbles: Now V-Bombs are appearing again.

    RENDERING:
    - Lighting system changed:
    The old MobileAAA, while good for lightprobe-based scenes, wasn't too good for certain things, so it had to go. I currently have a sample project with the new lighting system in it, and it was migrated to neoDash to fix all the issues of the old system. The new system is again one of my own, and is called PhongSurface. :)
    Runs at 60fps on my Samsung Galaxy J1 Ace. (The old tablet I used to test with is that old that the user base for android have most likely moved on from those, so it hasn't been tested there
    - Shadowing system changed: Now it's kinda like Team Fortress 2's client shadows on steroids; it renders the static objects too in one big texture to prevent back-projection. As a result, I got free billinear filtering. :)
    - New 3D model for Slimspace 4: Finally it looks like a car! :D
    - All the lighting was rebuilt: This was mandatory anyway, so I went and fixed up the lightmap settings while I was at it. :p

    KNOWN ISSUES:
    - V-Bombs for some reason keep teleporting players UNDER the stage instead of back on the track:
    I am looking into this as I type
    - The lighting system doesn't take Point Lights yet: I will be implementing a tech called light proxies that basically override the normal lighting parameters with their own. This will allow baked point lights to affect the cars. Currently, the cars look a bit odd in The Asteroid Belt due to this...
    - No pause menu...
    - the HUD is eating the framerate a bit:
    I am attributing this to the fact that some in-game elements still use the legacy GUI. I'll be converting it to full UI system soon. This bug I found by accident when the demo reel started playing itself...
    - Demo reel mode sometimes triggers at the start of a race: The workaround is easy; let it finish, then select everything again, of which should load properly (Upgrading the APK install seems to cause this)
    - Finish line is a little inaccurate: Miraien Tournament handled this better, so it looks like I'll be adding some code from it to correct this oversight.
    - Since switching from MobileAAA to PhongSurface, the infra-red camera isn't rendering at all: The shader isn't yet fixed up to handle the tags in the new shaders, so this won't take long to fix.

    COMING SOON:
    - NEW TRACK: Terra Mars:
    This is the map I posted two years ago in my last post here.
    - New Physics system: This is being tested and developed in a separate project, and will be migrated to neoDash when it is done
    - Conversion to C#: Who still uses JS these days? Apparently, I still did... I switched to C# ages ago though, so this will definitely be happening soon. It may even improve performance, like it did for Jet Rat speedway. Actually, looking at my own two-year-old scripts is that painful to debug, I'm considering a full rebuild of the codebase instead of reusing the existing framework. :-/ Definitely pays to know a lot more than you did back then. ;)

    I'm still working on fixing bugs... and doing the long painful task of converting the project to C# as I type.
    I hope to have some builds ready soon. :) Hope all you guys projects are going well.
     
    Last edited: Feb 3, 2017
    Baldinoboy likes this.
  13. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,524
    Awesome Fuzzy! Great to hear from you man! Glad you are still on this.
     
  14. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Current Bugfixes:
    - V-Bombs are fixed:
    It doesn't teleport under the stage anymore; something must have changed between unity 4.x and Unity 5 that put the coordinates out of whack (Around the Unity 5 upgrade was when the V-Bombs stopped showing up after a coding oversight made it into item_sys so the bug went unnoticed) now it uses it's own position instead of a magic number.
    - Car physics adjustments: I'm slowly moving from direct velocity control to letting the physics engine handle it, so cars roll down hills realistically. It also prevents the "stop dead" oversight on the cars when they land from a jump.

    NOTE: These are some of the last fixes for the old engine; I am about to rewrite the entire codebase to be neater and perform far better than it already is. :) I am sure to get a beta build out soon for comparison purposes.

    I am also considering a new name for the game to avoid yet another copyright issue (I found out a DJ's name is NeoDash Zerox, so that probably won't fly...) so... What do you guys think of "Alternator Power?" :)

    EDIT: Thread title edited. ;) I do hope to get this on Steam if possible, as well as Android (Windows 10 is easy, as I already have a windows dev license) Additionally, I hope to make all three editions cross-platform compatible with each other
     
    Last edited: Feb 3, 2017
  15. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Ok, current ChangeLog for the 2.0 version of the AltPwr engine (previously neoDash):
    CORE:
    - Car physics have been completely rewritten.
    Now drifting and steering are a lot more realistic, and certain oddities in the old engine (rapid speed deterioration in the air for example, as well as an odd flipping occasionally) are gone.
    - Lighting engine completely rewritten: Rather than using my old Spherical Harmonics based MobileAAA lighting, I'm using a new framework I've made. (I have dubbed it PhongSurface at the moment) Features in the lighting engine:
    - Dynamic Objects can have a LightSampler attached to them, of which will pick up directional light shadows by checking if an object is blocking out the sun (this is done using a 1x1 pixel camera, this will also be extended to sample point lights soon if an object enters a special bounding box)
    - Static Objects are lightmapped (can be Unity or Custom, custom isn't implemented yet) and can pick up shadows from dynamic objects by means of a projection map.
    - Dynamic Shadows are handled by rendering Dynamic Objects Black and Static ones white, allowing projection shadows to clip properly (a side-effect is a complete lack of double-projection, as the static object completely wipes out dynamic shadows when said object is behind it in light's POV)

    - NO MORE JAVASCRIPT! As a result, the codebase is a lot cleaner, and performs better, EVEN on mobile. (Mobile controls are not in yet though)
    - 4-sample motion blur: This is accomplished by going half-framerate, sampling the in-between frames, then adding them together in each composited frame.

    FIXES:
    - The Asteroid Belt was re-textured:
    This was to address some long-standing issues with the texture quality, such as emissive parts bleeding out of the polygon edges, and a lack of detail on the road. I also altered the ground texture to be more defined.

    KNOWN ISSUES:
    - The tire smoke will occasionally fire wrongly or continue emitting particles when it shouldn't.
    This is a matter of fine-tuning the thresholds that I have set. (They're all hard-coded, and generally, it's supposed to fire if the brakes are pressed, or if the car's drifting)
    - Sharp-angled collisions occasionally flip the car right over, especially when drifting at the time.
    - The tire smoke fires on all tires regardless of if only one or two are touching.
    This means that if the car's drifting, and goes off the ground on one side but no the other, the smoke still emits from the non-grounded tires. (If they're all off the ground, it doesn't) This is due to how I'm detecting the ground (no raycasts for performance reasons, I'm using Triggers instead)

    I'll have a clip of The Asteroid Belt course coming soon, with the Ebony 5 being the featured car. (It's textures are better designed than the others, hence why I imported it first)

    Another note is that all the lighting/post-process changes also made it into Miraien Tournament 2.0, and will also make it into Project Hovercats (hopefully, the procedural generation makes it a little tricky to do on maps without lightmap generation) Now called Oxion Transonic, my other racer is currently using a brand new framework, which is also going to be ported over to this one.
     
    Last edited: Sep 29, 2017