I have found something quite interesting about gE

Talk about making games.

I have found something quite interesting about gE

Postby bat78 » Thu Aug 06, 2015 2:11 am

Nearly accidental I've discovered that the engine held variable names somewhere in the Game Mode runtime contiguous memory.
This can be the master odd for debugging, since you can get variable names directly from the memory, as a string.

Moreover, it now allows me to think even wider and perhaps I will be truly succeeding to create a better debugging system for the custom
cross-game scripting I am working on (Since it obviously cannot send the front end cross-game error/warning message).

One of the benefits of using interpreter over compiler, as Game-Editor does is that the interpreter parses each statement, while the compiler
converts the entire code into a byte code. Which means it scans for errors almost immediately, one statement after another.
This is why Game-Editor is able to find errors in our code, so fast, almost in the same time we press to Add the script.

However, I am fearing that this might be very dangerous for it confronts a variety of different constraints.
Game-Editor stores runtime allocations in arbitrary memory areas (which offset is mostly determined by the processor/heap allocator)
While we cannot even think of writing, locating the appropriate memory offset cannot be simply pre-calculated.

And yet there is still a chance. If user specifies the name of the first variable ever declared (global code is with priority),
then I can create a memory searcher that finds the appropriate offset, keeps the byte pointer iterator read-only, non-optimized (volatile),
and it must systematically check if the seed-variable is in the same memory offset as the first discovery, because Game-Editor
is unpredictable and may decide to reallocate information about variables in another instance.
Future of "Project Game-Editor Revival" here
User avatar
Posts: 790
Joined: Sun Dec 14, 2008 9:13 pm
Location: Bulgaria, Sofia
Score: 83 Give a positive score

Re: I have found something quite interesting about gE

Postby Zivouhr » Thu Sep 24, 2015 7:34 pm

Nice discovery. Cool you were able to discover these elements of Game Editor and can hopefully use for your new ideas.
Cool to hear how it's able to find errors in scripting so fast. That's a helpful feature.
City of Rott Game created on Game Editor http://cityofrott.wordpress.com/
User avatar
Posts: 549
Joined: Sat May 17, 2014 2:12 pm
Score: 59 Give a positive score

Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest