I'm wanting to make an arcade style game which never ends. So basically it just gets faster or whatever until you lose. What's the best way to achieve this in MMF2?
My idea is a platform style game where you have to jump and collect things at an increasing speed, would it be fairly simple to have objects randomly created and be sent into the play area?
I imagine it could be a bit complicated, so I could just have the level set out already in one long frame. I don't want to do anything too difficult as I've not touched MMF2 for years. If I do choose to have one large frame, are there any limits as to how long I can make it? Like do things start to get glitchy if it's too long?
For a time, I was putting together shmups with this random-generation process in MMF2. My assumption is that it can work with platformers as well. here's a quick summary for a scrolling platformer game created with the same process, that moves from right to left, and the player constantly moves to the right.
Create an active object outside the edge of the right hand side of the screen; name it something like "platform spawner." Set platform spawner to Always modify its Y axis by random(480)+1 [or whatever your screen resolution's Y axis turns out to be]. Also make sure that Alterable Value A of that object always adds 1 to its current total. Let's call this Alterable Value "platform spawn trigger" for the sake of this example.
For another event, set it so that when "platform spawn trigger" reaches a certain value - 200, 500, 1000, etc. - then Alterable Value B of platform spawner sets to random(10)+1 [or however many platform objects you have]. Call Alterable Value B "platform spawned" or something similar.
Have separate events determining what platform object is spawned by platform spawner whenever the platform spawned value is different from 0. Create the object at 0,0 of platform spawner, then set the platform spawned value to 0.
All platform objects should move from right to left at the same speed; you can change this speed globally as the game continues. To do so, simply set up a timer on another object (maybe name Alterable Value D of the platform spawner as "game timer"). When the game timer value reaches a certain value (something larger, like 10,000 or more) then add 1 to the Speed of all platform objects, and set the game timer value to 0.
That's the quick and dirty explanation of what I have done in the past. And it doesn't become glitchy as long as you do two things:
- make sure all platform objects are destroyed when they are too far away from the frame (which is already done by default); and
- destroy all objects when their disappearing animation is complete.
If you need to, increase the object limit of the application to something larger than 500. Now that HWA is included in the basic build, most computers should be able to handle that without a problem.
Oh wow, what a detailed explanation! You did a great job, but I'm not sure I can follow it properly until I have MMF2 up and running. (Can't use it until I buy Parallels in about a weeks time!) Can't wait to put your idea into practice, I'll be sure to report back once I've given it a try - Thanks a lot!
I currently have a working build of a mini-game that does just this. blubblub, I took your example and sorta just ran with it, combining your main idea with my suggestion and the custom platform engine by DavidN on the clickteam website. I tossed in some gemstones, did some scoring and a few little extras, and before I knew it the game was actually fun and strategic. I will post this very soon...Give me a few hours and I'll be on break so I can take care of this.
a flash version of the executable, and the MMF2-generated web page to run it
a stand-alone version of the executable
source MFA files of both an early WIP version, and my current working version of this engine
the backup file for the stand-alone MFA of my engine
(I kinda just threw everything I was working on in a single ZIP file. I experienced one crash at a certain point of progress and haven't felt like coming back to that point yet, as the backup file didn't restore to where I was at the time.)
HOW TO PLAY:
- move with the arrow keys. jump your space ship with the SHIFT key. you can also double-jump if you time it right.
- collect gems to earn points. gems are randomly generated, in different locations and in different colours. the more gems you collect of a specific colour, the more points you will earn. additionally, the higher up you are on the game screen, the higher the score multiplier for collecting the gems.
WHAT I DID:
- i modified the actions that blubblub's version was doing by using a counter instead of the timer (because the timer has been consistently recommended as something to avoid using for action games). Secondly, I used my recommendation above of creating a single platform generator object that constantly changes its Y position. Next, I used DavidN's platform engine as the base for the movement, and in particular jumping, double-jumping, and moving platforms. The rest of it is essentially items of my own invention. Graphics are rudimentary. Scoring is unbalanced, for sure, but it's worthwhile to look at as an example in any case.
- The game doesn't include a timer to make the platforms move faster; rather, I let the player be "teleported" back to the top of the screen by using safety platforms lined along the bottom of the screen. if the player falls in the same spot and there is no longer a safety platform there, then the game is over.
- In terms of what I would do next (apart from improving most of the graphics of course), I would change the engine and make it easier by creating two platform generators, one on the upper-half and the other on the lower-half of the screen, so that the game is a bit easier and not so random. It would be suitable for an easier difficulty level, at least. I would actually create a version of the game with several variables that the player can change, and then base the current difficulty level on that. Finally, scoring would need to be adjusted instead of flat "x2" and "x3" multipliers, I think.
- i've been fiddling around with this for the past few days in my spare time, and finally came to a point i figured it would be worth showing to others. This is worth massaging into a worthwhile flash game or something (definitely Glorious Trainwrecks material here); i may do that in the next few weeks.
Decent example of an endless scrolling level. I used this kind of technique with Klik & Play to create and endless bonus level, the floor was composed of active objects which moved over the screen from right to left. When such an object left the playfield at the left, it was warped to the right end again to create the scrolling effect. Because there was no inbuilt scrolling feature.
However, your game doesn't have to be autoscrolling, because you can apply the things I mentioned above in MMF with scrolling. This enables you to create a level that can be scrolled over and over, hence you never ending level.
Most arcade game count the number of levels which, I guess, is some kind of variable that can be used for adjusting speed. Remember Tetris? You start at level 0, once you've collected 10 lines the level goes up by one. So now you're at level 1 and the gamespeed slighty increased, although you won't notice this until your at level 7 or something.
You can use this in a snake kind of game, where the snake moves faster when it has eaten more food. Or in an space shooter where the new enemies arrive faster when the player has shot more ships.
So once you have a basic level which can scroll, each time it scrolled or say 10 gems are collected the level goes 1 up and the speed of something, say moving platforms changes.
The trick to the endless level of course is to sew or stitch the start and end flawless together. So that when you're at the end it's just like your at the start again.
Have fun figuring this out once you've got MMF up and running in Parallels.
Yeah, you could also go for Canabalt. But being able to dissect games like Canabalt and Robot Unicorn Attack (which is quite fun, by the way!), is part of the enjoyable thing about game-making, in my opinion.