This is part one in a series about computer game development.
Last night I took the first steps of the journey: planning object types, and drawing up diagrams.
I prefer to hand-write my notes while designing software. I find it’s very calming to design software with a pen and paper, before I start writing any code.
After a few moments of thinking, I came up with a Building class. Imagine a Building as an empty piece of land, which will have a structure on it.
<Building> Size: X: 2 Y: 2 Position: X: 100 Y: 100 Render()
In the initial design, the
Building class has two properties,
Position. It also has one method,
Size as how much space it takes up on the grid, and
Position as where it found on the grid. We’ll build out the Render method later, but basically it’ll be what actually creates and places the div, and any cuboids (or other shapes).
Coming up with the building class, made me start to think about how the buildings would be rendered. This lead me to think about a plain HTML Div element, rotated using rotate3d, with cuboids placed on top. Leading me to my next class, a
<Cuboid> Length: 100 Breadth: 100 Height: 100
Cuboid class has three properties,
The User Interface
Just to clear the image, I decided to do quickly, and very simply, draw a wireframe of the user interface.
The user interface features a
Toolbar, and I’ll call the grid, a
So I started by coming up with some object classes, and a basic user interface wireframe. It looks pretty standard, like almost any other game with a ViewFinder, Status Bar, and Toolbar. The object classes are being kept very simple at this stage.
Here is the final sheet from the first design session.