Posted By
|
Message
|
The_Antisony At least I'm not Circy
Registered 01/07/2002
Points 1341
|
13th August, 2009 at 07:30:59 -
Firstly, I'm not making a fan game. I've simply been trying to reproduce an engine somewhat identical to the one used in Super Mario Bros. 3 on NES.
Secondly, the events I used work, but I'm trying to streamline things a bit, so my question becomes "is there a more efficient way to do this?".
I'm building an engine with detector sprites and laying the character sprites over them, so as far as variables and counters go, I'd like to stray as far away from manipulating object variables as much as possible. I'd much rather control things from a level-counter or a global variable so that everything is completely controllable when I begin making levels.
Right now, I'm using the platform movement object. If anyone can think of a clear and undisputable reason why I should be crafting a static movement engine from scratch, I'd like to know now, since I'm still in the early stages of development.
This is what I've got:
--SPEED METER--
Mask = Collision tester (main character, if you want to think about it that way).
Speed Meter = a 9 digit bitmap counter.
PMO
JPO.3 = Joypad Object v3.0
Blinkie = Active object that signifies the Speed Meter is full.
This is the events I have scripted for the speed meter:
::If PMO's Xvelocity is greater than 230 (Mask walking speed) while moving right, add 1 to Speed Meter every 00"-25 seconds.
Test: PMO GetXvelocity ("Mask")>230
Test: GetXvelocity ("Mask")<=500
Test: Every 00"-25
Result: Add 1 to "Speed Meter".
::If PMO's Xvelocity is greater than 230 (Mask walking speed) while moving left, add 1 to Speed Meter every 00"-25 seconds.
Test: PMO GetXvelocity ("Mask")<-230
Test: GetXvelocity ("Mask")>=-500
Test: Every 00"-25
Result: Add 1 to "Speed Meter".
::If PMO's Xvelocity is less than 230 or -230, Mask is not running, therefore, subtract 1 from Speed Meter every 00"-25 seconds.
Test: PMO GetXvelocity ("Mask")<230
Test: GetXvelocity ("Mask")>=-230
Test: Every 00"-25
Result: Add 1 to "Speed Meter".
::Make the speed meter blink when it reaches 9 using a separate active object.
Test: "Speed Meter" = 9
Result: Change "Blinky" animation to flashing.
::Make the speed meter blink when it reaches 9 using a separate active object.
Test: "Speed Meter" <> 9
Result: Change "Blinky" animation to stopped.
--BASIC MOVEMENT--
::Stop "Mask" when it hits a obstacle.
Test: PMO Test for object overlap.
Test: "Mask" is overlapping a backdrop.
Result: PMO Selected object overlaps obstacle.
::Move left.
Test: Repeat while "left arrow" is pressed.
Test: OR (filtered)
Test: JPO.3 direction of joypad 1 is 4 (left).
Result: PMO user is holding the left input key.
::Move right.
Test: Repeat while "right arrow" is pressed.
Test: OR (filtered)
Test: JPO.3 direction of joypad 1 is 0 (right).
Result: PMO user is holding the right input key.
::Run.
Test: Repeat while "X" is pressed.
Test: OR (filtered)
Test: JPO.3 repeat while pressed joypad 1 button 3.
Result: PMO set Xvelocity to 500.
Result: PMO set Xaccelleration to 25.
Result: PMO set ecelleration to 35.
::Stop running.
Test: NEGATED Repeat while "X" is pressed.
Test: JPO.3 Joypad 1 button 3 is released.
Result: PMO set Xvelocity to 200.
Result: PMO set Xaccelleration to 50. <-Yeah, that's on purpose.
Result: PMO set ecelleration to 13.
--JUMPING--
::Make "Mask" jump.
Test: PMO Object is standing on ground.
Test: Upon pressing "Z".
Test: OR (filtered)
Test: JPO.3 Joypad 1 button 1 is pressed.
Result: PMO Jump.
::Make "Mask"'s jump height depend on PMO Xvelocity (running speed).
Test: Get Xvelocity < 200
Result: PMO Set jump strength to 575.
::The rest of this simply determines jump height by "Speed Meter" value (1-9).
Test: "Speed Meter" = 1
Result: PMO Set jump strength to 596.
-------------
Test: "Speed Meter" = 2
Result: PMO Set jump strength to 617.
-------------
Test: "Speed Meter" = 3
Result: PMO Set jump strength to 638.
-------------
Test: "Speed Meter" = 4
Result: PMO Set jump strength to 659.
-------------
Test: "Speed Meter" = 5
Result: PMO Set jump strength to 680.
-------------
Test: "Speed Meter" = 6
Result: PMO Set jump strength to 706.
-------------
Test: "Speed Meter" = 7
Result: PMO Set jump strength to 731.
-------------
Test: "Speed Meter" = 8
Result: PMO Set jump strength to 753.
-------------
Test: "Speed Meter" = 9
Result: PMO Set jump strength to 775.
-------------
I would like to simply the events. The event scripting just feels too "loose" to me; like if I were to complete the game based off the current movement engine, it'd be buggy as hell. If anyone can offer any suggestion, let me know!
I haven't had much luck with purely custom static engines in the past, but if using one would be a vast improvement on application speed or would make the engine far more solid, I'd be willing, but I might need a lot of help.
Anyway, here's the project file if anyone would like to play with it:
[url]http://www.mediafire.com/?nwtz3myjnau[/url]
I made it in MMF2, and you'll need the:
Platform movement object
Joypad Object v.3.0
Yes, I ripped the speed meter from SMB3, but I will be replacing it later. I just wanted to ensure something like it would work.
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?
|
The_Antisony At least I'm not Circy
Registered 01/07/2002
Points 1341
|
13th August, 2009 at 07:38:49 -
Wow... the formatting in that post sure went to hell.
Apparently, the forum doesn't use standard BBcode anymore, so here's the link to the project file:
http://www.mediafire.com/?nwtz3myjnau
If that doesn't come up as a clickable link, just copy/paste it, I guess.
Secondly, my apologies for the double-post. I'm not attempting to postbump or drive up my post count. I just want some help, and the way the post was formatted really distracted from that. Too dang bad that I don't know how to disable smileys up in this piece.
Edited by The_Antisony
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?
|
|
|