Jump to content


Photo

Command Stack usage in GMS


  • Please log in to reply
57 replies to this topic

#41 lordvtp

lordvtp

    GMC Member

  • GMC Member
  • 343 posts
  • Version:GM:Studio

Posted 28 May 2012 - 03:43 AM

Holy Crap! Things worked as expected!

Output as Follows -

100000 IN CommandsPerform
100000 OUT CommandsPerform
100000 IN CommandsStackPush
100000 IN PatrolToXY
100000 OUT PatrolToXY
100000 OUT CommandStackPush

- repeat Except for when the two instances interact..

You know I really wish they'd lets us copy/paste from the compile window.

So seeing all this, what has this revealed about the new runner and how major is this going to impact the more complex systems in game maker?
  • 0

#42 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14393 posts
  • Version:GM:Studio

Posted 28 May 2012 - 03:50 AM

Are you saying the AI walks as it should (I'm conflicted with the 2 statements)

>>Holy Crap! Things worked as expected!
>>- repeat Except for when the two instances interact..

I need to see more lines from the output (paste the output in code tags too). a few pages from the debug window should do. Right now I only see the boot sequence of the AIs

You have to pause the game in the debugger first...
  • 0

#43 lordvtp

lordvtp

    GMC Member

  • GMC Member
  • 343 posts
  • Version:GM:Studio

Posted 28 May 2012 - 04:57 AM

Yes the AI's Moved with this new file!

Posted Image

Ok I hope this IS what you wanted, I cant seem to be able to copy/paste from any of the debug or compile windows...
  • 0

#44 lordvtp

lordvtp

    GMC Member

  • GMC Member
  • 343 posts
  • Version:GM:Studio

Posted 28 May 2012 - 05:15 AM

Update, this version works for me on windows and android as well! Soo, what changed? ::lmao::
  • 0

#45 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14393 posts
  • Version:GM:Studio

Posted 28 May 2012 - 05:31 AM

What changed? Nothing... Well there is a boot room now that allows me to setup the debug system before the game gets debugged and the debug functions that I added.


Could it be GMS screwed up in the import process?


Do you have GM7,8,8.1? Try adding a new script in the original GMK with GM8 or whatever and try to import that file in GMS...

It's a shame you cant copy and paste from the debug box. They replaced it with a list box
  • 0

#46 lordvtp

lordvtp

    GMC Member

  • GMC Member
  • 343 posts
  • Version:GM:Studio

Posted 28 May 2012 - 05:45 AM

I have 8.1... but adding a script then importing didint reveal anything...
buuuuutt... We do know that GMS uses the first room you load to set a lot of things now doesnt it?
Second, I became aware of this problem initially when I added it too my own project in gmhtml5 beta/ then studo beta as it became available... To this moment it still functions in the delphi runner and in HTML but does not perform actions in C++ windows /android. I mention this because i did not import the scripts, I manually copyied and added them.. No imports involved.
  • 0

#47 lordvtp

lordvtp

    GMC Member

  • GMC Member
  • 343 posts
  • Version:GM:Studio

Posted 28 May 2012 - 06:00 AM

It would be interesting if you distributed the project file instead on your end rather then the original GMK to see it that made a differance. IE a no 'foreign' import... if your unaltered GMS project worked as intended on my end it would prove something at least. Perhaps you could just rar the whole dir?

Edited by lordvtp, 28 May 2012 - 06:02 AM.

  • 0

#48 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14393 posts
  • Version:GM:Studio

Posted 28 May 2012 - 06:08 AM

Oh.... You should have mentioned you manually added the stuff in...

I'm gonna ask a few questions and tell you to do things and answer concisely...

1) Did you ever run the original demo as an import in GMS? I know nakedpaultoast probably did, he had problems with it from that point on, post #14.

2) Can you run the original demo as import in GMS? do you have the problem?

3)Could it be you made a typo in the function names while you manually added them. Could there be a leading or trailing space in there?

