Thoughts about military

I’ve been thinking about organizing troops in NextGame. This post is a snapshot of my thoughts, incomplete and fragmented, so please allow enough room for later changes and details to be added.

Firstly we would want to keep the Rock-Paper-Scissors principle, so that each troop type has a weakness and an advantage. Secondly we want to keep tiers – that is different levels of troops.

Continue reading

Posted in Ideas | 11 Comments

Live progress #11 – stonemining

Taking advantage of 3D and stone deposits being decals, now stone can be mined from any direction and from any terrain type underneath:

stone2stone3stone4

P.S. Meanwhile School and Store got a little sketching progress.

Posted in Live progress | 4 Comments

Live progress #10 – refactorings

Last week has been rather busy, so most of the time spent was in shorter session and aimed at refactoring.

Redoing rendering approach. Now houses and units do not draw themselves, like they used to. That allowed to put all the rendering code into single unit and adjoin many identical pieces into one.

Decals are being regrouped for easier usage in terrain too. Internal stuff.

Houses got a simple building visualization – wip house slowly grow up from under the ground. Until we have a better idea, that sort of indication is quite sufficient.

Viewport settings are read from XML and now can be refreshed from F11 menu without restarting the game. Such approach helps a lot while development goes – so that any section of meta-data can be refreshed on-the-fly.

Posted in Live progress | Leave a comment

How terrain works #2

Last time we have stopped on basic terrain appearance. How mixing surfaces and transitions between them works. Today’s the second part of the terrain being explained – decals.

terrain01

Continue reading

Posted in How things work | 9 Comments

Neat thing about modern Delphi

We have a custom type – TKMPoint. That type is basically a pair of values X and Y. In older days when we wanted to add two points together (for example defense position and unit position within the group) we needed to write it like so:

// Sum up parts and make that a new point
ResultingPosition := KMPoint(GroupPos.X + UnitPos.X, GroupPos.Y + UnitPos.Y);

// Or make a custom function to add two points together
ResultingPosition := KMPointAdd(GroupPos, UnitPos);

Now when we can drop Delphi 7 support, we can use a handy language feature that allows to override operators, so we can simply write:

ResultingPosition := GroupPos + UnitPos;

and that works because compiler automatically substitutes the + operator for TKMPoint with a function:

class operator TKMPoint.Add(const A, B: TKMPoint): TKMPoint;
begin
Result.X := A.X + B.X;
Result.Y := A.Y + B.Y;
end;

In other words – adding points together became simple and neat 🙂

Posted in Sidenotes | Leave a comment

How terrain works

I have been asked an excellent question – how do terrain tiles and objects work in NextGame? NextGame maps are still created from tiles, but those tiles have taken an extra dimension and I’ll try to explain what does that mean. (Pictures inside!)

Continue reading

Posted in How things work | 7 Comments

Live progress #9 – stones

Irregardless of other features, I’m quite confident that there will be mine-able stones in the game. In the older days they were made as a special terrain type, but that approach had many pros. So how can they be made in a new game?

Looking at many other games – stones are often found as clumps of objects placed on terrain. So that they can be mined and terrain below them is gradually revealed. So let’s mix that with our malleable terrain!

Stones idea

Continue reading

Posted in Ideas, Live progress | 2 Comments

Live progress #8 – unit picking

Since NextGame moved to 3D all unit picking routines became outdated. So today I have implemented a new unit picking algorithm. It works by checking an intersection between ray cast from players view and units bounding boxes. Of course a screenshot can not show the selection at work, but it is there and works well. Bounding boxes can be seen here:

2014-04-09 bounding box units hittest

Other minor changes include units stats are now being stored in XML and overall cleanup around the code.

Posted in Live progress | Leave a comment

Walking units

Making a new game from scratch is a huge deal, but what about redoing an existing 2D into 3D? Game logic remains 2D, most of the internals don’t change that much either. Still it is a huge deal when it comes to graphics – there everything needs to be made anew. One of the biggest tasks is to animate the units. Skeletal animation is a known standard here, so that will be my topic today.

2014-03-02 serfs crowd

Continue reading

Posted in How things work | Leave a comment

Live progress #7 – fast forward

Here’s build menu sketch. Since we are going to get houses count increased a bit, I’ve decided to split them into 4 tabs – core, materials, food and military. These 4 domains have naturally formed:

2014-04-06 construction menu

There’s no decision about menu yet – will it stay glued to the left side or shall we allow to freely move “windows” around. There’s massive lack of artwork as you can see, we’ll need to do something about that too.

P.S. Oh, did I told that there are actual walking units in game?

Posted in Live progress | 4 Comments