The Daily Click ::. Forums ::. Klik Coding Help ::. some kind of "doors" competition
 

Post Reply  Post Oekaki 
 

Posted By Message

shinkan



Registered
  24/10/2008
Points
  7
24th October, 2008 at 10:13:21 -

'afternoon.


I'v been thinking for a couple of week now, about making the easiest code for
moving the player (any movement) from Doors A to Doors B and opposite.


The Idea is that:

You have 2 seperate rooms (you can acess them via doors only) on the same frame.
When you position your hero player overlaping with the doors and when you press UpArrow key or move joystick up...

That thigns should happen:

"doors A" - openning animation starts,
"player" - entering the "doors A" animation starts,
"doors A" - animation finish
"player" - move to "doors B" position,
"doors B" - openning animation starts,
"player" - exiting the "doors B" animation starts,
"doors B" - animation finish


I tried many thing to do that...from object behaviors, to really long and
(unnecessary) events - and group events, and r

Is there any formula to make it nice and easy? :>

best regards

 
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
24th October, 2008 at 10:19:44 -

example please?

like the door mechanics from super mario bros 2?

 
n/a

shinkan



Registered
  24/10/2008
Points
  7
24th October, 2008 at 11:41:28 -

right...I'll put example a bit later when i get home.

and i'm sorry cecil but i'm not a "super mario" guy and i don't know anything about it:>

 
n/a

Banbeano



Registered
  04/03/2008
Points
  5
25th October, 2008 at 00:29:11 -

You could just destroy the object, and create a new one on the at the other door.
Or you could make two active’s, and switch between them.

The destroy object can cause bugs if not used right, and the two objects is rather complected.

Just ideas though.

 
n/a

shinkan



Registered
  24/10/2008
Points
  7
25th October, 2008 at 15:44:58 -

I tried with destroing and creating objects - but it sometimes work and sometimes don't (when the player goes through door A to door B it's fine, but then when you wana go opposite way sometimes it doesn't work well - and i cannot find the reason why)



here's an example frame:

http://www.ilmc.pl/temp/doors.mfa

Image Edited by the Author.

 
n/a

Aptennap



Registered
  23/04/2004
Points
  916
25th October, 2008 at 17:01:16 -

Oke I gave it a shot : http://www.solcon.nl/s.tennapel/doors.mfa

Press up to enter a door.

The doors have a running animation now, which is the open door animation. The dissapearing animation of the player is also longer than the appearing animation, so you might want to fix that.

Did you draw the graphics and animations yourself? Because they look great.

 
Oh sweet mary.

3kliksphilip

Addict

Registered
  20/11/2007
Points
  14900

VIP MemberGOTM - MAY 2009 - 2ND PLACE!The SpinsterGOTM -NOVEMBER 2009 - 2nd place!2021 Time Trial by Fire competition winnerChristmas Game Creator!
25th October, 2008 at 23:20:10 -

That's good, Aptennap. Reminds me of Dino Crisis.

 
Don't aim for perfection- you'll miss the deadline

'~Tom~ says (16:41):
well why does the custom controls for the keyboard palyer even affect the menu controls at all whats thep oint jsutm ake it so for the keyboard palyer on the menu screens everything is always up down left right enter regardless of the controls they set'

-Mr Tom, 2010

Jon Lambert

Administrator
Vaporware Master

Registered
  19/12/2004
Points
  8235

VIP MemberWii OwnerTDC Chat Super UserI am an April FoolSSBB 3265-4741-0937ACCF 3051-1173-8012360 Owner
26th October, 2008 at 01:02:05 -

I have an engine!

http://sites.google.com/site/jlambsoft/Home/games/doors%5B1%5D.mfa?attredirects=0

I took aptennap's file and put in my engine. Both are there for comparison, but aptennap's won't work unless you activate it in the events and delete the action in the Start of frame event that spreads 1 in alterable value A for Door A and Door B.

 
Sandwich Time!Whoo!

JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364

shinkan



Registered
  24/10/2008
Points
  7
28th October, 2008 at 08:23:11 -

hey Aptennap I got almost the same event like in your example, but still when player start to appear it look's like he appears twice :> ( but again sometimes only...hmmm...) i think it's just a matter of tweaking player animation frames.
On one of my earliers trys on this problem i have something like that:
+ when door A opening animation = door A opening animation frame number 7 (when the doors are fully open)
- destroy player, make player invisible, start door B frame opening animation
+ when door B opening animation = door B opening animation frame number 7
- create player, make player visible

and it works quite nice, you just need to have good synchronization of player dissapearig/door opening and player appearing/door closing animation, it's a bit annoying but work good :>


and yes i did the graphics by myself...and thanks :>

 
n/a

Aptennap



Registered
  23/04/2004
Points
  916
28th October, 2008 at 15:24:57 -

+ when door A opening animation = door A opening animation frame number 7 (when the doors are fully open)

- destroy player, make player invisible, start door B frame opening animation
+ when door B opening animation = door B opening animation frame number 7
- create player, make player visible

Are you using this right now?
I don't understand why you destroy the player and then make him invisible.

 
Oh sweet mary.

shinkan



Registered
  24/10/2008
Points
  7
28th October, 2008 at 16:07:24 -

when you destroy player (even in your file) and then create him at some other position I've noticed that the players object "apears" and after that appearing animation is playing - so it's allready visible befor appearing animation.

but when i made him invisible after destroing and make him visible after "door b...frame 7" only appearing animation is playing...
I'll post you example of that tommorow morning.

 
n/a

Aptennap



Registered
  23/04/2004
Points
  916
28th October, 2008 at 19:35:54 -

Ah yes ofcourse, clever...

 
Oh sweet mary.

shinkan



Registered
  24/10/2008
Points
  7
29th October, 2008 at 07:45:16 -

http://www.ilmc.pl/temp/door2.mfa

but actually i modified it a bit last night. i delete that visible/invisible thing, and replace some events,
and now it's working like i want it to work - but question is still here - can it be done by using less events?
heh i probably expect to much.

oh and also added some unnecessary stuff...like sounds...no comments

 
n/a

Aptennap



Registered
  23/04/2004
Points
  916
29th October, 2008 at 17:35:15 -

Looks great I don't think it could be done with lesser events, you should not worry about it anyway. This is a great engine to use for your game. Good luck!

 
Oh sweet mary.

shinkan



Registered
  24/10/2008
Points
  7
30th October, 2008 at 07:59:29 -

Yes, I thing you are right. Thanks for all

 
n/a

Aptennap



Registered
  23/04/2004
Points
  916
30th October, 2008 at 16:15:28 -

Glad I could help

 
Oh sweet mary.
   

Post Reply



 



Advertisement

Worth A Click