…and we’re back!
It’s been a while, but gamedev is finally back on the menu.
However, unlike previous entries I’m going to just keep things simple for the next game project, because I actually want to finish a game this time.
It’ll be a classic-style platformer, like Donkey Kong Country (2) and Skullmonkeys, but with a theme/setting like Riven (Myst 2).
However I’m still trying to work out how the theme and the mechanics can work together, as well as a narrative that fits.
Development-wise it’s C# (.net 5) and Raylib.
Excited to actually have some progress to show on a game after all this time… well, soon.
The same old story…
As usual, real work has taken priority and I haven’t been able to work on the game. However, I’m really happy with the progress I was able to make in such a short time, and after such a long time of thinking about the game but not doing anything about it.
I want to keep hope alive that I can finish something for the jam, but it’s probably impossible at the moment.
I will finish this game, though.
Still moving
But this time it was moving things around my house, so I didn’t get a chance to work on the game today… Maybe tomorrow.
(Next day…) I was just thinking that the setting doesn’t need to be the literal moon of Earth. It can still be a desert planet (or moon) like I originally planned for Arid.
I did like the “USA/Soviets fighting on the moon” idea, though… Something to think about.
Time to get moving!
I think I’ve got movement sorted out. There should be a good balance between client and server workload, so hopefully it won’t be too intensive.
Here’s the gist of it:
- The user sends a “StartMovement” request to the server
- The client animates the player moving
- The server sends out information about the moving player to all nearby players, who animate the player moving
- The movement ends in the client, which sends an “EndMovement” request to the server
- The server checks that the end movement is correct
- The server updates nearby players with the moved players position
If the user sends a new movement while an existing movement is in progress, the server will check that the new movement starts on a point on the previous movement’s line, and if so will set the new target.
Things outstanding are path finding and figuring out what to do if the client doesn’t send the EndMovement request. I Also need to test with lag and more players.
But it’s still a good milestone! :)
(The gif is a bit jittery)
N*sync
I’ve managed to get some basic networking going, and have started on the logic around movement.
But with every step forward I’m seeing more and more steps appear in front of me… Making a multiplayer game is no small feat!
I want to have point and click movement, rather than incremental movement via input, but this is pretty complicated to work out. At least I’m finding it to be.
Every time I think I’ve worked out a solution, I realise there’s a case where it won’t work. For example, just now I’ve made it so the server is updating the player’s position on an interval according to their speed. The client is doing the same, so they should both end up in the same place. However, if the player clicks somewhere else during this move, then the previous move needs to stop, but I need some way to stop the loop on the server… I guess I could add a variable to the user that’s checked on each loop, and breaks out if it’s set, something like “CanMove”. But I’d need to save that to the DB, make sure the running loop sees it and stops, then change it again to allow the next move.
There must be a better way…
I’ll sleep on it and see what comes to mind.
Auth
Just a little bit of fun today… Auth is mostly done (i.e. sign up, log in), but there are still the annoying things like forgot password, sending emails etc. I’ll save those for last.
I want to allow people to get in and play around without having to fill out a sign up form and verify their account. However, it’s not the sort of game that you’ll want to start over each time you play. The idea is to explore, collect, level up etc, so you’ll be able to properly sign up and log in to an account as well. There will also be a way to retrieve an account with a code.
I’ll have a job running to delete accounts that are several days old and haven’t been verified yet.
The good new is, now that this boring stuff is out of the way, I can get onto networking and then the battle system.
I can’t believe it’s been almost a week already… I watched a video of some games from another, 48 hour, game jam, and they looked amazing. I’m not sure how some of them were done in only two days, unless they used a ton of off the shelf assets, or had a team. Although, I shouldn’t underestimate the simple efficiencies of not having external responsibilities that can slow you down (e.g. job, family).
Even if I don’t make it within the month, I’ll have made more progress than I had before. In fact, I made more progress in a day than I had up until that day! That’s the beauty of a challenge.