Post by Regolyth on Jun 3, 2021 9:56:45 GMT -5
This is a post from Dukus, the guy who created Banished.
Do you ever get the feeling that work on your video game is coming along to slowly? It seems I’ve spent the last month slogging through issues and bugs that come up as I make progress toward a cohesive game.
Why isn’t that object drawing it’s selection when selected?
Why did that animation just hiccup?
Why is no one picking up rocks that are close to trees?
Why is the there still a random crash while background loading!? (I already ‘fixed’ that once.)
But that’s okay – it’s good to fix bugs when encountered rather than let them slide. Despite code refactors and bug fixes, it feels like I’m coming up to a critical mass of systems and the game will come together into something…. soon…
I feel like I just have more done, but maybe not? When I started Banished I had nothing, and spent 10 months working before I had the game in a playable form. This time around I’ve been extending the game engine, and laying foundation for something that’s better to work with, and will hopefully be just as fun.
For a simple interact where a character is idling, it looks like this:
Plan idleInteract
{
Sequence()
{
// load values for where we are going
// @self is the villager
// @interact is the object being used
LoadInteractIndex(@interact0, @int0)
LoadInteractTransform(@self, @interact0, @int0, @transform0)
LoadInteractAnimation(@self, @interact0, "IdleInteract", @animation0)
// walk to and idle
WalkTo(@self, @transform0)
TurnTo(@self, @transform0)
PlayAnimation(@self, @animation0, Length, 0.0)
// finished using this interact, someone else can have a turn
Interact(@self, @interact0, @int0)
}
}
To extend the script, all I have to do is write a simple C++ class that exposes the action and its parameters. The script compiler uses the C++ class and its serialization function to properly parse and use the action. It’s not the fanciest thing or the easiest thing to read, but it’s functional and gets me where I’m going. (Is it bad that I feel like I’m writing assembly code but the instructions are more than 3 letters long and the registers are named nicely?) It’s a nice step toward being able to make new objects in the game without having them hard coded.
I always enjoy reading his blog posts about things he runs into while creating his games. In a way, it reminds me of my coding and my time when I did 3D modeling and the like. I always think that one day I'll create my own game and I'll reference his posts to solve problems I run in to.
At this point, Banished is complete and he's working on something new, but similar. I'm sure it's years down the road, but it'll probably be way more ambitious.
Do you ever get the feeling that work on your video game is coming along to slowly? It seems I’ve spent the last month slogging through issues and bugs that come up as I make progress toward a cohesive game.
Why isn’t that object drawing it’s selection when selected?
Why did that animation just hiccup?
Why is no one picking up rocks that are close to trees?
Why is the there still a random crash while background loading!? (I already ‘fixed’ that once.)
But that’s okay – it’s good to fix bugs when encountered rather than let them slide. Despite code refactors and bug fixes, it feels like I’m coming up to a critical mass of systems and the game will come together into something…. soon…
I feel like I just have more done, but maybe not? When I started Banished I had nothing, and spent 10 months working before I had the game in a playable form. This time around I’ve been extending the game engine, and laying foundation for something that’s better to work with, and will hopefully be just as fun.
For a simple interact where a character is idling, it looks like this:
Plan idleInteract
{
Sequence()
{
// load values for where we are going
// @self is the villager
// @interact is the object being used
LoadInteractIndex(@interact0, @int0)
LoadInteractTransform(@self, @interact0, @int0, @transform0)
LoadInteractAnimation(@self, @interact0, "IdleInteract", @animation0)
// walk to and idle
WalkTo(@self, @transform0)
TurnTo(@self, @transform0)
PlayAnimation(@self, @animation0, Length, 0.0)
// finished using this interact, someone else can have a turn
Interact(@self, @interact0, @int0)
}
}
To extend the script, all I have to do is write a simple C++ class that exposes the action and its parameters. The script compiler uses the C++ class and its serialization function to properly parse and use the action. It’s not the fanciest thing or the easiest thing to read, but it’s functional and gets me where I’m going. (Is it bad that I feel like I’m writing assembly code but the instructions are more than 3 letters long and the registers are named nicely?) It’s a nice step toward being able to make new objects in the game without having them hard coded.
I always enjoy reading his blog posts about things he runs into while creating his games. In a way, it reminds me of my coding and my time when I did 3D modeling and the like. I always think that one day I'll create my own game and I'll reference his posts to solve problems I run in to.
At this point, Banished is complete and he's working on something new, but similar. I'm sure it's years down the road, but it'll probably be way more ambitious.