Anyway, I got a somewhat completed game out the door, and I'm sick of it, so time to move on. Total budget spent on that game... $0.
The New Game
I'm going to make a game like Dwarf Fortress / Rimworld. It will be 2D, use graphics, have some minor animation for character actions. There will be a Z-Level, game will be top-down.
I'm going to present it in a sort of Cyberpunk aesthetic. The player will start with a small group of people who have figured out that if they want to survive in the post-collapse city, they're going to need to stick together. The starting point will be an abandoned building, and the player will go from there.
Rival groups will be simulated and may attack, or trade, or sneak/hack into your camp. You can expand, etc, build up your camp. I think I'm going to go with "clan" rather than "colony" or "fortress". "Clan" to me is reminiscent of online game clans (if they're still a thing). New people may join your clan.
In similar games, you start with a small amount of supplies, I think that's appropriate for this game. You then start to scavenge what you can from your immediate surroundings, in my case that could be wiring and electronics from surrounding buildings, or even the building you're in. Essentially it's all the same mechanics you've seen before, but a sci-fi bent to it.
Later, as the game progresses, I'll add a little more to it so that it has new mechanics not been done.
So far I have done a couple things:
- Thought about the game
- Decided on this genre, because I can iteratively build on it once the core concept is in there (big thing for my hobby time allowance)
- Decided on the setting
- Decided that I will need an Entity Component System that focuses on Data Locality
- Developed an ECS above from scratch
- Decided I will need to use some variation of G.O.A.P for the A.I.
- Decided on JSON for the game data format
- Halfway written a JSON file reader
Code: Select all
#include "ecs.hpp"
struct Position
{
float x;
float y;
};
struct Velocity
{
float x;
float y;
};
int main()
{
ECS ecs;
ecs.RegisterComponent<Position>("Position");
ecs.RegisterComponent<Velocity>("Velocity");
Entity ent1(ecs);
ent1.Add<Position>({1,2});
ent1.Add<Velocity>({.5f,.5f});
Entity ent2(ecs);
ent2.Add<Position>({5,24});
System<Position,Velocity> system(ecs);
system.Action([](const float elapsedMilliseconds,
const std::size_t& numItems,
Position* p,
Velocity* v)
{
for(std::size_t i = 0; i < numItems; ++i)
{
std::cout << i << " -----------------\n"
<< "P: (" << p[i].x << ',' << p[i].y << ")\n"
<< "V: {" << v[i].x << ',' << v[i].y << ")"
<< std::endl;
p[i].x += v[i].x * (elapsedMilliseconds / 1000.f);
p[i].y += v[i].y * (elapsedMilliseconds / 1000.f);
}
});
for(int i = 0; i < 100; ++i)
entityManager.RunSystems(1000);
return 0;
}