Search Unity

Games Hover craft project - full source available!

Discussion in 'Works In Progress - Archive' started by Kurt-Dekker, Oct 13, 2018.

  1. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,735
    hopeful, khos and Antypodish like this.
  2. RobsonCozendey

    RobsonCozendey

    Joined:
    Oct 19, 2013
    Posts:
    69
    Feels fun!

    Looks like a great down-river canoeing simulator.
     
    Kurt-Dekker likes this.
  3. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,735
    Hey, that would work pretty nicely... if you have a moving mesh collider on your water, it should actually bob around correctly, or so I would imagine.

    One of the other hacks I was thinking about for racing is when there is a turning input, actually bend the repeller scripts slightly outwards, so that there is some cornering help. Might make it feel better.
     
  4. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,776
    There was old game late 90's ealry 2000's (I don't remember name :( ) where you had hovercraft from isometric point of view. Then you had maps terrain with some bridges, park-out etc. And you fought between other hovercrafts. I was thinking of recreating game, but always was taking detour to other projects

    You have nice tuned hovering.
     
    Kurt-Dekker likes this.
  5. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,735
    Man, that just sounds like a game I wanna play... :) Isometric view, one analog stick to control motion, two types of shots: minor and major... DO IT!

    Or maybe I will in this demo project...

    Thank you. I think to use it "for reals" in the above game I'd add some kind of uprighting script that would kick in if your tilt angle got beyond a certain amount, just to encourage crazy jumps and stunts.
     
  6. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,776
    It was really fun game. And you could play on split screen too ;)
    I miss lot of games from older times. I don't see many concepts used in today's game scene. Because of commerce, lot of original concepts are buried somewhere in deep pail of repeated concept over and over.

    If you up for this, I suggest, if you make a terrain. with few hills and maybe river / lake. Then add some obstacles. But if you can keep it simple thats what you need.

    Unfortunately my main project is quite a bit off, to achieve this atm. But funny said that, just last week I started just a prototype for testing things, which is also about hover crafts ;)

    Not to hijack your thread but I am going to plump it here. I want to do fw more basics things, before some first vid showcase.

    upload_2018-10-16_19-46-33.png

    This one is actually on the "planet". So can fly/hove around the globe.
     
  7. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,735
    You can never have too many hovercraft... bring it on!
     
  8. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,735
    If I read your image correctly, the game lets you assemble your own hovercraft from those pieces? Neat!
     
  9. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,776
    Yep, thats correct.
    But I must be careful with a project, I like go astray often, adding too much. ;)
    This one I try keep reasonably minimalistic. But already a bit overgrown from initial concept :p
    For now I keep it on.
     
  10. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,776
    I looked into your SimpleHoverRepeller.cs out of curiosity.
    It is interesting, you don't actually use controllers like PID.

    I think that works perfectly for fixed mass, like in your project.
    I doubt to be anyhow effective in my case, as mass can change at any time, during game play.
     
  11. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,735
    This is the story with all projects. Embrace it!

    I dunno, I think my simple repellers could work fine... try hand-editing the rigidbody weight in the hovercraft scene and you'll find it handles fine from about 0.1 mass to 2.5 mass. Beyond that it scrapes and drags a lot, as one might expect... just jack up the repellers!
     
  12. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,776
    Yep, I need put hammer above my head, to drop it, if I start going too far. I decided to put this project as mile stone, and treat it as trial / prototyping, for later bigger project, which funny, I got quite far with it already. So taking few steps back. (not the first time tho :p)

    The thing is, something need to control how much repellers need to be added. I use PI in fact, to control throttle force, against altitude, for each of hover jet. Adding, removing blocks changes the mass and Center of Gravity.

    I run number of test in past. For what I require, I did try even simple approaches like yours. But always run into instability. But for now PI does the job. In fact, when I was working on thrusters controled space craft, I used neural network. That works great ;)

    I suppose, altitude is not critical in your case, so force can be gestimated and tuned once. Providing mass is constant.
     
  13. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,735
    Think of it more like the springs in your car. If you drop a giant piano in the back of your car it will probably ride a little bit lower, that's all.

    This was another hovercraft game I made years and years ago... I oughta dig it back out and build it for WebGL, but this is the old .unity3d web engine of yore:

    http://plbm.com/lowpoly_landspeeder/lowpoly_landspeeder.html

    Now you too can "... go to Tosche Station to pick up some power converters!"

    20181016_lowpoly_landspeeder.jpg
     
    Last edited: Oct 16, 2018
  14. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,776
    Seams like started with nice concepts.

    On side note, it is interesting you put other tech demo on your game demo too.
    I think concept is something worth to expand upon, with your new project.
    I would make bigger, more variety landscape, for more players to hover about.
    But basics for racing you have there.
    Just add some guns ;)

    Yep that what I would expect.
    Only that, in my project I need handle none, or multiple pianos at same time, without much lowering hovering alt ;)
     
  15. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,735
    @Antypodish I am curious how your neural net operates. Is it only active for "training" right after you change the shape of your vehicle, or is it always active balancing the vehicle by changing the repellers "live"?
     
  16. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,776
    I use NN in other project. For spacecraft 3D gimbal controller.
    But with aim for also dynamically changing constructs, just like presented hovercraft. I need expand upon that part of project at some point.

    I am considering implementing NN in recent project too, if I will be needing it too for AI, or position (like GPS) stabilization, if PI(D) will be not enough.

    However to answer your question, NN for now requires to be trained after structure has changed.
    But depends on complexity, my accelerated training took roughly 2-3 min. So is not that long. For hovercraft where complexity is lower, this would be likely much faster.
    Yet may not be suitable for training in real time, when for example propulsion blocks has been just added, or destroyed.

    What could be done, is to train multiple controllers, with different propulsion configuration, which can be switched based on condition, if some hover propulsion has been destroyed.

    There are few other options with NN, but I would stick on above for now.

    Just for side note, I don't need prior-collected set of data, to train.
    Controller can trains itself, knowing nothing about propulsion configuration.
     
  17. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,490
    An idea, but would you want to simulate real rapids etc, buoyancy? :)
     
  18. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,735
    You could probably use triggers to cause things like eddies and cross-currents: just define them in the scene and make a script on the craft that senses when it is inside one of them and applies the right forces.