Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[solved] Platforming System States (Running, Walking, Standing)
#1
Grr....I can't wrap my head around the fact that I don't know how to execute a platforming system. I've GOTTA HAVE IT :D, and I can't seem to take 'No' for an answer (at least so far). And, guh, I spent all of yesterday trying to find out the location of 'state: 0' and 'state: 1' to no avail (you gotta give me some credit for trying :D). I'm hoping that if I ask again nicely someone might answer :D.

The reason I didn't respond to the previous topic is because it is located in the inappropriate 'Data Changing' category, is starting to get off-topic with the replies, and is pretty irrevelent to this question even otherwise.

Note to Nave: I know you want to keep these states under wraps and all, but the info needs to come out. LFE has been trying to establish a working platforming system for ages without success, and it would truly make the game a lot more fun :D if this knowledge could come out. Sorry if I'm being obnoxious, but I desperately need and want to know how to do this :D. So, to wrap up this question...

Question:

What is the coding for 'state: 0', 'state: 1', and 'state: 2'? I can decipher it myself :D. Or, if it would be easier, where are (at least) the locations for those states? I know now that I'm not the only person looking for it :D.

Thanks, this should be my last DLL question, and it's under 250 words (I think)...


~Solomon Leung

Actually, it is 261 words long... Was anything before the "question" part actually needed? :p ~ Silva
<div style="background-image:url('http://f.imagehost.org/0086/Fill.png'); filter:alpha(opacity=70); border-top:1px solid #000000; border-right:1px solid #000000; border-left: 1px solid #000000; border-bottom: 1px solid #000000"> <table border="0" width="100%"><tr><td width="500"><img src=http://g.imagehost.org/0170/FORUM_SIGNATURE.png opacity="1" alt="Little Fighter Code Lyoko"></td><td width="30"><img src="http://www.antoninasdesigns.com/images/real-gray-square.gif" width="1" height="100"></td><td><font face=monotype corsiva><font color=#0A298F><font size="4"><b><i>~Solomon Leung</size><br><font size="2">P.S. I Just Lost <a href="http://www.losethegame.org" target="_blank" style="text-decoration: none"><font color=#0A298F>The Game</font></a></b></i></font></font></size></td></tr></table></div>
Reply
Thanks given by:
#2
This make take a while, no one bothered finding state: 0 , 1 or 2(I did mange to find this one quite easily though, while writing this post). >> I know now that I'm not the only person looking for it, I think you are. Nave didn't add any new detours to the dll to create his state. I won't tell you what he did, because that would pretty much take away all the effort required on your part(and I don't remember what he was trying to do). They used hacked together states + creative dc to accomplish it.

Anyway state 2 is here:
00406551 - 83 bc 0f ac 07 00 00 02 - cmp dword ptr [edi+ecx+000007ac],02
00413b92 - 83 bc 0a ac 07 00 00 02 - cmp dword ptr [edx+ecx+000007ac],02

State 0 and 1 are probably some where here:
00413df2 - 39 84 0a ac 07 00 00 - cmp [edx+ecx+000007ac],eax
0041f635 - 8b 84 11 ac 07 00 00 - mov eax,[ecx+edx+000007ac]
00413436 - 8b 02 - mov eax,[edx] *
0040da97 - 39 bc 0a ac 07 00 00 - cmp [edx+ecx+000007ac],edi
0040db08 - 39 bc 08 ac 07 00 00 - cmp [eax+ecx+000007ac],edi
0040db52 - 39 94 08 ac 07 00 00 - cmp [eax+ecx+000007ac],edx
00421195 - 8b 94 0a ac 07 00 00 - mov edx,[edx+ecx+000007ac] *
0040dc18 - 39 bc 0a ac 07 00 00 - cmp [edx+ecx+000007ac],edi

*I suspect it'll be one of the mov ones. You'll have to scroll down from there, to look for the cmps which will find the state. That's because the state is pushed into a register and then compared later on.

Anyway, you are better DCing your platforms to get it working, that will help you think about how you want to do it(a.k.a do it properly, and copy the original states or make random states with creative dc).
[Image: doty7Xn.gif]

