I started making a small RTS game a few months ago, and it's ready about in 50%. In the game the player can leads a small group of men in an island (that's why the title of the game is: "The island" (or: "The settlers of the island"; not decided yet)), start out a harbour.
The computer can leads 1, 2 or 3 groups, depending on settings. My game looks like the old good Settlers 2, as the following picture shows:
But some programming things are not too good yet, e.g. if a unit (worker and warrior) has subimages, I try set it depending on its direction as follows:
Code: Select all
function setsprite(...) as any ptr
if worker(number).direction>=338 and worker(number).direction<=22 then
worker(number).sprite=workerdownright(worker(number).subimage)
elseif worker(number).direction>22 and worker(number).direction<=67 then
worker(number).sprite=workerupright(worker(number).subimage)
elseif ...
return worker(number).sprite
end function
Code: Select all
unitsprite=setsprite(...)
put ground,(worker(i).xplace,worker(i).yplace),unitsprite,trans