The Daily Click ::. Forums ::. Klik Coding Help ::. Collectibles & Engines
 

Post Reply  Post Oekaki 
 

Posted By Message

Maisnon



Registered
  20/01/2008
Points
  14
19th February, 2008 at 13:48:10 -

Why hello there!

I've been making games with TGF for a long time, but I always used standard movement, no really advanced solutions and stuff like that.

I recently became interested in making stuff again, and dived back in, this time with MMF 2. The first project is a simple platformer based loosely on Addams Family for the SNES, and elements from, yes, Gradius. I made my own engine using and adjusting a platform engine tutorial, and got the basic physics down nicely, but here come the problems.

The first: a global engine How far completed do i really need to have my engine before I start making the levels? The thing is, I want to use multiple characters with different abilities (different jump heights and speeds are not that much of a problem) which I honestly not yet have concretely decided upon for every character.

Is there a way to make the engine more global, or do I really need to adjust every level over and over? (is this done with that nifty Behaviours thing I saw?)

The second problem: collectibles remain picked up The game itself has a very open structure, you can move from screen to screen freely (it's a little bit of a free roaming platform game). But when I move away from a frame where I picked up some stuff, on return, they logically reload which is really exploitable.

How can I make a collectible (or doing it framewise) remember that it is picked up while I move away from the frame?

The last problem: A more general problem on bouncing balls In a side view that is, of course. I have some enemies that need to bounce around, and some of their projectiles.

How can a ball alike object distinguish between colliding with the floor and colliding with the wall?

And that's it basically. There are probably some noobish things in there, so go easy on me. And to show that it is not all for nothing, I have some screens of the game so far (in all it's 1 and a half level gloryness)

Image
Image
Image

 
The first man to compare the cheeks of a young woman to a rose was obviously a poet; the first to repeat it was possibly an idiot.

Ski

TDC is my stress ball

Registered
  13/03/2005
Points
  10130

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!KlikCast HelperVIP MemberWii OwnerStrawberryPicture Me This Round 28 Winner!PS3 OwnerI am an April Fool
Candy Cane
19th February, 2008 at 14:02:07 -

Looks real cute!

 
n/a

Maisnon



Registered
  20/01/2008
Points
  14
19th February, 2008 at 15:03:51 -

Thanks Adam

Hopefully I can get the gameplay up to the same satisfactory level as the graphics .. Just too eager to build lots of levels already!

 
The first man to compare the cheeks of a young woman to a rose was obviously a poet; the first to repeat it was possibly an idiot.

Maisnon



Registered
  20/01/2008
Points
  14
20th February, 2008 at 14:12:58 -

Not a simple piece of small advice anyone?

Not even on the collectibles remaining picked up?

 
The first man to compare the cheeks of a young woman to a rose was obviously a poet; the first to repeat it was possibly an idiot.

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
20th February, 2008 at 16:29:24 -

ini's are your friend. that is all.

 
n/a

Maisnon



Registered
  20/01/2008
Points
  14
20th February, 2008 at 16:47:57 -


Originally Posted by cec¿l
ini's are your friend. that is all.



I was considering using ini's for the collectibles, but I was hoping there was a way that did not involve storing every single object in the game in a text file...

Well, that is, I am guessing you are talking about storing collectibles in an ini

 
The first man to compare the cheeks of a young woman to a rose was obviously a poet; the first to repeat it was possibly an idiot.

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
20th February, 2008 at 16:52:02 -

you could save them in an array. anyway you slice it. external storage is probably the way to go. unless you use globals which couls be troublesome. or instead of haveing every area of a level on a different frame. just have them all in one and just scroll the screen

 
n/a

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
20th February, 2008 at 16:54:37 -

is that christopher walken in your avatar?

 
n/a

Dustin Gunn

Gnarly Tubular Way Cool Awesome Groovy Mondo

Registered
  15/12/2004
Points
  2659

