top of page
Search
jonathanluitjens

Platformer Progress - Map Function Continuation, and Slope Functions

Heyo, a new Friday means new updates, and this time it's back to the game progress, and a continuation from some of last week's map coding which I mentioned didn't work before.


The reason for that little problem being a mistake on my part of forgetting to link that layout to the event sheet in which it's code is in, I thought it was already, oops.


Anyways, this week has been working with the map layout PROPERLY synced to the event sheet, and with the help of the teachers giving a second look/input to it, slope specific code for the 2d level layouts.

And I'd like to at least show the coding for these, since videos take too much space without setting up somewhere like a Youtube for showing them in.. I'll get that in due time.


The map's coding so far isn't too much, but it IS enough to show function on a basic sense, while also pre-set for more diverse, specific code later down the line. It has the basics:

- The Map Moof's basic walking code and animations set for up and down so far, sprites may be reworked when coding is further down the line in the overall game to be more map specific than using the 2d platforming layout's sprites.


- Placeholder music, and a tag to play and stop said music upon specific conditions.


- The Map's Zoom-scale to not be too far out for scale, and some additions to let the tree in the center of the island get semi clear when Moof is behind it to not lose him.

- And a level marker, this marker will have a version for each level that upon interacting with (in this case, upon hitting the same P key the Dive is linked to in the 2D levels) sends you to the respective level layout.

(There is no proper transition yet, the layout transfer is basically immediate, so it works in the basic sense.)


The map is coming along, it's got it bare needed functions alongside a hitbox set surrounding the whole island, everything there is working just enough so far without getting too fancy.


Outside of the map was the slopes, I had some issues this week trying to get them to do what I had in mind, which I did end up asking for help with after some time in from the teachers as to how to make a consistent comparison point for Moof's Y level.

With help there, something got made to work:

On their end was the majority of the conditions, by using a GlobalNumber set to match Moof's Y level, with that in play and the top of the code made to match his Y level comes the specifics, where along what they added, I also tinkered a bit on.


The Y acts in 3 ways for slopes:


- Equals is a universal to keep when Moof is walking on neutral ground, standing, or if needed to add a line for, jumping to reset acceleration


- One for going DOWN slopes to make acceleration faster, getting faster to run speed.


- And One for UP slopes, making his acceleration noticeably slower, understandably harder to go uphill than down with Moof's little legs.


It's not much, but it does give some benefit and obstacle to starting a run on a hill, as keeping the run is easy, if already running nothing changes, but you can start one either a lot easier or harder depending on your surrounding ground.


This has room also for use in other settings, maybe for more specific level events, but that's only things to come as they do.

For now though at least that'll be all from me, so until next time, I'll keep working by best to progress further. And I'll keep you updated as that happens.

1 view0 comments

Comments


bottom of page