RTS building simulator (in dev)

Hello there.

I want to share my early build of an isometric economic simulator I'm making.
.You are the head of the city, who came to restore the island after a long war.
You have to develop the island, build buildings, manage resources and meet the needs of residents.
2

The game will be divided into 3 story chapters where the user will complete main and side story quests
1

Please test the build (Google Drive) on a physical device (click settings -> load). Use the crank, map navigation and dialogue system by opening the diary inside the lighthouse.

9 Likes

Hey there!

Seeing an entry in this genre is quite exciting, I was thinking about wanting to do something RTS like too. But not something like Advance Wars, which we already have in the form of Sasquatchers.

Perhaps its the economy and building I like the most. So yeah, this is cool.

I couldn't understand how to play the game, unfortunately. I managed to select a house and see placement options on the map, but pressing A did not build the house as I expected.

Unfortunately, performance on device is along way from playable. Starting the game takes several seconds and the framerate is around 4 fps.

1 Like

Thanks for the answer! I'm glad you started the game on a physical device and told me about the problems.

The gameplay should be like regular rts games. Build buildings, collect taxes, get new resources and complete quests. The main thing is that the inhabitants of the island are happy, and this requires more resources :slight_smile:
This is how it looked on my simulator:

Apparently, due to performance problems, the handler for the construction of buildings did not work, which is a pity.
I left a lot of room for optimizations, I hope to eventually get a stable 30 fps!

1 Like

The isometric illustrations look great! I'm a little worried about the typeface for the UI in general, the numbers and the text for the right panel, they don't seem very readable.

1 Like

Some updates:
Increased fps to 30. Set setUpdatesEnabled for tiles that do not use animation.
Also heavy functions like DFS wrapped in coroutines.
Thanks to discord community for the help with testing!

Now I'm creating a menu for the game:
video

4 Likes

Updates

  • Added new buildings: church, coal mine, quarry
  • Added new resources: stone, coal
  • Added a task manager and a diary for the story component
  • Changed the font. It turns out that it is quite difficult to find an adequate font for Japanese, English and Russian at the same time. I liked Arial Narrow the most, but there is no Japanese.
  • Added localization. I do not know what language playdate is mainly used in, so for now English and Russian.
  • Added a tax system. Depending on the needs of users, their number increases or decreases (availability of bread, church nearby)
    video2
3 Likes

Small updates:

  • Added sound effects
  • Added new tiles for the environment
  • Updated the logic of road construction
  • Added the first quests

The road before:
before
The road after:
after

Perhaps someone will be interested in how navigation works in the game.
Sample code for deleting buildings:

import "screens/screen_base"
import "buildings/cursor"

local pd <const> = playdate
local gfx <const> = playdate.graphics

class("DeleteScreen").extends(ScreenBase)

function DeleteScreen:update()
    if pd.buttonJustPressed(pd.kButtonB) then
        screen_manager:back()
    end
    if pd.buttonJustPressed(pd.kButtonA) then
        local x, y = camera:getPositionFromLevel()
        local building_id = build_manager:getBuildingByLevelCoords(x, y)
        if building_id then
            build_manager:remove(building_id)
            sound_manager:removeBuilding()
            screen_manager:navigate("BuildingScreen", {silent = true})
        end  
    end
end

function DeleteScreen:focus()
    camera:load(Cursor)
end

function DeleteScreen:unfocus()
    camera:clear()
end

I used the concept of screens, its greatly simplifies the logic of working with input data. You can implement different logic for processing button clicks for different screens.
Now in a little more detail how it works inside (I have removed some of the logic that is specific to my game)

screen_base.lua
import "CoreLibs/sprites"
import "CoreLibs/graphics"

local pd <const> = playdate
local gfx <const> = playdate.graphics

class("ScreenBase").extends(gfx.sprite)

-- abstract
function ScreenBase:focus(meta_info)
end

function ScreenBase:_focus(meta_info)
    self:setUpdatesEnabled(true)
    self:setVisible(true)
    self:focus(meta_info)
end

-- abstract
function ScreenBase:unfocus()

end

function ScreenBase:_unfocus()
    self:setUpdatesEnabled(false)
    self:setVisible(false)
    self:unfocus()
end
screen_manager.lua
class("ScreenManager").extends(Object)

function ScreenManager:init()
    self.screens = {}
    self.current_screen = nil
    self.previous_screen = nil
end

function ScreenManager:add(screen)
    self.screens[screen.class_name] = screen
    self.screens[screen.class_name]:_unfocus()
end

function ScreenManager:navigate(screen_name, meta_info)
    if self.current_screen then
        self.current_screen:_unfocus()
        self.previous_screen = self.current_screen.name
    end
    self.current_screen = self.screens[screen_name]
    self.current_screen:_focus(meta_info)
end

function ScreenManager:back(meta_info)
    if self.previous_screen then
        self:navigate(self.previous_screen, meta_info)
    end
end

main.lua

screen1 = Screen1()
screen2 = Screen2()

screen_manager = ScreenManager()
screen_manager:add(screen1)
screen_manager:add(screen2)
screen_manager:navigate("Screen1")

I can put this code in a separate module if someone needs it.

4 Likes

This game looks really fun, is development still happening on the game? And if not where should I download it? (The google drive?)

This one became Playdate game GlagStone

2 Likes