bpred754 / Imperium

Real-Time Strategy game written with C# and Unity 3D Game Engine
1 stars 1 forks source link

Creating Buildings #9

Open CurtisRose opened 9 years ago

CurtisRose commented 9 years ago

This would probably be easier to do after we create a user interface. I guess we could have it toggled to a key press in the personPlayer class. For example "If 'b' is pressed and user right clicks then attempt to create a building here"

Buildings are already updating the grid, though inefficiently. It calls the grids method, createGrid, which we calculates the entire grid. This is extremely inefficient. The grid probably needs a new method which allows node locations to be updated individually when necessary.

Buildings should not be allowed to be placed in "blocked" locations, whether from an obstacle, a unit, or another building.

CurtisRose commented 9 years ago

Buildings are on the unwalkable layer and are being updated efficiently now. Units are also on the unwalkable layer and so avoid eachother (sort of, only takes into account where everything is when the path gets made, path doesnt update) and also avoid buildings.

CurtisRose commented 9 years ago

My idea for buildings is to make them much larger than how games normally have them. Units should be able to go into buildings and on top of them. It should have rooms with doors etc. I imagine buildings being much stronger than usual buildings but also more costly to build and repair.

CurtisRose commented 9 years ago

Buildings should be created so that they 'snap' to node locations. Their sizes should be divisible by the node size. I guess we need to come up with a definitive node size.