Ok, so apparently the last post was a bit of a mess, i will try again.
What im looking for from the response of the reader.
Simple.
Would you, perhaps a programmer or not, be inclined to extend your client with your own tools if it were like the description below.
Its not complete, its not 100% in depth, its idea based speculation based on some prototyping i did.
The concept of the game
The game is a hacking simulator, a pretend world where there are other players, and NPC's that are hackable. If you ever played uplink
from introversion then you will immediately know the premise.
In the game, a player has a/some computers at his disposable. Each of these computers in the world, can be logged into (unless protected).
The User Interface of the game is a futuristic desktop environment that is customisable via code, in game.
The gameplay consists of missions, storylines, and the usual stuff - mini games pretending to be hacking mechanics etc.
The concept of the "engine"
The idea behind the "engine" in game is to allow the player to extend the operating system. Do your best, to make yourself a better in game hacker. How do i take over the computer at server xyz? I need a tool that can list its users. Write one, steal one, copy one, buy one.
Alot of thought behind the engine i wont bother cramming in one post.
The in-game OS, your deskstop in game
This is where it all happens. You have a web browser, a few network tools (like ping below) and you have a developer priveledged account. What now?
a)
Do something new. Make a new clock widget, make a cool flash based tracer. You choose.
b)
Make something better. Add a user interface to the command line ping tool. Add a UI to the tracer, make it count in ms instead of seconds.
c)
Give something back. Submit a new tool/modified tool for inclusion in the core OS.
The code sample
What the code below is demonstrating is an INGAME ping tool. This has nothing to do with server/game state. It is merely a tool that i would like in game. For example, if a users PC online is running on a slow connection, it will take much longer to get in, do stuff and get out.
This is important because you dont want to get caught, so i can now (based on the simple script below) tell if a user is taking a long time to respond to the server.
Keep in mind
Its a prototype code sample. It semi works and some things i just put in for brevity. I need to know if the direction im taking on exposing the core is worth taking.
WOULD YOU EVEN BOTHER to do something new in game. If its as easy as it is below, would you?
The Client side tool,
// Client side tool for pinging another player in the game
// Author : FuzzYspo0N
// Etc
//First, in order to create a tool on the client and server side,
//we simply assign a variable as a tool type. This might fail if
//there is already a tool with this name - this returns undefined.
var corePingTool = new core.tool("corePingTool");
//Maybe something simple to register a tool with a defined
//callback for users. This global tool shows up at the shell,
// as a "command line" tool,and if a tool invokes
//a ui then it is not run via command shell but explicitly
core.tool.registerGlobalTool("ping", "client name, ping count ");
//onExecute gets called whenever someone tries to ping
//(either called via ui or via the above command line)
//Variable arguments handed in
var corePingTool.onExecute = function(param)
{
// 0 is reserved, so 1 is client name. 2 is ping count.
var clientName = param[1];
var pingCount = param[2];
if(pingCount == core.invalid)
{
pingCount = 1;
}
//if we have a user like this, we can use em
var userId = core.users.isAUser(clientName);
if(userId != core.users.invalidUser)
{
//Create a new network javascript object.
//This object handles network packing/streams internally.
//The to dev, this is simple - a javascript object.
//Push data into the stream, and be done.
//The toolId is to header the packet type, for the server
//to know what to do with it.
var pck = new core.net.packet(this.toolId);
//Add our data into the packet for the server to care
pck.push(userId);
pck.push(pingCount);
//Give it a callback when its feeling talkative
pck.response = this.onResponse;
//Send it to the server
pck.send();
}
}
//The servers response to a ping command
var corePingTool.onResponse = function(param)
{
//0 reserved, 1 is always the response code, 2 is the result
//(known, from server side), 3 is the client requested
if(param[1] == core.net.success)
{
//should output something like
// ping response 128ms from " DumbassTeh"
var end = ' from " ' + param[3] + ' " ';
echo('Ping response ' + param[2] + 'ms' + end);
}
else
{
//message box failure
}
}
The server side response
// Server side tool for pinging another player in the game
// Author : FuzzYspo0N
// Etc
//expects - a packet with
//pop 1 - sourceUserId
//pop 2 - destUserId
//pop 3 - ping count
//context globals
//var toolId is handed in from the system
var corePingTool_Main = function( pck)
{
//Pck is basically a javascript array, and pop will
//simply keep a "stackIndex" internally. So in essence
//what you can see here is
// stackIndex += 1;
// return pck[stackIndex - 1];
var sourceId = pck.pop();
var destId = pck.pop();
var pingCount = pck.pop();
for(i = 0; i
Comments, views, ideas, etc - Welcome. Please, i like ideas.
Update!!
I am attaching a mockup of how the tools *could* work , for development of the OS features. This is why i need feedback, is it plausible to expect some non developers to enjoy modifiying their desktop more than just a background image? etc.
Click on the image to see the full one.
[caption id="attachment_110" align="aligncenter" width="450" caption="Developer tool interface? Why not."][/caption]