With the new freelance work, I'm trying to setup a good schedule so there's a bit of growing pains to go with it. There will be more to post about next week.
0 Comments
Hey and welcome back! Last message for a while about the wizard path stuff... hopefully. Turned out, there was still one more thing I had to make, but it's done now. Also, I made a vidoo showin it off. So lock your door, grab the lube and prepare your eyeballs for all this programming sexiness. For those of you without lube, there's a TLDR at the bottom. Alright, so for the sake of testing I'm controlling this dude, but in the final version he'll be movin all on his own like a big boy. So looking at this you might be thinking "JoltJab, (that's me. I'm JoltJab) he's just moving from one line to another. Is it really all that complicated? Did I grab the lube for nothing?!" short answer, um.. no! Would I lie to you? You see, there's much more going on under the hood. So first off, you see those paths he's following? He isn't actually following them. He's following a copy. You see, earlier I "scanned" the paths putting all their succulent and juicy data into a separate file that can be called later at any time. So the Wizard is actually following that separate file. "but JoltJab, (that's me. I'm JoltJab) why would you make extra files to follow when the paths are already there in the game?! What's the matter, are you just stupid or something?" Good questions hypothetical reader! So let me answer those, in order: -The paths you see in game hold a lot of useless info. Useless to this problem at least. So I have to make my own instead of using what the game making program gives me. I strip it down to use only what I need, and save it away to call later. -and yes. To explain exactly how the paths are saved and called up would probably take wayyyyy to long (and this is already getting too wordy as it is). So the quick answer is: I saved the path data to what's called a buffer, saved the buffer to a file, then loaded the buffer and read it at certain parts to create the next part of the path as the wizard is moving. There's also one other thing. If you look real closely at the video, you'll notice the wizard is still moving like he's on the path even when he leaves it. And that's because I made it so a big bunch of paths (I'm calling path chunks) can connect to other path chunks. Each path chunk has either 2 or 3 points for attachment on the left and right side of the room. In this example, there are 2 points of attachment on each side. When you get to the end of the room (hit one of the points of attachment) you move on to the next room and start following that room's path chunks. It's a seamless swap as you can see in game. And that's it. Now go find some tissues and clean yourself up. TLDR: wizard doesn't actually follow the paths (or path chunks) you see. I actually copy the path chunks into what's called a buffer. That buffer is then put into a separate file. Then depending on which room the wizard is in, the corresponding path chunks saved in the separate file will be called for the wizard to follow. When moving between rooms, the files are switched and the wizard then follows that room's path chunks seamlessly. Um... uaaaa.... Zelda: Breath of the wild.
But in all seriousness, I've completed all the info I need (related to wizard paths) for creating individual world chunks. Next is unique instances. After that, getting it to create, attach, and randomize all the different parts to make the world chunks. I may have got the order wrong in my last post. The first thing I needed to do was the 2nd action: write the data so it can be used properly for dynamic creation. I got that part done, it's now on to the 3rd thing: jumping from one chunk to another.
I've been playing with a few different ways of saving the info so it could be setup for moving between chunks, and I think I got it. I just need to test out a few other things first. To figure out this problem requires other problems to be solved, so I'm working those out too. I think this should all be done by the next week. On another note, do you remember when I stopped posting for a decent amount of time? Well during that time I went to make some money to help keep me afloat. Unfortunately that money seems to be running out again. Now recently I've been putting in 40 hour work weeks on this game, but now I needed to cut that number back a bit. So that means progress will probably be slowed down a little. I've already started working this schedule, and things have been going good so far. |
Archives
October 2019
|