10 ʏᴇᴀʀs sɪɴᴄᴇ ɪʀᴄ ɢᴏᴏᴅ.ɪ ᴡᴀʟᴋ ᴛʜʀᴏᴜɢʜ ᴛʜᴇ ᴇᴍᴘᴛʏ sᴛʀᴇᴇᴛs ᴛʀʏɪɴɢ ᴛᴏ ᴛʜɪɴᴋ ᴏғ sᴏᴍᴇᴛʜɪɴɢ ᴇʟsᴇ ʙᴜᴛ ᴍʏ ᴘᴀᴛʜ ᴀʟᴡᴀʏs ʟᴇᴀᴅs ᴛᴏ ᴛʜᴇ ɪʀᴄ. ɪ sᴛᴀʀᴇ ᴀᴛ ᴛʜᴇ sᴄʀᴇᴇɴ ғᴏʀ ʜᴏᴜʀs ᴀɴᴅ ᴛʀʏ ᴛᴏ sᴜᴍᴍᴏɴ ᴛʜᴇ ɢᴏᴏᴅ ɪʀᴄ. ɪ ᴡᴀᴛᴄʜ ᴏᴛʜᴇʀ ɪʀᴄ ᴄʜᴀɴɴᴇʟs ʙᴜᴛ ɪᴛ ɪs ɴᴏ ɢᴏᴏᴅ. ɪ ᴘᴇsᴛᴇʀ ᴢᴏʀᴛ ᴀɴᴅ ᴛʀʏ ᴛᴏ ʀᴇsɪsᴛ ʜɪs sᴇxɪɴᴇss ʙᴜᴛ ɪᴛ ɪs ᴀʟʟ ᴍᴇᴀɴɪɴɢʟᴇss. ᴛʜᴇ ᴇɴᴅ ɪs ɴᴇᴀʀ.ɪ ᴛʜᴇɴ ᴜsᴜᴀʟʟʏ ʀᴇᴀᴅ sᴏᴍᴇ ᴏʟᴅ ɪʀᴄ ʟᴏɢs ᴀɴᴅ ᴄʀʏ ᴍʏsᴇʟғ ᴛᴏ sʟᴇᴇᴘ.


Reply
Thanks given by:
#3
I didn't edit states 0, 1, 2
I just created some state 5XXX which works like, if you press > the char goes to frame XXX, that nothing to do with state 0~
Reply
Thanks given by:
#4
@ Silva

Do you mind telling me where the running state ends, or how I may find the ending? Throwing me just the beginning is kinda harsh, especially since I have no clue how to look for the ending of any one feature, as ASM is just one long list of commands. Do I just look for an unconditional jump? Also, how does the engine detect input? How does it link to those stop frames?

By the way, since you probably aren't going to help very much in teaching me ASM, do you know where to find good tutorials (especially on weird commands like CDQ and FSTD that I've never seen before :D). I'm pretty sure you gave Nave a little bit more help than this...


~Solomon Leung
<div style="background-image:url('http://f.imagehost.org/0086/Fill.png'); filter:alpha(opacity=70); border-top:1px solid #000000; border-right:1px solid #000000; border-left: 1px solid #000000; border-bottom: 1px solid #000000"> <table border="0" width="100%"><tr><td width="500"><img src=http://g.imagehost.org/0170/FORUM_SIGNATURE.png opacity="1" alt="Little Fighter Code Lyoko"></td><td width="30"><img src="http://www.antoninasdesigns.com/images/real-gray-square.gif" width="1" height="100"></td><td><font face=monotype corsiva><font color=#0A298F><font size="4"><b><i>~Solomon Leung</size><br><font size="2">P.S. I Just Lost <a href="http://www.losethegame.org" target="_blank" style="text-decoration: none"><font color=#0A298F>The Game</font></a></b></i></font></font></size></td></tr></table></div>
Reply
Thanks given by:
#5
(07-01-2009, 04:34 PM)TheNave Wrote:  I didn't edit states 0, 1, 2
I just created some state 5XXX which works like, if you press > the char goes to frame XXX, that nothing to do with state 0~
Nave just said what he did. He didn't modify state 0, 1 or 2 at all.
~Member of the NTSD team~
[Image: sigk.png]
http://ntsd.open-board.com/
Reply
Thanks given by:
#6
He know. But I guess since Nave are not gonna show the code, he have to examine those state to see how it work in order to copy the > function.
Reply
Thanks given by:
#7
(07-02-2009, 02:57 AM)1477 Wrote:  @ Silva

Do you mind telling me where the running state ends, or how I may find the ending? Throwing me just the beginning is kinda harsh, especially since I have no clue how to look for the ending of any one feature, as ASM is just one long list of commands. Do I just look for an unconditional jump? Also, how does the engine detect input? How does it link to those stop frames?

By the way, since you probably aren't going to help very much in teaching me ASM, do you know where to find good tutorials (especially on weird commands like CDQ and FSTD that I've never seen before :D). I'm pretty sure you gave Nave a little bit more help than this...


~Solomon Leung

00406551 |. 83BC0F AC07000>|CMP DWORD PTR DS:[EDI+ECX+7AC],2
00406559 0F85 96020000 JNZ lf2_pers.004067F5

If state isn't equal to two, jump to 004067F5. That is probably the end.

Look at: http://spreadsheets.google.com/ccc?key=r...TUlwfdZHYQ . That lists the documented offsets for the lf2 objects. D0 = Right . In game that will look something like [eax+0d0] , obviously EAX can be something else, depending on where you are in the code.

