2:36am - Well, my Birthday is officially over, but I'm still up. I played one of my gifts for a while, and an Xmas gift from last Xmas also, and now I'm feeling like working. So, first I'm going to make a new section in OneNote for the project. There. Now I'm going to have to figure out what I need to do to make the prototype.
I'm thinking it'll be a top-down perspective game, but I'm not sure if I want to make it a single floor 'grid' of tiles or if I should make something more like Dwarf Fortress, with a 3D 'matrix' of tiles.
The latter is obviously much more difficult in every way, but it would make things much more interesting. On the other hand, I could make the prototype a grid and make the actual game a matrix after I know that the theory is fun. That's probably the best way to go about it.
So I'll make a grid of tiles. I'm not sure the best way to do that in Godot. I've done it one way before when I was working in Unity, following a tutorial, but it was kind of a weird way to do it then.
The most straight forward way, that is the first thing that comes to mind, would be to make a node for the grid and fill it procedurally with prefab nodes for the tiles, and have the grid node use a script to keep track of them all and reference them. I have a feeling this will run into performance issues but I need to try it to be sure.
Now what about mobiles... How should they interact with the environment? Should they be physics objects, bouncing around between colliders? Or perhaps they should be limited to grid-based movement?
I'm not sure on this one. I had been thinking that I'd just make them physics-based, but with a tile matrix that becomes much more complex, basically a 3D game, so I might as well make it 3D instead of 2D. But Godot isn't the best at 3D right now, and there's a lot more work to making 3D graphics look nice. I'd like to keep it to 2D.
So I think I should tie the mobiles down to the tiles. I can animate them moving between the tiles if I want to but they'll be stuck walking tile-to-tile.
It's beginning to look a lot like Dwarf Fortress. Which is a bit funny since I was thinking that later on I'd like to make it so that the player could start their dungeon by branching off from an abandonned dwarven settlement or ruin as a start option.
So, I don't want the tiles and creatures to be too interconnected. How do I keep them seperate but still touching?
My first thought was to have the tiles contain whatever occupies them, but it seems like that would tie them together too much. Moving creatures would mean reparenting them constantly.
I'd rather have the creatures be on their own 'layer' above the grid. Then in that case, maybe they keep a reference to which tile they're on?
But then, how would they check a tile to see if it's occupied? If the tile doesn't know what's in it, you couldn't ask the tile for that information. I'd have to have a second grid for the creatures and static objects, and reference the location based on lining them up. That seems like an even bigger mess than the other.
So the tiles should know what's in them after all, but perhaps the tiles aren't the parent of the objects and mobiles they contain. Instead, what if they merely contain a reference list of the mobiles or objects they contain? And the mobiles and objects likewise have a reference back to their container? Then they could figure out where they are, what's around them, and everything. This way they'd be seperate but together.
3:16am - This is going to have a lot in common with Roguelikes so I think I'll do some research on Roguelikes built in Godot and see how they went about it.
3:47am - Okay I'm spent. I've got more research to do on Roguelikes and how they handle their problems, but for now I'm good. Take care!
I'm thinking it'll be a top-down perspective game, but I'm not sure if I want to make it a single floor 'grid' of tiles or if I should make something more like Dwarf Fortress, with a 3D 'matrix' of tiles.
The latter is obviously much more difficult in every way, but it would make things much more interesting. On the other hand, I could make the prototype a grid and make the actual game a matrix after I know that the theory is fun. That's probably the best way to go about it.
So I'll make a grid of tiles. I'm not sure the best way to do that in Godot. I've done it one way before when I was working in Unity, following a tutorial, but it was kind of a weird way to do it then.
The most straight forward way, that is the first thing that comes to mind, would be to make a node for the grid and fill it procedurally with prefab nodes for the tiles, and have the grid node use a script to keep track of them all and reference them. I have a feeling this will run into performance issues but I need to try it to be sure.
Now what about mobiles... How should they interact with the environment? Should they be physics objects, bouncing around between colliders? Or perhaps they should be limited to grid-based movement?
I'm not sure on this one. I had been thinking that I'd just make them physics-based, but with a tile matrix that becomes much more complex, basically a 3D game, so I might as well make it 3D instead of 2D. But Godot isn't the best at 3D right now, and there's a lot more work to making 3D graphics look nice. I'd like to keep it to 2D.
So I think I should tie the mobiles down to the tiles. I can animate them moving between the tiles if I want to but they'll be stuck walking tile-to-tile.
It's beginning to look a lot like Dwarf Fortress. Which is a bit funny since I was thinking that later on I'd like to make it so that the player could start their dungeon by branching off from an abandonned dwarven settlement or ruin as a start option.
So, I don't want the tiles and creatures to be too interconnected. How do I keep them seperate but still touching?
My first thought was to have the tiles contain whatever occupies them, but it seems like that would tie them together too much. Moving creatures would mean reparenting them constantly.
I'd rather have the creatures be on their own 'layer' above the grid. Then in that case, maybe they keep a reference to which tile they're on?
But then, how would they check a tile to see if it's occupied? If the tile doesn't know what's in it, you couldn't ask the tile for that information. I'd have to have a second grid for the creatures and static objects, and reference the location based on lining them up. That seems like an even bigger mess than the other.
So the tiles should know what's in them after all, but perhaps the tiles aren't the parent of the objects and mobiles they contain. Instead, what if they merely contain a reference list of the mobiles or objects they contain? And the mobiles and objects likewise have a reference back to their container? Then they could figure out where they are, what's around them, and everything. This way they'd be seperate but together.
3:16am - This is going to have a lot in common with Roguelikes so I think I'll do some research on Roguelikes built in Godot and see how they went about it.
3:47am - Okay I'm spent. I've got more research to do on Roguelikes and how they handle their problems, but for now I'm good. Take care!