Game of the Week WinnerKlikCast StarVIP MemberI'm on a BoatGOTW Winner Oct 2010Kliktober Special Award Tag
20th February, 2008 at 17:20:27 -

My advice:

For the engine, unless you love copying and pasting, I'd recommend you get your engine as close to finished as possible before duplicating frames. This is probably the biggest problem with clickteam products, and basically sapped 2-3 years of worktime on my game because I wanted to make absolutely sure everything was final.

The alternative, if you don't use qualifiers at all, is to transfer all your code to global events. Qualifiers are damn useful of course, but it's an option. To access the global events editor click on the game icon and in the properties window under events there's an "events" button.

For bouncing balls, you could make an engine that moves its X and Y movements seperately, for all 4 directions, and check for collisions after every direction like:

*Is Xspeed < 1
-Move left
*Is over obstacle?
-Move right one, now you know it's collided with the right wall

*Is Yspeed > 1
-Move down
*Is over obstacle?
-Move up one, now you know it's collided with the floor

 
n/a

nim



Registered
  17/05/2002
Points
  7233
20th February, 2008 at 18:54:23 -

For the bouncing ball/background collisions movement, I have an example that works in the way that Dustin described. It's far from perfect (it doesn't deal well with "above" collisions) but you might find it useful.
http://lowflyingcow.googlepages.com/backdropCollisions.mfa

As for the collectible items, you're going to have to store some values in some kind of way. If you want to use inis, know that they're just text files and can be accessed by anyone. If you use an array, you'll probably have to think about the structure of it and keep a note of what each value stands for.

 
//

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
20th February, 2008 at 19:35:12 -


Originally Posted by cec¿l
is that christopher walken in your avatar?


It looks like Ben Stiller's Dad to me.

 
Image

Tell 'em Babs is 'ere...

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
20th February, 2008 at 19:37:20 -

jerry stiller
Image

chris walken
Image

 
n/a

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
20th February, 2008 at 19:39:41 -

Well I believe that answered our question!


Deffo Ben Stiller's papa

Image Edited by the Author.

 
Image

Tell 'em Babs is 'ere...

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
20th February, 2008 at 19:41:53 -

jerry stiller doesnt have that boney forehead. and hes freakin old.

 
n/a

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
20th February, 2008 at 19:45:18 -

and this proves it. its the same picture without being cropped.

its walken. yay

Image

 
n/a

Xhunterko



Registered
  07/05/2003
Points
  1015

VIP MemberHas Donated, Thank You!Hasslevania 2!Pokemon Ball!
20th February, 2008 at 19:57:39 -

ini are your friend...if you want to save something. However, the best way to store collectables is to keep the count in the characters alterable values, then carry those values over frames with the Shared Data Object. That little object saved my game many times. You can find it in clickteams download center for extensions for mmf.

 
All platforming problems can be mostly solved here:

http://www.clickteam.com/mbfiles2/277308-engine.zip
http://www.angelfire.com/games5/psywakd/platform.gam
www.zephni.com

These are very excellent examples by other people and are very informative.
Image

I work at the speed of "maybe".

Coming Soon: Diary Of An Indie Developer
http://www.youtube.com/watch?v=XaF6H9MrgH8

Twitter:
http://twitter.com/xhunterko

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
20th February, 2008 at 19:59:49 -

he means specific items that have been picked up. so they dont appear again. if you just store how many youve picked up it wont remember WHICH ones were picked up.

 
n/a

Maisnon



Registered
  20/01/2008
Points
  14
20th February, 2008 at 21:29:45 -

"fellas! fellas!" It's Walken

Thanks for the loads of help! Wow!

I am definately going global events, I am working with everything in qualifiers now anyway (and the different ehr, properties of units are stored in their own alterable values which I call upon when talking about a certain qualifier)

I spend most of the night making a weird song about elephants, girls eating lots of bread putting their feces with care in other peoples mouth, losing cows because someone sees everything black and white, and if that is not awesome enough, all these replies suddenly

