My goal for this week is to make some new boss fights and get a new gameplay video posted by Thursday. Since posting the last gameplay video I've added sound and figured out how to record videos with sound. I still haven't found my microphone so I might not have a voiceover, but at least it'll have music and sound effects.
Sidescroller Update v2.7
I've been trying to update the library at least once a month and today is exactly one month since the last update, so I figured I better post an update. Here are the new features:
- Changed the set_flags() proc to call nearby() instead of oview(2). I forget why it was using oview (I might have had a reason for doing that). This change makes the default movement loop run almost three times faster.
- Added support for fractional moves. Previously calling pixel_move(1.2, 0) was the same as calling pixel_move(1, 0) because the 1.2 would be rounded down. Now each move is always an integer move but the fractional parts accumulate. If you call pixel_move(1.2, 0) five times the mob moves six pixels - four of the moves are of one pixel, one move is of two pixels.
- Added _flags.dm which contains the definition of the compile-time flags.
- Added the LIBRARY_DEBUG flag. The library has the statement "if(trace)" in many of the movement procs. If you're not going to use the trace feature these aren't necessary, so you can comment out the "#define LIBRARY_DEBUG" line in _flags.dm to make the debugging functions no longer part of the compiled library.
- Added the NO_STEPPED_ON flag. Enabling the flag disables the definition of the atom.stepped_on, stepped_off, and stepping_on procs. If you're not using these procs you can enable this flag to improve performance.
- Added the FOUR_FLAGS flag which enables the on_left, on_right, and on_ceiling flags. It's enabled by default. Even if this flag isn't included, the on_ground flag is defined because it's used by the gravity, jump, and can_jump procs. Disabling this flag also removes the definitions of the atom's flags_left, flags_right, and flags_bottom vars.
Pixel Movement
I've added a couple of things but it's not significant enough to warrant a whole update. I did add another benchmark (which I mentioned here), so I figure I'll make the code available for it now if anyone is interested: http://www.byond.com/members/Forumaccount/forum?id=457
addicted to sidescrollers
This is an old blog post of mine (if we can call 4 months ago "old"). There was a point that came up after the post, in the comments, that I didn't fully explain and would like to explore more.
A sidescroller is basically the same as a top-down game except the mobs are constantly accelerating downwards. I was asked recently if I thought about combining the Pixel Movement and Sidescroller libraries - I have, because they are very similar. However, I'd want to have different demos for the Sidescroller library because there are things you would do in a sidescroller that you wouldn't do in a top-down game (also the concept behind the stepped_on proc is fundamentally different).
A sidescroller is like a top-down game except there's that one contstraint, you're always accelerating downwards. You might intuitively think that constraining movement in a top-down game is bad, but look what it did for Chess and Checkers. If all pieces could move freely they wouldn't be fun games at all. The whole point of the game is finding ways to use or exploit the movement constraints. The same is true of a sidescroller.
The presence of gravity makes sidescrollers interesting and fun to play. Maybe it's just me, but it's just fun to run and jump from platform to platform. To test or profile the Pixel Movement library I created some benchmark demos that stress the system in different ways. It's a fully automated test - you set some parameters, run it, and see what the CPU usage is. To profile the sidescroller library I don't have any benchmarking demos. Instead, I run the game and run around the map manually. Moving around a map with top-down movement isn't interesting, but adding gravity makes things much more interesting.
Imagine a top-down PvP fighting game with ranged attacks. Because it's a top-down game, players can move in any direction to avoid your attacks. Some games may further limit your attacks to being 4- or 8-directional. A sidescrolling PvP game has gravity. Players can't move freely, there's some predictability to their movement because you know they're accelerating downwards. I'm not saying that every game would be better as a sidescroller, but it allows for some neat gameplay concepts that you might not have in a top-down world.
Have you played Cave Story?
Just downloaded it a few days ago on the 3DS. One of the best sidescrollers I've ever played, you should try it out if you haven't already. Its my current addiction along with Minecraft.