The MMO Project Part 19: Another dimension or scrap it, we're starting over.
TL;DR: I unraveled the yarn of my code to see the way I had designed everything would lead to massive rewrites across the board. I need to rewrite it all with a plan this time. To be honest I am surprised I got this far without a plan. I will probably take a week and work on Tamakai though before I start the rewrite. It was a heavy blow. The following week if I have regained my will I will begin planning and rewriting based on all the experience I gained this time around.
Starting out today I have to make a map, so I figure I might as well take this opportunity to experiment with 3D maps. Or not, like I thought my laptop just can't deal with it. So, in an attempt to make my life a little easier for developing the maps and how they work going forward I will make 2 maps but not isometric. These will be standard, 3/4 view top-down like old JRPGs because Isometric maps take a lot more work and I would rather get the map state and collision in quickly rather than spend a day working on making a couple of maps. Plus I have some assets for this that I have never had a chance to use so at least I will have some use for them, eh? There's no reason I can't have a mix of isometric and this style either. I might find a reason if I attempt to but as of right now I can't say there is.
The main problem with Isometric is clipping, Y-sort does some of the work for you but you then have to do some trickery with the collision layer. If you do like some people would suggest and make a bunch of props and add them in to the map you eventually end up with a really heavy map. With a tile map you have a much lighter map and have stuff like map cells that allow world streaming and you can also have the collision built into the tiles. With isometric you end up either making each wall a prop and building the world that way (which is tedious) or you end up creating all the collisions seperately as collision polygons. At least from the ways I have seen.
While in the future I will probably be using the Isometric maps as they are my preferred style, for now it's going to have to hang out on the ol back burner until I actually start doing world design proper. What might end up happening is I will go back and remake the tilesets I am using here as Isometric and build from there. Who can say? Anyway for now I need a couple small test maps that are vastly different so I am going to get on that.
So the first thing I guess I will do is create the tile map and set up some tiles to use in it, then I will create the nodes that will hold things spawned by the server like Npcs, Enemies, Other players, etc. I guess these containers will be Y-sort nodes? Do Y-sorts have positional da– of course they do... idiot, how else would they be able to sort by Y? Geez man, sometimes I think I might need water wings to eat soup.
Autotiles man. Ohhh boy. This is some shit, man. I looked at a few different resources on the autotiles and they seem to all have their own way of dealing with it.This is what happens when you listen to other people.
Had to edit the tileset a bit, though that's fine I guess. I also had to make the grass it's own layer which is fine too, I will likely just create a base map that I can duplicate to use as a template.
Kinda wasting time on the autotiles, I think. Though I guess at least now I have a better understanding as to how they work so not a total waste. Though I don't know how they will work in Isometric maps... oof. Anyway I have wasted enough time here.
I find myself trapped in the thoughts of what I must do to create maps. Moreover I am stuck in the idea of asset creation and procurement. While I could simply work in the living room from my desktop and create 3D maps that would solve quite a few of my problems I would also then have to deal with creating 3D tiles, essentially. Either way though I will be creating assets... the question is... which should I do now? I mean if I were to go with 3D maps I will have an easier time on the code-end. I could lock the perspective of the camera giving them a more 2D feel and use pixel art textures to further that... but I would have to work in the living room from here on any time I had to do anything on the client and I would lose a lot of focus and various other benefits like the 2 monitor setup I have in the office.
Let's just write off 3D right, so now we're sticking with 2D. I don't want to have my maps be normal old flat JRPG looking maps of course, because I am a big fan of Isometric maps, I like the way they look and feel. So this puts more work on me of course as there aren't going to be many assets out there I can use for my prototyping as well as having to deal with the Isometric clipping problems. I could make every indoor area a map of it's own I guess so I don't have to deal with clipping through doors. There are all kinds of ways I can deal with it but in the end that's a lot more work of course.
If I did settle with old flat 3/4 top down views I wouldn't be happy with them, I would always regret it. If I had 3D I could do Isometric and get rid of all the nonsense I have to work around. But that's out so... I have essentially decided on the hardest path of the three for the hardest kind of game I could possibly be making for the first game I intend to release. I must really hate myself.
Okay so now that I have decided all that, why not just make a proper indoor map? Isometric, proper, indoor map as it will look in the finished product... ish. Creating these other maps just for testing will just be a waste of time in the long run... so what I will do instead is make 2 very basic maps for the testing, no trees or anything just 2 kinds of ground with collision boxes around the outside and warps to go back and forth. This will give me what I need for testing.
Also it's 1pm and I have not eatten lunch or even considered it. I am going to go get started on that.
Rice is cooking, by the time it's ready I will have taken the dog out. In the meantime I will think about how the hell I am going to do this. I don't want to spend a lot of time working on assets, I want to get the code done. I guess what I will do is take the grass tileset I already have and make 2 maps with it, then modulate one to change it's color. It was either that or edit it in aseprite as a palette swap. So off we go.
This should work. Just pretend one is darker because it's in shadow or whatever, doesn't matter. The collision layer is seperate so I can rip it out of the client and put it on the server, same with the warps. Basically I will copy the entire scenes over and disable the graphics so all there will be is collision shapes and areas of interaction.
The players and enemies will be able to interact with the areas of interaction and the server needs to know they are close enough. The enemies will need to be able to hit the colliders and the server will need to know if a player is trying to ignore collision on the client. I might use a ray cast between states to check if someone tries to lag-switch their way through collisions or maybe I will just build in some lag switch detection and force them back to the last state before it was detected with the ol' rubber band.
The warp areas will eventually have a script server side that will handle warping the player to the next map these could be done as one script and set up via the map's script or as their own individual scripts to allow conditional warping(eg, player is low level, warp to different area or player has flag warp to different area) I could do this all on the map script but if there are several dozen warps on a map (like a town with it's buildings) I will quickly have a very large map script.
So what next? I suppose I could start working out how the maps on the client will handle state from the server. I mean... what I could easily do is just have the map be an exact mirror but with graphics and animation while the server side will just have the collisions and interaction areas.
So I guess warping the the client side will have to be handled in the scene handler. First though we need to handle loading. I will be honest, I really dread this. I have dreaded it for weeks. Depending on how this goes I might spend monday working on Tamakai. Alright so map state. Oh boy. I keep writing hoping I will stop drawing blanks. I have all these notes and the wiki and the whiteboard and still my mind is blank.
Alright, so I guess we need to first, before anything, load in to TestMap1. Also I have the code all set up for deployment to the server so I will have to rewrite it to work locally again. I had intended to write a simple switch with a bool defined on load to set it up for deployment vs local testing but yeah, had so many problems with the deployment I ended up just forgoing that.
My mind is so damn muddy right now. I feel like I may have done this stuff all way out of order and correcting it now is going to really suck. Perhaps I could have done with some more research and planning rather than just implementing as I go. Not sure why I did it that way other than just wanting to get started working on something. Felt like I was stagnant and wasting my life, you know? Anyway, I have a lot of cleaning up to do. The question is should I test on the server or test locally? This would add some steps in between the implement and test parts but it would also allow me to test in a more real world environment. I guess I will just do that. Maybe write a little auto deployment hook to run on the server one of these days to automatically pull and rerun the servers every time I push to the repo.
For now we do this shit manually. Oh joy. Anyway, I guess I better figure out loading the player into the new test map before it's 5 and I need to clock out, eh? I liked it better when I had a clear goal every day, I look forward to having that again. Doing it like this is insane.
With a bit of tweaking I now have the ability to walk around, also Kromdibular is here. Still crashes whenever I swing a sword but eh. Also I am kinda... locked out of the map by my own collision. I will just disable it, walk in, reenable it.
Now that I have attacks working and I am no longer outside the map I have a problem with inventory not working... which is very very strange as it has nothing to do with the map.
Alright, the problem with inventory is the inventory creation bug I had before somehow reappearing. This will have to wait. I have other things I am working on right now. Added it to the bugs deck. Alright, moving on. I now have the map loading at least somewhat dynamically. Next is I guess map state handling. For now I will just manually generate inventory.
Oh boy. New bug. I logged in and was outside the map again. Ohhhhh boy. Yep, it is not loading me into the right spot. I have a feeling I might need to start over from near scratch here. I think at this point with as many things as I need to fix it will actually take me less time to start over from 0.
That might not be a bad idea, I guess this time I could actually write the GDNative plugins properly, rather than rushing it. I have most of the code here and all these notes about how I did each thing. I could write the documentation as I go and actually plan it out.
Really took the wind out of my sails, there. Feeling a bit garbage now. Oh well.
I think I will take the next week to work on Tamakai and then start over on the MMO project. Get the basic stuff in with state and everything. I had considered just starting a single player rpg but I know I would just be thinking of the MMO project while I worked on it and it would suck the whole time. Maybe I take a few weeks off, maybe a month I don't know. I am feeling pretty bad right now and can't think clearly.
Maybe I should focus more on projects I can make money with or can help me build a better portfolio. I don't know. I have the ability to pull this off and make this thing that I want but I feel like I will be the only one who wanted it anyway. Maybe the world has moved on and the thing I am trying to create has no place in it. I really don't know. Let's say I manage to get it finished, all the features are in and it's launched and nobody really plays it would it have been worth it?
I wont really make much money as a game dev unless I somehow make the next big hit game and what are the odds of that? Lotto-like. I definately need money if I intend to travel once this is over... if it does in fact end. Somewhat related; I keep having dreams that the world is ending, usually by nukes or some otherworldly force just outright wanting to destroy it. I wonder if that is what's making me feel like everything I do is a waste of time or if I am having those dreams because I feel like everything I do is meaningless?
So I guess what I will do is work on Tamakai next week, then maybe the following week I will be able to decide if I want to work on the MMO project again. I don't know. If I were to make a game that would probably be the only one I really want to make. Outside of that I would rather work on software for automation and robots or useful web apps since most software is being build for the web nowadays anyhow.
I can't really see the point in developing any other game. This is the one I wanted to make and I am so close now, it would be really fucking dumb to stop and make another game along the way, at least to me. It would be a waste of time, my heart wouldn't be in it.
I guess I will just have to work on Tamakai next week and lick my wounds, then if I find the energy begin the planning and rewriting with the knowledge I have gained along the path of failure.
If in fact I am unwilling to begin the rewrite I will start work on an ARPG/CRPG instead. The only other game I want to make is Anchor Watch and that has to be 3D so... yeah. One of these two has to be the choice. Though I would rather just get the MMO made or at least to a point where I can let people test it and see if I am wasting my time.
Well... it's a ways past when I should have been clocking out. I'd better go make some food.
Cheers.