I'll keep everyone updated. On the game that is, not on the crapping women.

 
The first man to compare the cheeks of a young woman to a rose was obviously a poet; the first to repeat it was possibly an idiot.

Dustin Gunn

Gnarly Tubular Way Cool Awesome Groovy Mondo

Registered
  15/12/2004
Points
  2659

Game of the Week WinnerKlikCast StarVIP MemberI'm on a BoatGOTW Winner Oct 2010Kliktober Special Award Tag
20th February, 2008 at 22:38:38 -

I mean qualifiers can't be used in global events, not the other way around.

 
n/a

viva/volt

Awesome Sauce

Registered
  26/08/2006
Points
  1694

Game of the Week WinnerSilverNova MemberKlikCast StarVIP Member
21st February, 2008 at 00:54:58 -


Originally Posted by Nim
F... (it doesn't deal well with "above" collisions) ...



When I do engines this was the above collisions always work O_o.

Anyway the easiest way I can think of is to use an ini file (or associative array, because it's awesome for what I'm about to say) and when you hit a projectile create a value in the ini/assarray named OBJECTX.OBJECTY (implying the objects x and y co-ords) and set it to 1.

Then say:

Start of frame -
Spread value 0 in Alterable value A of collectable

and in a seperate start of frame:

Start of frame -
Start fastloop "collectables"

On loop "collectables" and Alterable value A("collectable") = loopindex("collectables") and ini/assarray entry str$(X("collectable"))+","+Str$(Y("collectable"))) = 1 -
Destroy "collectable"

EDIT: Ok just disregard what I said . Here's the example:

INI: http://www.silvernova.co.uk/examples/collectables(ini).zip
ASSARRAY: http://www.silvernova.co.uk/examples/collectables(assarray).zip
THE ASSARRAY EXTENSION DOWNLOAD PAGE: http://www.bumderland.com/objects/index.html

Hope this helps .

lol I'm an idiot, I spelt collectible wrong every single time! >_<

Image Edited by the Author.

 
Image
http://bfollington.tumblr.com

Maisnon



Registered
  20/01/2008
Points
  14
21st February, 2008 at 05:34:47 -


Originally Posted by Dustin Gunn
I mean qualifiers can't be used in global events, not the other way around.



Argh, I see it now, I misread it. No qualifier's in global event? Crap, it seemed like such an ideal option. Why doesn't that work anyway, it's silly

And Ben, thank you for the.. Collectable example.

 
The first man to compare the cheeks of a young woman to a rose was obviously a poet; the first to repeat it was possibly an idiot.

viva/volt

Awesome Sauce

Registered
  26/08/2006
Points
  1694

Game of the Week WinnerSilverNova MemberKlikCast StarVIP Member
21st February, 2008 at 06:00:44 -

Haha, oh and the reason that qualifiers can't be used globally is something clickteam only knows I think. It causes some... Issues with objects.

 
Image
http://bfollington.tumblr.com

Maisnon



Registered
  20/01/2008
Points
  14
21st February, 2008 at 06:06:37 -

So basically, the choices I have are:

Making the entire engine first before all the levels, with qualifiers so it's handled easier later. Any adjustments I need to adjust in every single frame over again.

Using global events, but having to copy the entire engine for every player object (since it has like 5 characters that are playable).

Just... swell

And do behaviours work like global events?

 
The first man to compare the cheeks of a young woman to a rose was obviously a poet; the first to repeat it was possibly an idiot.

Dustin Gunn

Gnarly Tubular Way Cool Awesome Groovy Mondo

Registered
  15/12/2004
Points
  2659

Game of the Week WinnerKlikCast StarVIP MemberI'm on a BoatGOTW Winner Oct 2010Kliktober Special Award Tag
21st February, 2008 at 06:36:46 -

if you make the object global they should, but I've never used them

I've been trying to get Clickteam to make a solution to not having global qualifiers for years but I guess they don't think it's a big enough problem to focus on (Even though it's their biggest problem)

Image Edited by the Author.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click