4)Is it possible the code changed when it was pasted in, a problem similar to what happens on the forum...

if(this=that) somefunction(sdfg,asf,asfd,asfd,asfd,as,fdas,fdas,fdasf,asffasdf,asf,asf)

see how the forum changed the formatting
if(this = that) somefunction(sdfg, asf, asfd, asfd, asfd, as, fdas, fdas, fdasf, asffasdf, asf, asf)


Maybe some code got pushed outside of an if statement....
  • 0

#49 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14393 posts
  • Version:GM:Studio

Posted 28 May 2012 - 06:13 AM

Here is the gmz
http://www.host-a.ne...ommandstack.gmz
  • 0

#50 lordvtp

lordvtp

    GMC Member

  • GMC Member
  • 343 posts
  • Version:GM:Studio

Posted 28 May 2012 - 06:17 AM

1 - When i say unaltered original or modified debug I am refering to the original demo. That is what I have been using for this whole process. As released it functions for me in 8.1 / html5 / pre-studio delphi runners ...

2 - Sooo.. the original demo does not function imported to GMS for me (on any machine).

3- If my own project that I copy pasted over was that kind of fault, it wouldnt run in the other runners =)
  • 0

#51 lordvtp

lordvtp

    GMC Member

  • GMC Member
  • 343 posts
  • Version:GM:Studio

Posted 28 May 2012 - 06:26 AM

1: Ok, just to make doublesure and not make a total fool out of myself i just re-imported the demo from original link - no actions work

2: Your new GMZ file you just posted however is fully functional!

WTH?!

Edited by lordvtp, 28 May 2012 - 06:26 AM.

  • 0

#52 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14393 posts
  • Version:GM:Studio

Posted 28 May 2012 - 06:33 AM

This is just to have a post with all our findings. It's hard to go back and forth in the posts

1 - When i say unaltered original or modified debug I am refering to the original demo. That is what I have been using for this whole process. As released it functions for me in 8.1 / html5 / pre-studio delphi runners ...

2 - Sooo.. the original demo does not function imported to GMS for me (on any machine).

OK, pfew. at least that is consistent with post 14...

3- If my own project that I copy pasted over was that kind of fault, it wouldnt run in the other runners =)

Depends on the problem that could have infiltrated. Because HTML vs Windows is not the same language... HTML5 is Java and Windows is GML

4) Did you try the gmz I posted above?


So, If I resume the whole issue ATM

1) The original demo, imported in GMS does not work
2) The original demo, imported in GMS, where you added your stuff (not mine) does not work
3) The debugging version, imported in GMS does work
4) The gmz does work

are those 4 statements correct?
  • 0

#53 lordvtp

lordvtp

    GMC Member

  • GMC Member
  • 343 posts
  • Version:GM:Studio

Posted 28 May 2012 - 06:36 AM

1) The original demo, imported in GMS does not work
2) The original demo, imported in GMS, where you added your stuff (not mine) does not work
3) The debugging version, imported in GMS does work
4) The gmz does work




Those 4 statements are correct sir!
  • 0

#54 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14393 posts
  • Version:GM:Studio

Posted 28 May 2012 - 06:55 AM

There is no resolving this by code, we could not narrow it to a function, we cannot point yoyo to such function so they could double check for say a potential limit bug... The functions work.

From what I can deduce the problem must be happening at import time just for you and NPT (post 14), some sort of fluke that you can reproduce... But a fluke nonetheless.


As we say, if you cant beat it bypass it.

To only viable solution is you can use the gmz as the base for your project. I will add the gmz to the zip.


I also re-opened all the gmks and re-saved them. Maybe that could fix it. you are welcome to try to import the gmk...

http://www.host-a.ne...ommandstack.zip
  • 0

#55 lordvtp

lordvtp

    GMC Member

  • GMC Member
  • 343 posts
  • Version:GM:Studio

