[prototype] another space game

edited in Projects
Hi there,

Here is a basic prototype of a game I'm working on (no real gameplay elements yet). Its yet another space game. The controls are wasd for movement. Rotate your ship with the mouse. Left click to fire. Left/right arrows to switch weapons. Mouse wheel to zoom. Hold shift for a speed boost.

Gamepad controlls (only tested on PS3 controller so far):
left axis - move ship, right axis - move cursor to rotate ship, R2 - shoot, L2 - boost, left/right arrows - change weapons, up/down arrows - zoom in/out

It started as a experimenting with Arongranberg's A* pathfinding plugin for unity, to see how it handles path calculation on a dynamic navmesh. This build is only to test the pathfinding of the AI ship. The AI ship will constantly follow the player's ship, and try to avoid obstacles (asteroid, other ships, etc). When the obstacles moves around, the navmesh will regenerate around the intersection.

You'll notice there is also a larger ship. Right now it doesn't serve much of a purpose other than to demonstrate its destructibility. You can shoot the different parts, which will eventually break of. I'm currently working on functionality which will allow the player to construct the big ship.

Update:

WebGL

Windows 10 build

OSX build

Comments

  • @petrc Very cool, there can never be enough space games.

    I gave it a play and had to load up a second time before I saw the AI Ship. I must have instinctively killed it the first time I played without realising... the lighting and particle effects are very cool. I like the different weapons as well, they feel different from one another.

    I find it interesting you're using A*/NavMesh in space. I know it's a test. I would have gone for a raycast obstacle avoidance thing.

    I also recently tested Arongranberg A* test, but it uses grid and not NavMesh.

    When you add more features, please add a windows build if you can. :)
  • Thanks for the feedback @konman.

    Yes the current build is very basic. I'm hoping to get more gameplay features in soon. The particle effects is from a plugin I got on the asset store, but yes I agree its quite fun play with. Later on I will tweak these effects more (size/rate/colour) to create a larger set of weapons to choose from.

    As for the A*, like I said before it was mostly an experiment, which has turned out quite interesting. However, it has its limitations like the grid size, and it can get quite performance heavy with many elements. I will look more into the raycast obstacle avoidance.

    Here is a video of how the A* grid recalculates in case your interested.


    I will try get the new build out soon, and then I'll also make the windows build.
  • I will look more into the raycast obstacle avoidance.
    Flocking algorithms might be the way to go. They're built around raycasting, and can result in interesting intelligent-seeming group behaviors.
  • @petrc
    Interesting idea :)

    Looking at your video, are you using the "grid" graph type?

    If so, try using the "Navmesh" graph type:
    http://arongranberg.com/astar/docs_dev/graph_types.php

    It uses less memory than the "grid" type.

    Also attach a funnel modifier to your moving object, if you use the Navmesh.
    Otherwise the object will mostly move to the centre of each polygon's edge.
  • Hi there,

    I have updated the build a few small changes.

    There is now 5 AI ships trying to get you, and they shoot back. I also tweaked the camera movement and ship handling. You can now also hold shift for a speed boost. I also did some basic setup for gamepad support. So far I have only tested with a PS3 controller and I think it plays well.

    @garethf, Yes the idea is to have one enemy AI ship track its target and the rest follow the leader. But each AI should also be able to navigate independently. I will get to that logic once I start building a state handler for the AI ships.

    @Dipso, The reason I used the grid was to test the dynamic grid obstacles. So as obstacles move around, the navigation grid regenerates itself. But I will try out the navmesh and funnel modifier and then use some custom code (raycasting and/or colliders) for the AI bots to avoid dynamic obstacles.

    @konman, I also did a windows 10 build.
  • edited
    @petrc, I fired up the win10 build. The ship keeps flying continuously to the top left of the screen. I have unplugged my HOTAS and logitech gamepad to try and troubleshoot the issue. I also rebooted a few times. Still no luck...

    Good to see you are still working on this.

    Edit: This may be the problem? answers.unity3d.com/questions/303708/inputgetaxishorizontal-problem.html
Sign In or Register to comment.