• Register
Post feature Report RSS Dev log 3: Ship Creation

The current state of ship creation, and about how it was achieved.

Posted by on

Ship shape

Ship creation is my favourite feature to have created so far, and I'm incredibly pleased with how the editor has turned out.

The video below is my first online talky about the game, and is probably the best way to see for yourselves:

Currently the player has a fixed size grid and is unrestricted in the number of tiles they can place in this area. The plan is that the grid size will be small at the beginning of a game, and will increase as your captain levels up. This is to allow for a feeling of progression without adding a layer of micromanagement.

Behind the curtain: How it works

The implementation was surprisingly very simple, and uses Unity's Tilemap, and the 2D Extras Tiles (yay free open content!)

The only complication is that a Tilemap has to render all tiles to the same layer, which is completely undesirable. What you actually see is 4 seperate Tilemaps, which are drawn to by a controlling component. Each tile knows which layer it is to be drawn to, so selecting the tile activates the corresponding Tilemap in the component. Then it's just a matter of translating mouse position to a grid position.

Every individual action also creates an undo state, which contains enough information to replace the tile that was previously at that location. All reasonably standard.

Finally, when the player is finished the whole ship is serialized so that it can be recreated anywhere. This also means I can use the in-game editor to draw ships which will be used by enemies - which I hope will also in turn ensure quality of this feature, since I'll be forced to use it a lot!

The deserialized ship can also be interpreted into the structure pathfinding, but that's a topic I wish to cover on its own in the future.

Current Progress towards goal: Demo 1

Bare minimum

  • Character creation - done
  • Hiring crew - done
  • Ship creation/editing - done
  • World generation & exploration:
    • Towns - in progress
    • Islands - not started
    • Pirates - in progress

* Basic world/map generation is done, but not exploration

  • Combat
    • Sea: Basic Ship vs Ship - in progress
    • Land: Basic island invasions - not started
    • Basic AI - not started
    • Loot from encounters (money) - not started

Ideal

  • Customisable equipment - not started
  • Loot from encounters (equipment) - not started
  • Exp/levelling (basic) - not started
  • Gain EXP from encounters - not started
  • Levelling makes a pirate have more health and deal more damage - not started

Thanks for reading!

-Phil

Post comment Comments
frenchiveruti
frenchiveruti

So, Pixel Piracy and you are different because...?

Reply Good karma Bad karma+1 vote
InvisiblePhil Author
InvisiblePhil

Pixel Piracy is finished.

I'm just one of its fans who doesn't think it was allowed to reach its potential, so I want to try :)

Reply Good karma+2 votes
MrUSBEN
MrUSBEN

French That got abandoned and this is being worked upon . Kek .

Reply Good karma Bad karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: