Posted By
|
Message
|
Raidex
Registered 06/07/2009
Points 79
|
15th July, 2009 at 14:15:01 -
Hey there,
In Multimedia Fusion 2,
I was wondering how to make a game, change frames, when the character reaches the side of a frame, and memorize that position when appearing on the next frame, without making several frames all with the different starting spots.
i.e.
Frame 1 ----------------- Frame 2
[ ------ Leave here> ] [ < Appear here in-line ]
[ --------------------- ] [ ------------------------ ]
[ --- or Leave here> ] [ < Appear here etc. - ]
rather then always:
Frame 1 ------------- Frame 2
[----- Leave here> ] [-------------------------]
[-- or Leave here> ] [ <Always appear here -]
[-- or Leave here> ] [-------------------------]
If that makes sense.
Could you send over a tutorial?
A link, or send it to edzy_123179@hotmail.com please?
I'd really appreciate it.
Thanks.
-----------------------------
I'm a n3wb
|
AndyUK Mascot Maniac
Registered 01/08/2002
Points 14586
|
15th July, 2009 at 14:41:47 -
it's actually really easy to make something like this. You can use a global value to remember where you were coming from
all you need to do it have your game remember what the last frame number was. If your game world is quite flat and the frames line up, for instance:
Frame1 < - > Frame 2 < - > Frame 3 < - > Frame 4
if you have just reached the end of frame 1 put the frame number in a global value then move to the next frame (which would have to be frame 2 in this example)
at the start of the next frame make an event that checks both the global value (previous frame) and compares it with the current frame.
then make another line that positions the player depending on if the current frame is more or less then the global value.
If your game is more complicated and has loads of different entrances and exits you can also store the players last X and Y position in 2 other global values. You might need to if there are two entrances from the same frame.
I hope that helps.
.
|
OMC What a goofball
Registered 21/05/2007
Points 3516
|
15th July, 2009 at 17:45:34 -
Or theoretically you could store it all in one global string, using the string parser and a delimiter.
If you use the string parser object, you could add the delimiter # and then set the global string to: Str$(Frame number)+"#"+Str$(Player X)+"#"+Str$(Player Y) and then when you retrieve it, use the string parser's list tokenizing feature:
listGetAt$( "String Parser", Position) where Position would be 1, 2, or 3 to get the Frame number, X, and Y values.
|
UrbanMonk BRING BACK MITCH
Registered 07/07/2008
Points 49667
|
15th July, 2009 at 19:40:15 -
OOOOR Actually they said everything.
Have a Global Variable store the y pos of the character when leaving off the sides of the screen, and then at the start of the next frame position him in the exact same y.
Example here-
http://www.jsoftgames.com/uploads/betweenframescolling.zip
But I don't suggested this method personally. It would much better to create one big frame and make it snap from one position to another to give the effect of traveling between frames without having to pass data between them.
An Example of this is in the same file.
n/a
|
Ski TDC is my stress ball
Registered 13/03/2005
Points 10130
|
15th July, 2009 at 19:57:08 -
Use arrays? word word
n/a
|
Rob Westbrook
Registered 25/05/2007
Points 193
|
15th July, 2009 at 23:38:11 -
If it fits with your game, why not have a Knytt style system where it's all one massive level on one frame and you just jump the scrolling in relation to a grid?
There are 10 types of people in the world: Those who understand binary and those who don't.
|
Spitznagl Cabinetmaker
Registered 06/12/2008
Points 4260
|
15th July, 2009 at 23:48:51 -
Knytt stories uses a level editor, so it probably loads a new frame everytime you get off-screen.
...
|
MBK
Registered 07/06/2007
Points 1578
|
16th July, 2009 at 00:04:50 -
They've prety much said it all, but I can describe it in a more confusing way for ya. I'm good at that.
Use a global variable or an Ini file and store a number depending on where you want the character to enter into the next frame at.
Lets say that you have 4 entrances in each level, (North, South, East, and West) (1,2,3,4, respectively) ...
... Consider the gate you will need to enter from. You'll set the value to 1 if you exit a frame out the South as you will be entering the North gate of the next frame. If you exit out the East you'll set it to the West value, etc.
Then just paste the code, If value = number ---> set character position to Entrance Gate number position.
Or you could use one invisible detector as the entrance gate, and set its position based upon the ini or global value and upon start of level ---> create character at 0,0 of detector, but that's pretty much the same thing only using an unneccessary extra active.
Click Me! http://www.create-games.com/project.asp?view=main&id=1444
http://www.mediafire.com/download.php?aoo1dnnlq5i
Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?
|
UrbanMonk BRING BACK MITCH
Registered 07/07/2008
Points 49667
|
16th July, 2009 at 00:53:57 -
Rob Westbrook is refering to the first Knytt game that didn't include a level editor.
My example includes both types, multiple frames and one large frame.
http://www.jsoftgames.com/uploads/betweenframescolling.zip
n/a
|
Silveraura God's God
Registered 08/08/2002
Points 6747
|
16th July, 2009 at 05:30:31 -
On End Frame
Set Global Value A to Y Position of Object
On Start Frame
Set Y Position of Object to Global Value A
Theres no reason for complicated explanations.
http://www.facebook.com/truediamondgame
|
MBK
Registered 07/06/2007
Points 1578
|
16th July, 2009 at 08:13:19 -
Originally Posted by BrandonCOn End Frame
Set Global Value A to Y Position of Object
On Start Frame
Set Y Position of Object to Global Value A
Theres no reason for complicated explanations.
Yea, I really need to work on my communications skills.
Simplifying things is not my strong suit, but I can make anything complicated.
Click Me! http://www.create-games.com/project.asp?view=main&id=1444
http://www.mediafire.com/download.php?aoo1dnnlq5i
Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?
|
Rob Westbrook
Registered 25/05/2007
Points 193
|
18th July, 2009 at 03:18:58 -
Originally Posted by MBK
Simplifying things is not my strong suit, but I can make anything complicated.
Heh, tell me about it. Mostly in my projects overly complicated solutions arise from not knowing the more advanced but streamlined solutions. When I first tried to do Knytt style scrolling I had four separate events for the leaving the top, right, bottom and left sides of the screen, and adding or subtracting the scrolling as necessary. Four events condensed into one once I looked at the Knytt source x)
There are 10 types of people in the world: Those who understand binary and those who don't.
|
|
|