glob2-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [glob2-devel] hi its a new!


From: Mohammad Rafigh
Subject: Re: [glob2-devel] hi its a new!
Date: Tue, 21 Feb 2012 14:04:40 +0330

thanks for your useful helps

On Tue, Feb 21, 2012 at 12:33 PM, Stéphane Magnenat <address@hidden> wrote:
Hello,


i'm trying to change characters and buildings with new 3d ones... and
also musics and game sounds... and after that i will share with you if i
did! :D    and then we need a Story for Campaign  whats your idea? ;)

I am one of the original author. I'm glad that you like the game and wish to contribute :-) The campaign story is being discussed in [1] on the Wiki.

For everyone, as you probably know one of the most complicated part of Glob2 is the multiple state machines for the units. This complexity might also be one of the reason why we got so few contributions to the core engine, because they are not easy to understand for newcomers. I've been thinking in the last 10 years for a way to improve the writing of state machines, and I think I finally got something: In the context of robotics research, and based on a co-routine library available on Internet, I've written an executive layer [2] that replaces state machines with continuations [3], exploiting the "yield" keyword of python. This allows to write things like:

path = pathFindToBuild(myBuildingId)
for pos in path:
       updatePos(pos)
       yield WaitCondition(me.frameCounter > 32)
me.trainInBuilding(myBuildingId)
yield WaitCondition(me.trainingStep > 128)
...

Some years ago we started USL, a scripting-language project within glob2 aiming at providing such features, but it never got finished because of lack of manpower. It might be better to use bare python. CPython does not support sandboxing but pypy does [4]. Pypy even has improved support for co-routines compared to CPython [5].

Well, these was some idea I think might help Glob2's development to resume.

All the best,

Stéphane

[1] http://globulation2.org/wiki/Universe_Background
[2] https://github.com/ethz-asl/teer
[3] http://en.wikipedia.org/wiki/Continuation
[4] http://doc.pypy.org/en/latest/sandbox.html
[5] http://doc.pypy.org/en/latest/stackless.html

--
Dr Stéphane Magnenat
http://stephane.magnenat.net


_______________________________________________
glob2-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/glob2-devel


reply via email to

[Prev in Thread] Current Thread [Next in Thread]