The Daily Click ::. Forums ::. Klik Coding Help ::. Best way to set up an endless level?
 

Post Reply  Post Oekaki 
 

Posted By Message

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
1st March, 2012 at 01/03/2012 10:30:56 -

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?

Thanks.

 
Image

Tell 'em Babs is 'ere...

s-m-r

Slow-Motion Riot

Registered
  04/06/2006
Points
  1078

Candle
1st March, 2012 at 01/03/2012 12:57:10 -

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.

Best of success, Liam!

 
n/a

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
1st March, 2012 at 01/03/2012 20:13:41 -

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!

 
Image

Tell 'em Babs is 'ere...

s-m-r

Slow-Motion Riot

Registered
  04/06/2006
Points
  1078

Candle
1st March, 2012 at 01/03/2012 21:50:12 -

Actually, it does sound kinda fun. I ought to try it myself.

If I have an example put together in a reasonable amount of time, I will be sure to post it here or otherwise let you know somehow.

 
n/a

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
2nd March, 2012 at 02/03/2012 13:09:02 -

Sounds cool to me s-m-r!! Thanks!

 
Image

Tell 'em Babs is 'ere...

blubblub



Registered
  29/02/2012 23:35:38
Points
  14
2nd March, 2012 at 02/03/2012 16:18:08 -

Hi

Sorry for highjacking your topic.
I read your first post and thought i should try it out.

http://www.mediafire.com/?jlicm74fn9mljzv

This is how i would do it. Unless of course i absolutely misunderstood your post.

I'm new to Fusion so i don't know if the way i have done it is bad if there are any better ways to do it. Maybe someone with more knowledge than me can have a look at it.

Anyways, maybe you get an idea from my example!

Regards

Edited by blubblub

 
n/a

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
6th March, 2012 at 06/03/2012 22:47:36 -

I've not got access to Windows(or MMF2) right now, so I can't check that example yet - I'll be sure to come back once I've got it sorted! Thanks!

 
Image

Tell 'em Babs is 'ere...

s-m-r

Slow-Motion Riot

Registered
  04/06/2006
Points
  1078

Candle
6th April, 2012 at 06/04/2012 15:12:37 -

*blows dust off this thread*

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.

 
n/a

nivram



Registered
  20/07/2006
Points
  171
6th April, 2012 at 06/04/2012 15:56:59 -

blubblub. On your link I get invalid or deleted file.

Marv

 
458 MMF2 & CTF 2.5 examples and games

http://www.castles-of-britain.com/mmf2examples.htm

s-m-r

Slow-Motion Riot

Registered
  04/06/2006
Points
  1078

Candle
6th April, 2012 at 06/04/2012 17:54:26 -

Here's my example files for an infinitely-generating platform skill-jumper game. It's poorly-commented, but at least things are organized in groups.

You can download it here:

www.let-off.com/software/examples/infplatforms/infplatform.zip

What's included:

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.

Hope the example is useful. Enjoy!

 
n/a

Jenswa

Possibly Insane

Registered
  26/08/2002
Points
  2723
7th April, 2012 at 07/04/2012 11:57:13 -

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.

 
Image jenswa.neocities.org

s-m-r

Slow-Motion Riot

Registered
  04/06/2006
Points
  1078

Candle
10th April, 2012 at 10/04/2012 20:47:29 -

Hahaha! I'm going to do this game a little differently, and instead of a spaceship, the player is a pizza or bagel running away from the oven...

 
n/a

Cazra

Crazy?

Registered
  24/07/2002
Points
  4472

Game of the Week WinnerVIP Member
15th April, 2012 at 15/04/2012 19:22:12 -

"I'm wanting to make an arcade style game which never ends. So basically it just gets faster or whatever until you lose."

Hmm... this sounds familiar...

http://games.adultswim.com/robot-unicorn-attack-twitchy-online-game.html

 
n/a

s-m-r

Slow-Motion Riot

Registered
  04/06/2006
Points
  1078

Candle
16th April, 2012 at 16/04/2012 21:59:23 -

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.

 
n/a

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
25th April, 2012 at 25/04/2012 15:42:26 -


Originally Posted by Stephen [NeonairGames]
"I'm wanting to make an arcade style game which never ends. So basically it just gets faster or whatever until you lose."

Hmm... this sounds familiar...

http://games.adultswim.com/robot-unicorn-attack-twitchy-online-game.html

My idea is nothing like that game at all. But yes, how the platforms come into play is pretty much what I meant. Well, close enough.

I looked at that tutorial (Installed Windows now YAY!) and It's helping a lot! Just the 3 events at the bottom I needed really Hope I can actually bring myself to finish a game this time!

Thanks so much for the help guys!

 
Image

Tell 'em Babs is 'ere...
   

Post Reply



 



Advertisement

Worth A Click