Search Unity

[RELEASED] Highroad Engine - Arcade Racing solution

Discussion in 'Assets and Asset Store' started by reuno, Jan 19, 2017.

  1. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Guizmostar > If you look at the RaceManager's Update method, you'll see how it updates the UI texts with position and lap.

    From there, you could modify or extend the RaceManager so it outputs to other UI elements of your choice, or hook yourself to the OnUpdatePlayersListDelegate, or get a list of the cars in realtime via UpdatePlayersList() and parse it to display the info you're after.
     
    Corum likes this.
  2. Guizmostar

    Guizmostar

    Joined:
    Jan 21, 2020
    Posts:
    2
    reuno likes this.
  3. huesihues

    huesihues

    Joined:
    Apr 21, 2017
    Posts:
    3
    Hello @reuno,
    I'm testing your app and (PUN 2 configurated, HLAPI installed, High Road imported) gives me this errors while I'm trying to play in multiplayer, do you know what could be the origin of this error?
    upload_2021-4-12_10-47-51.png
     
  4. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    Please contact Photon directly for all errors related to their system.
    They did the highroad implementation, hopefully they'll be able to help you.
     
  5. magnetica

    magnetica

    Joined:
    Jan 3, 2008
    Posts:
    86
    Hi,
    I have the same problem.
    did you find a solution?

    thanks
     
  6. indiedev37

    indiedev37

    Joined:
    Aug 31, 2013
    Posts:
    27
    Following on with this, is it possible to have the nose fall down while in the air, at the moment when you leave the jump it just points up, kinda continuing the ramp angle, i would like for the car to arc in the air so it kinda lands on the front wheels and not the back, would this be possible and do you have any tips on how to accomplish this, i've been playing around with colliders and center of gravity but nothing seems to change it?
     
  7. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @indiedev37 > That's something I'd recommend handling outside of the physics, but rather via a script that fakes this at the model level. This will give you complete control over your visuals without messing with any of the gameplay.
     
  8. indiedev37

    indiedev37

    Joined:
    Aug 31, 2013
    Posts:
    27
    many thanks, sounds like a good idea. I'm thinking to take the angle the car leaves the ramp and invert that over time clamping it so it lands at the opposite angle, that should give the effect i am after :)
     
    reuno likes this.
  9. PiterQ70

    PiterQ70

    Joined:
    Mar 3, 2015
    Posts:
    82
    Hi. I love this asset, but UNET should be done a separate add-on or add #if .. now we need to install UNET as a requirement. You can also add MLAPI support :) Cheers ^^
     
  10. barcode802

    barcode802

    Joined:
    Apr 6, 2014
    Posts:
    36
    Is it possible to use this engine for a destruction derby style game - interested to do one of these with 4 players, all on the same screen, and also supporting AI if not enough players.
     
  11. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @barcode802 > Everything is possible if you implement it, although it's really not designed for a Destruction Derby type of gameplay, doesn't feature any destruction, or any AI that would fit this genre. So overall I wouldn't recommend it :)
     
  12. johnietop

    johnietop

    Joined:
    Jan 17, 2017
    Posts:
    7
    The same problem, has anyone solved this issue?

    I installed the game on few devices and evrything conects, there are other players in the lobby, but no one can change car or press ready because those buttons are not showing, you only see ready buttons from other players but not yours.
     
  13. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    Have you tried contacting Photon about it? It's a Photon error.
     
  14. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @jcjms > In what scene do you get this error?
    Does it happen in a fresh install of the engine, zero changes made? If yes, where?
     
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @jcjms > I'd need more info about the errors you're getting to be able to help, without info it's hard to tell.
    For the asset in itself, install info is available at https://highroad-engine-docs.moremountains.com/ and in the readme in the asset.
    And for PUN extension specifically, there's a PUN Networking Integration Readme.txt in the asset too.
    If you keep having issues, please use the support form and provide a bit more info, I'll be happy to assist you.
     
  16. maxximme

    maxximme

    Joined:
    Aug 18, 2021
    Posts:
    12
    Saw the asset is in the ukraine bundle this month so wanted to pick this up for my racing game as I love MM assets (have the corgi engine and feel, both are awesome).
    Just one question, in the official doc it just says multiplayer is implemented with UNET but as I've read here it seems like it's compatible with PUN.
    How much effort would it be to change the multiplayer aspect to have it running with PUN? Is there a demo with PUN ?
     
  17. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @maxximme > There is a demo with PUN, created by the PUN people.
     
  18. MastaMax

    MastaMax

    Joined:
    Mar 21, 2022
    Posts:
    3
    Ended up buying the highroad engine, it could be great if it was updated with removed unet dependencies as unet has been deprecated for a long while now. Now it takes some time fixing all 70 errors (I don't want to install unet package).

    Update: this is a bit of a let-down compared to all other more moutains stuff... Either you get the deprecated unet package or you spend the first 2 hours cleaning the code and trying to fix everything.
    Installing unet doesn't work in unity 2021:

    [Package Manager Window] Error adding package: com.unity.multiplayer-hlapi.
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()

    Tried to download the tar and install manually and get another error:

    [Package Manager Window] self signed certificate in certificate chain
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()

    Helpful would be a guide to remove unet dependencies.
     
    Last edited: Mar 21, 2022
  19. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @MastaMax > The first page of the documentation explains how to solve these for supported versions of Unity :
    https://highroad-engine-docs.moremountains.com/

    With the changes Unity keeps making to that API, it's unfortunately not possible to support both the LTS versions and the latest release streams, you'll have to stick to stable versions of Unity (2019 or 2020).
    And yes, I agree the current state of multiplayer in Unity is a letdown. I'm not sure I can be blamed for it though.
     
  20. MastaMax

    MastaMax

    Joined:
    Mar 21, 2022
    Posts:
    3
    After fixing all the network errors, I got to play with the engine and it's really nicely made, easy to extend the controllers... Great asset as are all your engines. Would still be great if there was an update with all the unet stuff removed :D
     
  21. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @MastaMax > Sure, as soon as Unity will make it possible to do so, I'll be happy to get rid of all that. Glad you like the engine though :)
     
    MastaMax likes this.
  22. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    Alright, I wasn't super happy with the whole UNET situation, and it was clearly confusing, so I've stripped it. It's a bit sad for people who were still planning on using it, but now that it's way harder to install it on 2021, it's just impossible to maintain, so PUN will remain the only network integration from now on. The good news is, there's a new version of Highroad out! Full release notes for v1.3 :

    - Adds mechanics to enable/disable fog per camera, and an example of that in use in the Aphex demo scene
    - Reworks Aphex demos' visuals
    - Reworks Solid demos' visuals
    - Reworks TinyCars demos' visuals
    - Startscreen overhaul
    - Removes deprecated UNET integration
    - Updates packages
    - Updates MMTools to v3.1
    - Requires 2019.4.28f1 or higher

    PS @MastaMax > Thanks for your feedback on this, let me know if you still run into issues when installing!
     
    shyamarama likes this.
  23. maxximme

    maxximme

    Joined:
    Aug 18, 2021
    Posts:
    12
    @reuno Works like a charm, thanks for the update.
     
    reuno likes this.
  24. maxximme

    maxximme

    Joined:
    Aug 18, 2021
    Posts:
    12
    I'm having a minor issue when switching to URP pipeline. First I changed the camera render type to "Overlay" and somehow it works for offline, but not for online game.
    Also it only occurs on Android, not in the editor, so it's hard to debug:

    camera_error.JPG

    After many tries, I'm not sure it's really the overlay UI camera that has an issue, I tried to force it to overlay 1 second after start, but it didn't help. I then tried to disable the UI camera and noticed nothing was rendrered, so it has to be something with the camera controller. Just curious that this hasn't happened to anyone else (bug is only android online game).

    nocam.JPG
     
    Last edited: Apr 19, 2022
  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
  26. maxximme

    maxximme

    Joined:
    Aug 18, 2021
    Posts:
    12
  27. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @maxximme > The engine doesn't do any rendering, and the camera controller just handles movement, not stacking, that's on Unity's side. As far as I can tell, stacking works fine if you follow the documentation in my previous email, if it doesn't in some of your builds, I'd recommend reporting it to Unity, that's a bug on their end.
     
  28. maxximme

    maxximme

    Joined:
    Aug 18, 2021
    Posts:
    12
    Since it's only in network (PUN) mode, it must have something to do with the code and not the camera config, I'll look in the code what the differences are and post once I found a solution
     
  29. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @maxximme > There's nothing in the engine's code that can have that impact, only camera settings can. My guess would be maybe you're not tweaking the right prefab.
     
  30. MastaMax

    MastaMax

    Joined:
    Mar 21, 2022
    Posts:
    3
    Short update as info if that happens to anyone else, found the error by using the in-game inspector plugin. I had a uicamera active on the online lobby manager, not sure why it's only happening on android but it's an easy fix now.

    Screenshot_20220421-173639_Meta Dragons.jpg

    As soon as I disable it my game is visible again

    Screenshot_20220421-173608_Meta Dragons.jpg
     
    reuno likes this.
  31. happy248

    happy248

    Joined:
    Apr 3, 2016
    Posts:
    3
    Is Highroad Engine-project affecting any general project settings (layers, tags, inputs, graphics etc.) when you import it? If yes, is there a list of the changes made anywhere? Can't find it from the scripts so wanted to check with the forum here.
     
  32. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @happy248 > Yes, it's what Unity considers a "complete project", so it does come with its own set of project settings. They're meant to be foundations to your project.
     
  33. happy248

    happy248

    Joined:
    Apr 3, 2016
    Posts:
    3
    @reuno: Thanks for the quick reply. Is there an easy way of finding out what those changes are? Like are they stored in a project file inside the Highroad folder that I can review? Haven't found anything so far when looking.
     
  34. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @happy248 > It's not really "changes" as they're foundation settings. You'll find all of them in the ProjectSettings folder, and if you're importing in a project that already had settings, your VCS will show you what the changes are.
     
  35. happy248

    happy248

    Joined:
    Apr 3, 2016
    Posts:
    3
    @reuno : Thanks, I will check it out that way.
     
    reuno likes this.
  36. gsurla

    gsurla

    Joined:
    Sep 10, 2014
    Posts:
    9
    I'm thinking of porting the multiplayer over to Netcode for GameObjects and to use Unity Relay and Lobby services. Any potential 'gotchas' I should keep an eye out for or should it be pretty straightforward replacing the PUN specific assets?
     
  37. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @gsurla > It should be as straightforward as in any other similar project/context.
     
  38. earlBK

    earlBK

    Joined:
    Mar 5, 2023
    Posts:
    3
    Hi, the asset locks verry nice! I want to make a little fun racer, but im new in unity. Is it possible for a newbe to ad a Powerup System for mines, rocket and fuell? Greetings
     
  39. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @earlBK > All of these systems would be entirely new and separate from the engine, so implementing them would be as hard in its context as it'd be in any other project. Whether it's "possible" only depends on your skills, only you can answer that question. I'd say anything's possible with enough time and effort.
     
  40. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    528
    Hi reuno, i was using this kit and so far very happy with it using it as a non programmer, but i need to know by script how to get the player ranking and the time it take to finish the race, i try to dig into the racemanager script where it show s the rank of all vehicles, but i didnt manage to get the player infos, maybe some brillant mind in this forum could help me :)

    here the method i suspect i can find my answer.

    protected virtual void ShowFinalRanking(List<BaseController> playersRank)
    {
    // Show final ranking & controls to end
    string finalRank = "--- finished in " + System.Math.Round(_currentGameTime, 2) + " secs. ---";
    for (int i = 0; i < playersRank.Count; i++)
    {
    finalRank += "\r\n" + playersRank.name;
    }
     
  41. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @toto2003 > It's rare that someone asks both a question and the answer to it :)
    You can get the playerRank as it's done in the RaceManager, like so :

    Code (CSharp):
    1. var playersRank = OnUpdatePlayersList()
    2.                         .OrderBy(p => p.FinalRank == 0) // First the finishers
    3.                         .ThenBy(p => p.FinalRank) // Ordered by final rank position
    4.                         .ThenByDescending(p => p.Score) // Then the rest ordered by score
    5.                         .ThenBy(p => p.DistanceToNextWaypoint)
    6.                         .ToList();
     
  42. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    528
    Hey, thanks for the quick answer, your hint kind of work, but i m stuck to get my logic working, the idea is to get the player rank and check if it fail to get into at least the 3rd position then he lose, with my limited knowledge of scripting i manage to assign a tag "player" during the instancing if it s a bot or not, and write something like that to but it doesn t seem to work :p

    Code (CSharp):
    1.         protected virtual void ShowFinalRanking(List<BaseController> playersRank)
    2.         {
    3.          
    4.  
    5.          
    6.             for (int i = 0; i < playersRank.Count; i++)
    7.             {
    8.              
    9.            
    10.                 if (playersRank[i].CompareTag("Player") && playersRank[i].FinalRank>3)
    11.                 {
    12.                    
    13.                        
    14.                         Debug.Log(" u lose ");
    15.                     }
    16.                    
    17.              
    18.             }
     
  43. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @toto2003 > No, indeed that code won't work. You'll want to create a dedicated class/system for that, that method on its own won't do much, and not what you described.
     
  44. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    528
    i thought i got the solution with this code but no luck , i m sure i was pretty close

    Code (CSharp):
    1.    
    2.                 foreach (BaseController player in playersRank)
    3.                 {
    4.                  
    5.                     if(player.tag=="Player" && player.FinalRank>3){
    6.                                        
    7.                    
    8.                        
    9.                         Debug.Log(" u lose ");
    10.                     }
    11.                     else{
    12.                         Debug.Log(" u win ");
    13.                        
    14.                     }
    15.                    
    16.              
    17.                 }
     
  45. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    528
    ok i see, then i ll try what u recommand, kind a force me to dig deeper into code, but it s not a bad thing :)
     
    reuno likes this.
  46. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    528
    ok for some reason the code above works for me, so i m gonna keep it that way, i m happy enough and it does the job :)
    i notice i got a bug while playing with multiplayer, everything work fine after few session, but when i go back to local player, the game freeze, it s not happening if i restart and choose playing local first, not sure why, if anybody has similar bug and know how to fix that, i m interested, i m using unity the latest 2022 lts,
    cheers!
     
  47. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    528
    Hi reuno, i have some error when using the latest unity 2022 lts, any idea how to fix this error?
    here the error log
    Assets\HighroadEngine\Common\Scripts\Lobby\UNet\OnlineLobbyMatchEntry.cs(5,30): error CS0234: The type or namespace name 'Match' does not exist in the namespace 'UnityEngine.Networking' (are you missing an assembly reference?)
     
  48. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    Maybe you forgot to install the Multiplayer HLAPI package?
     
  49. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    528
    reuno likes this.
  50. BlackManatee

    BlackManatee

    Joined:
    Jun 13, 2013
    Posts:
    82
    Bummer! I've been using HRE off and on for many years, as my go-to framework for racing mechanics. I've been developing my current project in U2023.1 for several months, so it's not feasible for me to switch back to U2021.

    Is there any solution to the missing Multiplayer HLAPI bug, or should I just switch to a different racing framework (I have Arcade Racer plus a couple of other packages -- not as user friendly but at least they work in u2023)?