Author Topic: Help with logic needed  (Read 6121 times)

0 Members and 1 Guest are viewing this topic.

Offline Blacki

Re:Help with logic needed
« Reply #15 on: May 06, 2002, 08:28:21 PM »
I'm assuming AGI is multi-threaded because otherwise the logic would have worked in the first place.

The only thing that was done to make it work was moving the reset command from the bottom to the top.
So for some reason before it gets to the reset command it restarts the IF statement.   It's the only explanation I can come up with.



(The "virtual processor" thing was only hypothetical.  I'm not saying there is such a thing, I'm just using the term to try to explain how the multi-threading works.)

Offline Nick Sonneveld

Re:Help with logic needed
« Reply #16 on: May 07, 2002, 12:03:33 AM »
perhaps the flag affects the other commands that are called in the statement.. i would check that first before assuming multi-threaded code.

- Nick
Nick Sonneveld  |  AGI Dev  |  NAGI

Offline Nick Sonneveld

Re:Help with logic needed
« Reply #17 on: May 07, 2002, 12:08:35 AM »
ok.. just checked.. not that.   I know it's not just jumping around code though.

- Nic
Nick Sonneveld  |  AGI Dev  |  NAGI

Offline Nick Sonneveld

Re:Help with logic needed
« Reply #18 on: May 07, 2002, 12:16:30 AM »
All I know is that you're assuming too much here.. I would check other factors before assuming there's support for code that isn't there.

- Nick
Nick Sonneveld  |  AGI Dev  |  NAGI

Offline Adam

Re:Help with logic needed
« Reply #19 on: May 07, 2002, 12:52:05 AM »

perhaps the flag affects the other commands that are called in the statement.. i would check that first before assuming multi-threaded code.

- Nick


I think the way the interpreter executes commands (changing flags, animates objects, etc) could use some clarification.   From what I understand about execution, flag settings, and WHEN you set them, more than anything else, are responsible for how your code gets executed at run-time.  At times I find myself scratching my head about when I should initialize my flags.. after that, it's a matter of tracing where your code is executing (a rather familiar habit)

Adam    

Offline Blacki

Re:Help with logic needed
« Reply #20 on: May 07, 2002, 06:19:52 PM »
Can anyone explain what has happened then??

Offline Joel

Re:Help with logic needed
« Reply #21 on: May 08, 2002, 05:42:21 PM »
Most likely, the cause is somewhere else in the code. Something that we can't see (or something more simple that we're overlooking). AGI is definitely not multi-threaded in the sense of executing more than one AGI command at the same time. That would make things extremely difficult because you would not be able to make any assumptions about the order of execution at all.

Besides, typically when there's a concurrency issue, it wouldn't show up every time the program was run. Also, in a typical implementation of threads, you're only guaranteed that your thread won't be preempted at the atomic level (one machine instruction). Even the simple if-statement:

Code: [Select]
if (f115)
{
 reset(f115);
}


is not atomic (your thread might be preempted right after the test "isset(f115)"), so if this were a concurrency issue there really wouldn't be any way to solve it at all, especially since AGI logic lacks typical thread synchronization mechanisms such as critical sections, etc.

Offline robingravel

Re:Help with logic needed
« Reply #22 on: May 08, 2002, 07:20:08 PM »
if (isset(f115))
{
 reset(f115);
}

Robin Gravel


Offline Joel

Re:Help with logic needed
« Reply #23 on: May 09, 2002, 09:11:03 PM »
if (isset(f115)) and if (f115) are equivalent.

Offline Andrew_Baker

Re:Help with logic needed
« Reply #24 on: May 09, 2002, 11:09:57 PM »
Ultimately, the AGI interpreter is not the best game engine in the world.  It is very, very simple to use the make simple games, but it was never designed for this level of complexity.

Additionally, I also agree with substituting an object for an ego when doing ego animations, but that's just because it makes my code less kludgy.
I hope you realize that one day I will devour the Earth.

Offline Chris Cromer

Re:Help with logic needed
« Reply #25 on: May 09, 2002, 11:14:58 PM »
Shesh, this topic was started back in August. I wonder how long it will take for it to die. ::)
Chris Cromer

It's all fun and games until someone get's hurt then it's just fun. ;)

Offline Nick Sonneveld

Re:Help with logic needed
« Reply #26 on: May 09, 2002, 11:43:04 PM »
I didn't think topics "died" as such.  That's kinda suggesting that whenever somebody posts a new topic, we all try to bludgeon it to death with our replies until we don't hear anything from the original author.  :)

- Nick
Nick Sonneveld  |  AGI Dev  |  NAGI

Offline Chris Cromer

Re:Help with logic needed
« Reply #27 on: May 10, 2002, 10:36:14 AM »
Well I don't think Bjoern is haveing any problem with V in the rooms with shooting... ::)

This topic just took a life of it's own about something completely different.
Chris Cromer

It's all fun and games until someone get's hurt then it's just fun. ;)


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.042 seconds with 15 queries.