Thread: Gs3
View Single Post
  #68  
Old 05-08-2013, 12:20 PM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
I'm massively in favour of strict typing but I agree with the notion that the current declarations look messy. Would prefer the much more standardised,
PHP Code:
float pi 3.14;
baddy sterrence = new Baddy(); 
Anything new and exciting happening on the backend? Considering you're making these changes for the data types, perhaps also add the ability to use protected vars? Any form of language security would be great considering the currently open and abusable state it is in now.

Not related to language syntax but wouldn't it be amazing if you could start adding the ability to run a function on a new thread (intensive long-distance pathfinding anyone)? I hate the fact that a single intensive function (or badly written script) can bring the entire server to a halt..

PHP Code:
function pathfind(x,y,dx,dy) {};
thread pathfind = new thread(pathfind(1,1,64,64));
pathfind.setPriority(1);
pathfind.Start();

while (
pathfind.isActive) {
  
npc.lookVacant();
}
npc.followPath(pathfind.return); 
Ideally, you could have an event called from within the thread to let you know it's finished rather than using a loop to check but yeah!

The other added advantage would be putting core running systems on a separate, higher-priority thread so it doesn't get as interrupted during high loads.
Reply With Quote