Jump to content
  • entries
    943
  • comments
    5,899
  • views
    923,700

December 8, 2009


Josh

2,982 views

 Share

Rewrote the scripts that needed to be done with the OO single-state system. Just a few things to wrap up now and I will have it available.

 Share

9 Comments


Recommended Comments

Nice, you just made my night. I can go to sleep and dream about single state, and when I wake up it might not be just a dream!

Link to comment

Hi, what is OO Single-State system, how will i benefit and whats the difference between what ever it is now to single state? Im confused with it. Thanks

Link to comment

Hi, what is OO Single-State system, how will i benefit and whats the difference between what ever it is now to single state? Im confused with it. Thanks

 

Right now the Lua scripting system is multi-state, which means that each Lua entity is it's own self contained island. They can't access global variables or talk to each other without jumping through a lot of hoops.

 

Moving to a single state will allow global variables that are accessible by all the object scripts and make it so that objects can directly call functions/access variables of other scripts. It also looks like he cleaned up some of the naming conventions so that entity vs TEntity isn't confusing anymore.

 

Upside: A lot more flexibility in your scripting, cleaner code.

Downside: If you wrote a lot of Lua scripts for objects already, they'll require some modification.

 

At least that's how I understand it, but my understanding is often lacking.

Link to comment

Please don't anyone take this the wrong way. So far my biggest concern with Leadwerks has been the lack of solid planning and design. It seems that systems have to be rewritten and redesigned all the time. I think we are finally approaching a level where Leadwerks could be used in a large scale project. I would love to have an official road map of where Leadwerks is going. I'm sure this would help all parties. We have a lot of smart users in the community that could help design decisions and help resolve these before they have to be rewritten. I think the scripting design issue is one of the those things that easily could have been avoided. Anyhow, look forward to the release.

Link to comment

That is why I am doing this now and not later. I didn't get much feedback on Lua in the beta phase. There was very little interest in it, actually. I had the choice to make between a simpler less powerful system that was a nice toy, or a more powerful system that was less forgiving. I chose the first. Then when it was released it became apparent that lots of people were very serious about using it, so I quickly decided a single state system was more appropriate.

 

It's not the way I would have chosen to make decisions, but as soon as it became apparent it was better to do it before anyone had committed any code. I probably do more trial and error than some other engines I have seen, but I also think we come up with better designs in the end. The Lua stuff is very new, so I would not look to it for stability right now. The main engine API has been quite stable for the last 6 months or so, and I don't see any changes happening there.

 

Onwards!

Link to comment

I think the fact that Josh is able to see a needed change and react quickly is a big advantage for him. Most other engines would most likely have just left the multi-state lua system and said too bad. He's quick to realize another way is better and react to it.

 

That being said I am surprised at the lack of lua testing the community did with the beta. I know Josh is convinced that artists make games so maybe he had more artist testing than programmers and that was the reason no one really cared about lua that much? Maybe because Josh himself thought of the lua implementation as more of a toy that people didn't think to put much time or effort into playing with it? I didn't ask for the beta as I was pretty busy, but it took me about 3 days of playing with it to realize the multi-state lua system wasn't the way to go for lua developers. It seems odd the other beta developers didn't at least question that.

Link to comment

Part of the reason might be that the people who were beta testing it were already used to doing things one way. Whereas I (and I'd assume others) only licensed LWE because per entity scripting was added in 2.3, and therefor are a lot more likely to place code in the scripts instead of the exe.

 

Speaking of which, any update on an ETA for the single-state system release?

Link to comment

It will be by Friday next week. I have some real-life stuff going on right now that is taking a lot of time this week, but it ends next week.

 

I think mostly beta testers didn't want to start messing with beta script implementations, and my presentation of it was not very good during testing.

Link to comment

The sooner the better. I haven't been able to do anything with 2.3 because I don't want to have to redo everything. Look forward to the release.

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...