callumW / CityStrike

Prototype 3D Missile Command remake
0 stars 0 forks source link

Plane Mechanic #55

Closed callumW closed 4 years ago

callumW commented 4 years ago

Description

To give the game some more complexity, the scene should be split into separate planes. On each plane we have buildings to protect and missile silos to launch missiles from as well as enemy missiles to destroy.

Along the top of the screen there should be a mini-map view of each plane (which shows buildings and incoming/outgoing missiles in arcade style) which are also selectable to switch between the planes.

There should also be a world view which zooms out and shows a kinda birds-eye view of everything.

Tasks

Plane Switching

Plane Mini-maps

General

callumW commented 4 years ago

I think I might have found how to generate the plane minimap. Basically, what we can do is construct a SpriteKit "Scene" based on the plane, and then use SKView.texture(from:) to create a texture based on the scene.

EDIT: I'm being silly! I can just create a ButtonNode from a node containing all the minimap nodes, see revision 42fdb38349ec88dc330723813b4a5b83619ea5d7

callumW commented 4 years ago

Note for creating an updating line from missile spawn to target node:

We can add a SKShapeNode or a line from the missile spawn, to the missile target, then, using .lineLength we can control the amount of the line that is rendered.

EDIT: no we can't, lineLength is a read only property.