cmp byte ptr ds:[eax+0d0],1
JNZ didn't_press_right

Stuff goes here!

didn't_press_right:

Continue rest of code

I guess that is how you can write your code. 0 = pressed, 1 = unpressed. You should also check the list to see the "Holding >" part. I'm guessing that is how Nave differentiates between "walking" and "running".

For asm tutorials > Google. I don't know any. If I ever encounter a command I don't know, and it is actually crucial(99% of the time it isn't), I google it :p.

Actually, most of the help I gave Nave was explaining how the idiv command worked, so that he could create 3xxxxxxxxxxxxxxxxxxxxxxx or something stupid like that, since he is using 5xxx, it probably means he gave up on it :p. Looking at your code from the dll thread, I already know you figured out how it works.

I think I'll repeat my self again. Finish the DC part first. Try to think about what you want. Nave new exactly what he wanted, so it was much easier for him to accomplish. You are just looking for code with no purpose, you don't even know what you are looking for. That is never a good thing.

PS: Finding the start of the code is always the hardest part...
[Image: doty7Xn.gif]

10 ʏᴇᴀʀs sɪɴᴄᴇ ɪʀᴄ ɢᴏᴏᴅ.ɪ ᴡᴀʟᴋ ᴛʜʀᴏᴜɢʜ ᴛʜᴇ ᴇᴍᴘᴛʏ sᴛʀᴇᴇᴛs ᴛʀʏɪɴɢ ᴛᴏ ᴛʜɪɴᴋ ᴏғ sᴏᴍᴇᴛʜɪɴɢ ᴇʟsᴇ ʙᴜᴛ ᴍʏ ᴘᴀᴛʜ ᴀʟᴡᴀʏs ʟᴇᴀᴅs ᴛᴏ ᴛʜᴇ ɪʀᴄ. ɪ sᴛᴀʀᴇ ᴀᴛ ᴛʜᴇ sᴄʀᴇᴇɴ ғᴏʀ ʜᴏᴜʀs ᴀɴᴅ ᴛʀʏ ᴛᴏ sᴜᴍᴍᴏɴ ᴛʜᴇ ɢᴏᴏᴅ ɪʀᴄ. ɪ ᴡᴀᴛᴄʜ ᴏᴛʜᴇʀ ɪʀᴄ ᴄʜᴀɴɴᴇʟs ʙᴜᴛ ɪᴛ ɪs ɴᴏ ɢᴏᴏᴅ. ɪ ᴘᴇsᴛᴇʀ ᴢᴏʀᴛ ᴀɴᴅ ᴛʀʏ ᴛᴏ ʀᴇsɪsᴛ ʜɪs sᴇxɪɴᴇss ʙᴜᴛ ɪᴛ ɪs ᴀʟʟ ᴍᴇᴀɴɪɴɢʟᴇss. ᴛʜᴇ ᴇɴᴅ ɪs ɴᴇᴀʀ.ɪ ᴛʜᴇɴ ᴜsᴜᴀʟʟʏ ʀᴇᴀᴅ sᴏᴍᴇ ᴏʟᴅ ɪʀᴄ ʟᴏɢs ᴀɴᴅ ᴄʀʏ ᴍʏsᴇʟғ ᴛᴏ sʟᴇᴇᴘ.


Reply
Thanks given by:
#8
(07-02-2009, 06:55 AM)Lord Silva Wrote:  I guess that is how you can write your code. 0 = pressed, 1 = unpressed. You should also check the list to see the "Holding >" part. I'm guessing that is how Nave differentiates between "walking" and "running".
0 = unpressed, 1 = pressed, 'nd I didn't use the "holding >" part, somehow it didn't work correctly, so the difference between walking and running has been dc'ed
Reply
Thanks given by:
#9
Ok, I got this half-working with Silva's guidance. The states are all done, the entire technique (DC part) is still in the process of being completed :D.

Problem Solved.


~Solomon Leung
<div style="background-image:url('http://f.imagehost.org/0086/Fill.png'); filter:alpha(opacity=70); border-top:1px solid #000000; border-right:1px solid #000000; border-left: 1px solid #000000; border-bottom: 1px solid #000000"> <table border="0" width="100%"><tr><td width="500"><img src=http://g.imagehost.org/0170/FORUM_SIGNATURE.png opacity="1" alt="Little Fighter Code Lyoko"></td><td width="30"><img src="http://www.antoninasdesigns.com/images/real-gray-square.gif" width="1" height="100"></td><td><font face=monotype corsiva><font color=#0A298F><font size="4"><b><i>~Solomon Leung</size><br><font size="2">P.S. I Just Lost <a href="http://www.losethegame.org" target="_blank" style="text-decoration: none"><font color=#0A298F>The Game</font></a></b></i></font></font></size></td></tr></table></div>
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)