Posted 28 May 2012 - 07:05 AM

I'm gona take a crack at reintegrating the code into my project from the gmz ver , I feel 75% sure this ought to work. Holy Heck this has been a long slog...and I thank you again for your time and patience
  • 0

#56 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14393 posts
  • Version:GM:Studio

Posted 28 May 2012 - 07:12 AM

I'm gona take a crack at reintegrating the code into my project from the gmz ver , I feel 75% sure this ought to work. Holy Heck this has been a long slog...and I thank you again for your time and patience



Patience and perseverance it the programer's virtue. I've seen worst. I do hope you learned a few tricks along the way!
  • 0

#57 lordvtp

lordvtp

    GMC Member

  • GMC Member
  • 343 posts
  • Version:GM:Studio

Posted 28 May 2012 - 07:26 AM

Ladies and gentlemen was have a winner!(and a culprit!)

There was definite changes between the old non working import version and the GMZ ver!

The changes lie in 'control' scripts CommandStackSequenceAdd, CommandListAdd, CommandStackPush.



Buy copying over the changed code to my own project is too is now fully functional.

The differences in code are centered around sections like this.

NEW
var data;
data = instance_create(-10000,-10000,cmdDataObj);
data.action = 0;
data.arg1 = argument1;
data.arg1 = argument1;
data.arg2 = argument2;
data.arg3 = argument3;
data.arg4 = argument4;
data.arg5 = argument5;
data.arg6 = argument6;
data.arg7 = argument7;
data.arg8 = argument8;
data.arg9 = argument9;
data.arg10 = argument10;
data.arg11 = argument11;
data.arg12 = argument12;
data.arg13 = argument13;
data.arg14 = argument14;
data.arg15 = argument15;


ds_stack_push(m_cmdtmpscripts, argument0);
ds_stack_push(m_cmdtmpdata, data);

script_execute(argument0, data);

data.action = 2;

OLD

var data;
data = instance_create(-10000,-10000,cmdDataObj);
data.action = 0;
if (argument_count > 1) data.arg1 = argument[1];
data.arg2 = 0;
if (argument_count > 2) data.arg2 = argument[2];
data.arg3 = 0;
if (argument_count > 3) data.arg3 = argument[3];
data.arg4 = 0;
if (argument_count > 4) data.arg4 = argument[4];
data.arg5 = 0;
if (argument_count > 5) data.arg5 = argument[5];
data.arg6 = 0;
if (argument_count > 6) data.arg6 = argument[6];
data.arg7 = 0;
if (argument_count > 7) data.arg7 = argument[7];
data.arg8 = 0;
if (argument_count > 8) data.arg8 = argument[8];
data.arg9 = 0;
if (argument_count > 9) data.arg9 = argument[9];
data.arg10 = 0;
if (argument_count > 10) data.arg10 = argument[10];
data.arg11 = 0;
if (argument_count > 11) data.arg11 = argument[11];
data.arg12 = 0;
if (argument_count > 12) data.arg12 = argument[12];
data.arg13 = 0;
if (argument_count > 13) data.arg13 = argument[13];
data.arg14 = 0;
if (argument_count > 14) data.arg14 = argument[14];
data.arg15 = 0;
if (argument_count > 15) data.arg15 = argument[15];


ds_stack_push(m_cmdtmpscripts, argument0);
ds_stack_push(m_cmdtmpdata, data);

script_execute(argument0, data);

data.action = 2;


By replacing the scripts with the older code the system works!
  • 1

#58 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14393 posts
  • Version:GM:Studio

Posted 28 May 2012 - 08:10 AM

Oh my... That is a gm8.1 commandstack version someone converted for me... it's directly available here

http://www.host-a.ne...mmandstack.gm81


let me try this now.... Yep, it dont work.

Bug added.
http://bugs.yoyogame...iew.php?id=3890


This made us go through a whole lot of hoops...
  • 1




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users