Post news RSS Plot Course System & Prototype

This week I've focused almost entirely on tying up the loose ends on the basic plot course waypoint system which is obviously quite a large chunk of the command system and I'm pleased to report I'm pretty happy with its current state.

Posted by on

This week I've focused almost entirely on tying up the loose ends on the basic plot course waypoint system which is obviously quite a large chunk of the command system and I'm pleased to report I'm pretty happy with its current state.

I now need to implement the system on the other map icons - Convoys, U-boats, Taskforces which I hope will be quite an easy job....

The Waypoints Types:-


In BotA there are three main waypoint types:-

Standard Waypoints:-

These are the basic waypoints; the player can place as many of these points as they wish and once confirmed the ship, U-boat or Taskforce will just go around each waypoint one by one until the course is complete.

Patrol Line Waypoints:-

These are a more defensive waypoint useful for defending channels, estuaries or parts of the ocean, like the Denmark straits for example. The player can place only two points. However unlike the standard waypoints the ship, U-boat or taskforce will continually move between the points.

Patrol Box Waypoints:-

Similar to the patrol line but will enable up to 4 points which enables the players units to patrol a much bigger area. The ship, U-boat or Taskforce will continually patrol around this box.

There is one script dedicated to this system and four others which the system calls upon to make it work.

  1. GUI Script- the orders panel which appears on screen when a unit is selected.
  2. Selection Script - so you can select the object you wish to create new orders for.
  3. Plot course script - this is the mechanics script of the whole system.
  4. Movement - Initiates the movement of the selected item
  5. Mouse Rollover - There is also a utility script which checks every frame on mouse rollover to make sure the user cannot place waypoints on land.

I've been working for two or three months on this system and this is the 5th attempt/ version of it.
It's one of the six areas I feel provides a great basis to really push on but also nails one of the more complex aspects of a game of this type, the others includes - damage systems, ocean modelling , weather systems, information databases, GUI.


Prototype available to try out


Rather than taunting you all with info, I've uploaded a .zip file containing an exe with all this in action which you can play with. You have three single ships on a single map tile (courtesy of screen print and Google maps!)

You can order any of them to carry out orders relating to any of the above waypoint types.

Controls:-
- Zooms camera out
+ - Zooms camera in
Arrow keys to move camera around
Right click to select a unit
Left click to place waypoints.

If you find any bugs let me know :)


Known Problems/Additions Needed:-

  1. Ships can still travel across land..... I've not got an adiquate solution for this yet.
  2. Return to Base/set destination Order - I'm still pondering the implementation of this and it's something I can begin to consider more now as the basic mechanics are working adequately.
  3. As said before, need to add the waypoint system for other units - Convoys, Taskforces, Ships etc.
  4. Get rid of the delete waypoint button and code from the plot course script....no need for it as it's pretty quick to just make a new plot anyway.
  5. Comment & Optimise the scripts - there's a load of optimisations I can do, but I've basically had enough of it for the moment. I will however comment the scripts to death so when I do come back and optimise I know what the bloody hell is going on! ;)
  6. There is also no way to adjust speed. all ships are set the same at the moment....speed settings is next on my agenda!
Thanks for the support!

John

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.