View previous topic :: View next topic |
Author |
Message |
Cyborg16
Joined: 28 Apr 2007 Posts: 39
|
Posted: Fri Mar 07, 2008 8:46 am Post subject: states |
|
|
Hi,
Monster certainly looks interesting. Think I'll give it a better look later when I'm ready to use a scripting language.
One thing occurred to me while looking at the examples: once a state has been "started", how is it safely "stopped" (since the loop never exits)? Does the state code need to be designed so that it can be safely stopped at any point where sleep is called? Maybe some kind of cleanup-on-exit callback would also be useful.
(Anyway I'm only throwing a few ideas around; I'm sure you've already thrown a lot around.)
The states idea sounds like it could provide an easy way for people to start modding a game using the scripting language. Great idea! |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
nkorslund
Joined: 23 Oct 2007 Posts: 12
|
Posted: Fri Mar 07, 2008 10:20 am Post subject: |
|
|
Hi,
Thanks for the feedback. The rules for how states run were changed in newer versions; they no longer loop around automatically. The state code will simply stop running if it reaches the end of the state block. You can also stop state code explicitly with a halt; statement. However if you want it to loop around you can use eg. goto and labels.
You are correct about sleep(). Idle functions (like sleep) are not guaranteed to ever return, since the state might change while the object is idle. An example is an enemy that waits idly somewhere, and which is then suddenly put into attack-mode when it sees the player. I plan to alleviate this with special functions called enterState() and exitState(), but I haven't gotten that far yet.
BTW if you've got a project where you plan to use monster, it would be interesting to hear more about it ![Smile](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Cyborg16
Joined: 28 Apr 2007 Posts: 39
|
Posted: Sat Mar 15, 2008 5:18 am Post subject: |
|
|
nkorslund wrote: | BTW if you've got a project where you plan to use monster, it would be interesting to hear more about it ![Smile](images/smiles/icon_smile.gif) |
Well, I've noticed quite a few game engine projects on dsource now... I too have a game project, although as yet unreleased. I've mostly been focusing on less-interesting utility stuff, like easy handling of options and other config/data, string lookup (for translations), an initialisation framework, etc. So currently it *does* practically nothing, but has a fair bit of useful code. I may well join up with one or more of the other projects around, since I'm less interested in programming the graphics code (which seems to be where most people start).
So what are your plans for monster? |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
nkorslund
Joined: 23 Oct 2007 Posts: 12
|
Posted: Tue Mar 25, 2008 11:41 am Post subject: |
|
|
Hey, sorry for the long ping time, I've been away on vacation.
That actually sounds very useful, I could use that for a project I'm working on. I made a simple config system for the project, but I'm not really satisfied with that. How flexible is your system when it comes to integrating it into existing programs? What other features have you put into it? Drop me a mail if you plan to release it!
I think exactly the same way about graphic engines - there are a lot around, some are very mature, and I personally don't feel I have much to contribute in that area. But instead of integrating into one existing game project or engine, I think it's a good idea to keep the core parts modular, and instead write bindings to other systems separately.
At least that's one of my future plans for monster. People should be able to use it with eg. OGRE or Irrlicht or other popular systems, and they shouldn't have to write the bindings themselves. I plan to write bindings or frameworks that will let you use the language with various other libraries (free and commercial), and make these easy to download and use. But that's a bit into the future and I have no idea what it will actually look like when it's done. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
kenvinlee89
Joined: 20 Jul 2011 Posts: 1 Location: USA
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|