Client progress

GS2 had a somewhat decent API I found, that might be a good starting point.

I spent some time refamiliarizing myself with the script engine code and somewhat redesigned the way it interacts with the rendering engine. I think the script engine in a much better spot now for me to more easily make API functions available to it, though I guess Iā€™ll find out for sure as time goes on. I just finished this as I need to go to sleep, of course. So Iā€™ll test it a bit more tomorrow and start figuring out how to make events work. The current goal is to get all of the framework pieces in place to allow input > event > script > reposition animation.

Iā€™m sure Iā€™ll reference it repeatedly for ideas, but Iā€™m definitely not trying to mimic it. Keep an eye out for new posts asking for input too, as theyā€™ll surely come along in the future.

I just ran a quick test of the script engine and it generated 100,000 random numbers about 8 times slower than pure C++ code, while in debug mode. This is pretty awesome for a language thatā€™s currently interpreted and not compiled into assembly code. (Such as JIT versions of Lua/JavaScript, for example.) My concerns about it not being fast enough for the client are clearly unjustified. This is looking great for the project as a whole. Sorry, I had to post. I was excited/relieved by this result.

Anyway, the updates to the script interface are adequately done for now and are great changes for me as I work on the client API. Iā€™m starting planning/work on making events possible now.

Thatā€™s awesome. Canā€™t wait to code in CodrScript.

I canā€™t even settle on a client name. Letā€™s not start on the language. :whatever:

Someday?

-edit Hey, guess what. You canā€™t put the TM character so youā€™ll have to deal with the question mark, thatā€™s what.

Iā€™ve been stuck trying to figure out a good way to link script variables to objects within the game engine. Iā€™ve got a few ideas, but none of them are very efficient. There has to be a better way. Work has also been exhausting and Iā€™ve not wanted to think about this problem much, so Iā€™m hoping this weekend will give me the time to come up with a solution.

Hereā€™s a basic script illustrating the problem:
obj = new Sprite;
obj.x = 5; //This needs to update the actual Sprite objectā€™s x. The object isnā€™t stored with the variable. That would be bad for the renderer.

There are numerous ways to make this happen, but none that Iā€™ve been satisfied with so far.

Possible to store like a pointer to the object on the heap or something? Then obj.x is a shortcut for some something like obj.getObject(id).x

Not a lot of thought went into that idea, so forgive me if itā€™s retarded lol

Youā€™re on the right track, but there are lot of factors to consider. Iā€™m not going to go into every detail, but for example, the variable wonā€™t always be a particular type.

Iā€™m trying to get back into this. Summer is still here, though, so activity probably wonā€™t be very consistent. I donā€™t think it ever has been anywayā€¦

As I recall, everyone was wanting a means of starting to develop content as soon as possible. While a level editor can definitely be a first goal, a lot has to be completed to even make that a reality. I donā€™t want to make it an external program, as that complicates future cross-platform functionality.

The milestones to cross to get to a level editor are:

  • Script engine interface completion (currently in progress)
  • Development of necessary user interface controls
  • Development of the level editor scripts

I canā€™t attempt to put a time frame on this, but it doesnā€™t seem terribly far in the future, depending on how active I am with development. A new WoW expansion is coming in 2 weeks, too. Iā€™m hoping it wonā€™t keep my attention long, as they tend not to anymore.

One question I have isā€¦ is a level editor even worth it without scripting support? While that could be added, it would be incomplete, as the game engine hasnā€™t even been fully developed. I donā€™t have a plan for all of the engineā€™s script API. I think it would be best to limit the level editor to scriptless objects only until later, but againā€¦ is that worth it?

As long as there are objects to be used to make general levels that could be improved later when scripts get released, I think itā€™s worth it. Some people might also benefit from getting their level designs done before they start scripting.

Glad to see someone is still motivated enough to work on a project like this.

Having the level editor without scripting support would also allow for more extensive testing of the tile system. Unless thatā€™s already been doneā€¦ In which case ignore me.

I support this project fully and would love to see its development through, I am too busy to help myself.

1 Like