Search Unity

Games Midnight Streets - Racing Game

Discussion in 'Works In Progress' started by Stephen_O, Nov 10, 2019.

  1. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    Game Name (pending): Midnight Streets
    Genre: Racing
    Style: Open World / Story Driven
    Target Platform: PC
    Players: 1
    Description: A single-player-focused racing game. Race through the midnight streets against unexpected rivals in a fast paced story driven game. Don’t get left behind..

    Hello, my name is Stephen. I'm working on a racing game. In this thread I'll share my development progress. Let me know what you think, thanks.

     
    Last edited: Dec 2, 2019
  2. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    Today I pick up where I left off.. I setup OBS for a higher quality recordings so I can record gameplay. With that out of the way, I can now play and share the Unity project while I talk... here's the start of the prototype.

     
  3. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    Today I worked on the player profile system and story introduction scene, in short, I made sure they work and lead to the open world scene with the correct data.

     
  4. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    Today I'll share a short requested tutorial for my workflow with Road Architect in Unity to procedurally create road networks the fast, free and easy way. This is a great tool and available on github.

     
  5. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    Today I worked on the base logic to control the players progress level. I setup a level manager that will enable the appropriate level controller, player spawning, and player event trigger logic.

     
  6. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    379
    Nice work bro, graphics are very sharp, nice shader support. Have you addressed the occlusion culling and LOD type aspect for performance?
     
    Stephen_O likes this.
  7. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    Thank you.

    I'm using CScape from the asset store, it's a highly optimized procedural building/city generator. I love it..

    I'm only using the buildings from CScape, since they are procedural it can make 1000's of variations and due to the awesome shader it uses they render in a single pass - I don't think they will need any optimizations.

    I've not done much world/content design yet, so no actual optimizations like OC or LODs yet either. Once I get the main game loop setup I can focus more on the open world design. What I've shown so far in the open world was the initial prototype test, just to make sure my idea can work.
     
    warthos3399 likes this.
  8. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    379
    I like it, as CScape uses "few one-pass shaders/materials for a whole city landscape. This results in a extremely optimized performance while using Static/Dynamic Batching or Occlusion Culling. (approx 60-160 drawcalls for a city that covers a surface of 10 km2)"
    As long as you have OC set up and running, and batching set up, you should be good to go :)
     
    Stephen_O likes this.
  9. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    I'm looking forward to actually doing the world building, I want to see how far I can push it. It's great to be able to have such high quality buildings at such a low performance cost.
     
    warthos3399 likes this.
  10. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    Today I'm working on completing the core game loop, here's my progress and some insight to my thought process and approach.

     
  11. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    Today I finalized the progression system flow and merged the art and code projects together. I'm experiencing a fairly long load time, so I will need to figure out how to bring that down through optimization.

     
  12. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    Note to self: Do more test builds..

    In the last video I was concerned about the time it took to load into the open world, it was actually just the Unity editor overhead. Testing a build resulted in much faster load times... lesson learned, do more test builds!

     
  13. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    Today I worked with Character Creator 3 from Reallusion to create a test avatar for dialogue and setup a script to test and control blend shapes in Unity.

     
    eluukkanen likes this.
  14. eluukkanen

    eluukkanen

    Joined:
    Oct 1, 2015
    Posts:
    26
    Lovely that you have very frequent updates. What music are you going to use for the racing game?
     
    Stephen_O likes this.
  15. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    Thank you for contacting me, I'll keep you in mind.

    I've had too bad of an experience purchasing music from the asset store to use their music, that's for sure; in the past when I was prototyping a lot, I bought a music pack, made a demo with it, posted it to YouTube, then it was copyright claimed by the publisher of the audio. It took 1 month to be released and dozens of emails, I contacted Unity support, they said since I purchased it more than 6 months ago they won't do anything. When I asked about the EULA, they said they can't control what the publisher does. Ironically the publisher's work was removed from the store immediately after I contact Unity support. I was sad to find out UAS treated customers so poorly in a situation like this.

    That being said, I appreciate your connection, and I may reach out to you in the future. Knowing that a real person is on the other side that supports you is something I value.
     
    eluukkanen likes this.
  16. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    Today I worked on testing my dialogue concept. I brought the NPC into the introduction scene and configured more pages of dialogue using the actor with various poses and expressions..

     
  17. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    In this session I worked on improving the game introduction sequence and setup the player start in the correct place based on which intro option was selected.

     
    eluukkanen likes this.
  18. jamespaterson

    jamespaterson

    Joined:
    Jun 19, 2018
    Posts:
    59
    Looks really cool. Good luck with your project!
     
    Stephen_O likes this.
  19. eluukkanen

    eluukkanen

    Joined:
    Oct 1, 2015
    Posts:
    26
    Excellent to see you work on this actively. Nasty to hear your experiences on purchasing music packs. That is why original music (that won't get claimed, is important to have)

    Keep it up!
     
    Stephen_O likes this.
  20. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    Today I focused on the player UI. I added a mini map and rear view mirror as well as adjusted the open world dialogue box location.

     
  21. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    I setup a pause menu and mini map to scale into a scroll-able player map when the game is paused. I also share some advice for other indie developers who might feel like their work is a struggle at times.

     
  22. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    379
    @Stephen_O We really appreciate what your doing here, as your dev-log really does help others. Game is looking great bro. I try and stop in and check out how you are doing with progress when i can, but have been busy as hell with my project.

    Keep kickin!
     
    Stephen_O likes this.
  23. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    I'm happy it's helpful, I don't see a whole lot of people sharing their day to day progress when showing projects, to me all the details are what I'm most interested in. It'll also be good for me to look back on once I finish the project to see how it all came together...

    I've been looking at recent posts for your project, it looks like your pretty far into it. It'll be an interesting thread to read through when I take the time, I'll try to jump in and say hi.

    Thanks for all the encouragement!
     
  24. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    6,434
    This is because not many has time to do so.
    There is only certain amount of hours in a day. Video need getting relevant resources, then editing (in fact, it appears, you have little editing on your vid). In that time, some features could be written for a game, or resolved bugs.
    Some people don't have tools, or experience for making such logs. Or simply don't want / don't bother. Also, there are many people, which English is none native language. Which often makes such vids less appealing. Good thing in your vid is, you got good diction and are clearly and concise presented.

    It is nice to see such logs however.
    But I would like to ask, if you don't mind, how much time you spend on making game on a day vs recording + editing + uploading?
     
    Last edited: Nov 18, 2019
    Stephen_O likes this.
  25. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    I don't spend much time if any on the dev log or video editing, I think of it as just that, a quick log of my progress and thoughts for the dev session. I'll turn on the camera software and record my screen while talking about what I worked on, usually a single take with no edits. I'd say it's no more than an hour to record, edit, and upload. I'm not a good editor, so I won't try to do anything extra, my main goal is to make a game, so I focus most energy on that.

    I spend about 4-8 hours on actual dev work, I usually don't try to work fast, but I do try to have a good idea of what I want to accomplish before I sit down to work each day. My goal is to move the project forward every day, even if it's just something small and placeholder. I do feel I can be more efficient (being efficient creative and productive at the same time is hard), and that's what I personally hope to learn after making this game and viewing my logs with hindsight.
     
    Antypodish likes this.
  26. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    I did a first pass on the first race/event, it needs a lot of work. In this video I share my thoughts about the current progress and what I need to do to improve it.

     
  27. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    379
    @Stephen_O "I don't see a whole lot of people sharing their day to day progress when showing projects, to me all the details are what I'm most interested in."

    Totally agree, personally Dev work has increased, but fun. If i was to do a dev-log, it would steal time that i could be doing more important things. But love seeing someone like you that can .balance that out :). I do try to post details when i can.

    Thnx, yes, im 7 months in and have at least 5 more months to go. Really like what your doing, brings back some memories....rock on :)
     
    Last edited: Nov 19, 2019
  28. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    Yeah, if I felt like the dev logs would cut into my dev time, I doubt I would do them. For me it's not much effort and more of a benefit than burden, I literally never write anything down... and it's nice to have someone to talk to about the project, even if it's just a camera ;).

    Memories are great.. indeed, rock on!
     
  29. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    In this dev session I worked on improving the first event/race scene and AI racer behavior. The core game loop is now complete, next step would be to fill in the missing pieces.

     
  30. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    Today I'll discuss what led me to start this game a few weeks ago, as well as share today's progress on improving the quality for the current game loop.

     
  31. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    379
    Your NOT in over your head, your dev time frame is long, probably because of real life, as you mention quotes in "years".

    Its good to get away from store assets, grab your #^*'s and run with what you got.
    Develop this game at all costs, great concept, and implimentation.

    DO THIS Stephen_O, you got this...and if ya need help, give a shout, lots of us around to help :)
     
    Stephen_O likes this.
  32. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    Thanks ;) and yeah, real life/work has to come first.. student loans and monthly expenses are no joke!
     
    warthos3399 likes this.
  33. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    379
    Totally understand... :)
     
  34. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    Today I setup a game logo and mostly focused on UI work. I added a couple new fonts to the project, and improved the UI presentation of the race scene.

     
  35. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    Today I spent some more time improving the UI. I also do a deep dive into the racing system logic to explain how it works.

     
    Antypodish likes this.
  36. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    Performance is the topic. What I have, want and need for the AI traffic system. A lot to consider for ECS, but I think the work might be worth it...

     
    Peter77 likes this.
  37. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    Today I'll do a detailed demo to breakdown the logic that goes into the AI cars and traffic system. My goal is to optimize the code and improve performance using the C# job system.

     
  38. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    WIP Testing the C# job system and burst, first pass showed a 10x improvement for logic that was updated. This and minor optimizations let me scale from 100 cars to 350 and retain 60fps.

     
    Antypodish likes this.
  39. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    I've started to use the C# job system by converting my AI traffic logic from MonoBehaviours to a data structure. The results are worth it, still more opportunity with ECS... 700 AI Cars, this is cool!

     
    warthos3399 likes this.
  40. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    6,434
    Nice result.
    I know you mentioned, there is still space for performance improvement. However, I haven't spent time looking into presented code, but I am sure, you could easily squish even further multi-thousands of car AIs with DOTS. :)

    Well done.

    Do they just drive randomly about? Or they got some arbitrary destinations?
     
    warthos3399 and Stephen_O like this.
  41. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    Thanks!

    I was inspired by the megacity presentation, so I'm sure it's possible to achieve the level of optimization that supports thousands. I'll likely go for some ECS tests next to see how close I can get since it's worth it in the long run and I'll likely want to iterate on this game's design once it's finished.

    It wouldn't be hard to assign designated routes, but I'd have to have a need first; they're currently random and based on available route-points linked to route-points. I think that could come into consideration when I plan the story and custom logic for a given progression-state/level.
     
    warthos3399 likes this.
  42. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    6,434
    That's good. No stress about it. Just asked out of curiosity. And your approach seems be logical.

    Yeah, Megacity is nuts :)
    For size of city you got atm, it looks like pretty busy town anyway.
     
    warthos3399 and Stephen_O like this.
  43. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    Yep, no stress, that's just how I talk. :)
     
    warthos3399 likes this.
  44. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    379
    With ECS and DOTS youll do just fine. Keeping AI car system and main racing system seperate is a good idea, more control. I always disable V-Sync to get correct/better FPS readings. Love the new job system, even though you CAN have 700 cars, whats the actual amount of cars planned for the game?
     
    Stephen_O likes this.
  45. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    At this point I don't feel like the traffic system will hold me back in any way, previously I thought it could.

    I'm actually not going to do more optimization on the traffic system, I'd rather focus on world building instead of trying to get more with ECS. The main goal was to optimize the logic of traffic code, being able to scale up from 100-700 in a test scene is a big improvement. Traffic vehicles no longer do unnecessary calculations, now they only have exactly what they need to move around. I'll likely be setting up some type of pooling system once the world is built and move cars around the map as needed. When I started the optimization, I was struggling to get good fps in my game scene with 60 cars.

    Interesting to note, disabling vsync allowed me to get 180fps in editor with 5ms on cpu instead of 60fps at 18ms, so under that setting it's likely that I can get much more cars if desired. I think more people are starting to use hardware with gsync or freesync. A vsync toggle in options will let players unlock the freamerate if they have appropriate hardware. If they don't, at least I know I optimized the code using C# job system and burst compiler.
     
    warthos3399 likes this.
  46. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    I've been working on testing occlusion culling, building placement, a sky and scene lighting; I'm trying to get all of the core systems and design elements into place for a first pass.

     
  47. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    I'm working on setting up new AI traffic prefabs with head/tail lights, they'll need optimization. I also started to add some trees and grass to some areas.

     
    Peter77 and Antypodish like this.
  48. jamespaterson

    jamespaterson

    Joined:
    Jun 19, 2018
    Posts:
    59
    Looks good! If you want a *lot* of vegetation rendered quickly i can recommend vegetation studio, especially the pro version
     
  49. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    I'm using VSP, I love the performance!
     
    jamespaterson likes this.
  50. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    942
    I had to replace the Enviro asset with a more performance friendly setup; a standard skybox, screenspace clouds and some volumetric haze. Result was a huge performance gain..

     
    warthos3399 likes this.