To make those I had to explore a lot of the melonJS' source code. Finally, I made three different types of platforms: a regular platform (when you step on it, it blocks your way), a vanishing platform (that disappears after a while when you step on it - used me.Tween for animation) and a movable platform (that moves according to a specified area on Tiled - both horizontal and vertical).So, for example, instead of placing spike by spike you can create a large area and it would have lots of spikes - less entities means more performance! I created a little class called RepeatableSpriteObject that extends SpriteObject with it you can create entities on Tiled that repeat a sprite along it's area.Now a challenge would be the opposite - holding Shift to make it run. It's a simple feature that's also simple to implement. On this commit I made the player able to walk slowly when you hold Shift.They're thoroughly commented and, as usual, you can freely use I just implemented a couple of things you might find interesting. Little helper to change the browser window title on-the-fly.An example on how you can receive clicks on the game screen and react to them.Scrollable credits screen - you can throw a text as large as you want and the user scrolls it with no problem.A working example of a custom loading screen.The reason I'm not very proud of it is because the coding is kinda sloppy :( Meaning you can pause the game on any state you want and show anything you'd like (a Renderable, a "PAUSED" text, a pause menu.). I'm not very proud of this one, but here it goes: a pauseHandler.Created a customizable progress bar! Based on the one MelonJS uses for it's loading screen, you can change it's foreground/background colors and x/y/w/h.It has some things hardcoded but it's well-commented, meaning you can easily change it to fit your needs. Made an in-game menu you can control with the keyboard.Nice for debugging stuff on the map and you can change it's action to anything you like easily. This is an entity that, when collided, throws a browser alert().You place it on the map with Tiled and just let it be, without worrying about it's path. It can scroll horizontally, vertically or both. This is a type of Enemy that bounces on the scenery.Here's an example of a ParticleEmitter - I simulated stars on the background.You can also change them at runtime and have lots of fun. Created static texts you can place on the map with Tiled and they'll float, acting like they're part of the scenery.Created checkpoints, so when the player dies it returns there.Here's the function that does that - notice the adjustments I had to do on the PlayerEntity. One of the key aspects of VVVVVV is flipping the gravity.Also, you could make a Tween to smooth the transition making it just like on Zelda. On this case, it scrolls at every 32 pixels, but it's trivial to adapt to your screen size. I made the viewport act like on Zelda and Metroid, on which the screen follows the player but only one step at a time.I know it's not an original idea, just making a suggestion for your next projects. I found this way better because it makes the project organized and it's clear where to find problems when debugging. First, I split all the entities into several files - one for each entity.For me, looking for collectables isn’t exactly in the spirit of the game-it’s more about direct challenges than exploration-and playing the same few unlockable modes on the Switch isn’t really doing it for me. Clocking in at just a few hours, I found myself wanting more as the credits rolled, which is a shame as there were still more risks that could have been taken, or added in over the years as various ports have come to light. Here’s the bad news- VVVVVV is over far too soon. When all is said and done, the frame rate is consistent, and you aren’t going to be screwing up jumps because of the engine. It’s not going to wow people who aren’t into the retro motif, but even if your eyes are strained at the sight of it, you can’t argue that it gets the job done and doesn’t screw around. All the while, the soft, concise visual style eases you in. But the thing that really stuck in my mind was its wonderful art style, which regales us of a simpler time when the Commodore 64 was king. Its chiptune soundtrack, especially during the more intense challenges, haunts and soothes me to this day. VVVVVV (Switch) – gameplay image via NIcalis and Nintendo
0 Comments
Leave a Reply. |