JevaEngine - Sandbox Release

Posts 115 of 16 · Page 1 of 2
JevaEngine - Sandbox Release
Virus Scan:
https://www.virustotal.com/ca/file/b...is/1376723138/

I've basically got JevaEngine to a stage where it might be fun to play around with for a bit - a lot of the game isn't done but by now the Engine has really been maturing. I am releasing, basically, a 'sandbox' version of the game. It's really just meant for you to play through quickly and play around with the command console. It's supposed to run as an applet but since there is nowhere for me to host it (well, I do host it on gamejolt but I am sure that linking there would be considered 'advertising') so I AOT compiled it to an executable you can download it in the attachments.


I am mainly doing this because its at a stage where it is worth playing with. You can download and run it in the attachments.

Just one note: Any textarea can be scrolled through by selecting it (activating it) and then using middle mouse scroll.

Here is one of the latest screen shots:





Video of me using the command console (watch in 720p to see the commands - they should work in your distribution if you want to try them):



Here is the guide for the command line system and some notes: (Ignore this if you don't know JavaScript)
- Only map/almostatcontrol.jmp has a script which relates world time with an ambient lighting. So if you want to see the effects of world time, you must be on that map to do it.


- Precaching isn't fully implemented since it hasn't been an issue until now - essentially this means that you might get temporary pauses in the game as it prepares and caches resources that haven't yet been accessed but are just then being accessed via a script etc.


- Any textarea can be scrolled through with the middle mouse scroll _AFTER_ selecting the textarea




Command Terminal Menu:


- Visibility can be toggled by using the ~ key - except when an editable text-area is selected


- The command line uses JavaScript, there is a text area adjacent to the red pointer, select it and write your scripts. After you entered your script, there are two commands you can use:


- This doesn't disclose all available commands because it would take a while to write that up...


CTRL + E (probably the only one you need) executes the script you've entered. If you're script declares functions or variables, they will be added to the global scope so they can be used later.


CTRL + L - Loads the script so that any scripts there on out are executed in the context of what you've just typed in.


- The green text of the text-area will spit out notes when executing your script - and if it evaluates to something, it will print out the evaluation. If there is an error in your script, it will display a cryptic error message (the output textarea does not scroll automatically, you must select it and scroll via middle mouse wheel)


There are three global variables accessible by the command like:
game
- Used to acquire world script bridge, to load a world and to get the player entity
core
- Used for nothing other than debugging purposes.
me
- Used to access commands that are relevant to the console (or executing object) kind of like the 'this' keyword. In the command console you can use it to echo and clear


Functions exposed by 'me' in command console
clear(); - clears the console's output textarea
echo(message); - Echos message to output console.


i.e:
me.clear();
me.echo('hello');




Functions exposed by 'game' in command console
getPlayer() returns an instance of player's script bridge. Refer to 'Commands Exposed by Player ScriptBridge'
getWorld() returns an instnace of world's script bridge. Refer to 'Commands Exposed by World ScriptBridge'
loadWorld(url) loads the world located at the given URL.


There are three maps that exist in the game's File-System:
map/almostatcontrol.jmp
map/firstencounter.jmp
map/enterance.jmp


Functions exposed by Player ScriptBridge in command console & All NPCs


Just For Player:
getQuest(questName) returns an instance of the given quest tailored to that player. Provides ability to check and set quest states.


For All NPCs & Player:


getLocation() returns a Vector of integer components X, Y describing the player's location.


Example:
Code:
me.echo('Players X location is: ' + game.getPlayer().getLocation().x);

setLocation(x, y) Sets the world location to (x, y)


Example:
Code:
game.getPlayer().setLocation(0, 0);


var eric = game.getWorld().getEntity('eric');


if(eric != null)
    game.getPlayer().setLocation(eric.getLocation().x, eric.getLocation().y + 1);
else
    me.echo('The NPC Eric could not be found!');

moveTo(x, y, tolerance) - Entity en-queues asynchronous task to walk to location (x, y) with an acceptable 'tolerance' i.e radius they are allowed to be in before declaring failure to accomplish task.


Example:


Code:
game.getPlayer().moveTo(0, 0, 1);

attack(target) - en-queues asynchronous task to attack the given target, or fails if equip weapon allows for such range


Example:


Code:
var player = game.getPlayer();
var spider = game.getWorld().getEntity('spider');
spider.moveTo(player.getLocation().x, player.getLocation().y, 1);
spider.attack(player);
player.attack(spider);

leave() - En-queues asynchronous task to have the character leave the scene


Example:
Code:
var eric = game.getWorld().getEntity('eric');
//Tell eric, first move to the coordinate 0,0
eric.moveTo(0,0,1);
//Then once you arrive (or if the move tasks is otherwise 'completed') leave the world
eric.leave();

isConflictingAllegiance(target) - Returns true if is in conflicting allegiance with target (I.E target is enemy)
Example:
Code:
var spider = game.getWorld().getEntity('spider');
if(spider.isConflictingAllegiance(game.getPlayer()  )
{
    spider.moveTo(game.getPlayer().getLocation().x, game.getPlayer().getLocation().y, 1);
    spider.attack(game.getPlayer());
}

getHealth() Returns an integer value which is the current health of the character, all characters have a health between 0 and 100 as of now - though that can change depending on the character's configuration file.


setHealth(health) Sets the health of the character.


example:
Code:
if(game.getPlayer().getHealth() < 20);
    game.getPlayer().setHealth(100);

addItem(itemDescriptor, quantity) - Adds an item to character's inventory. Returns the number of that item added which can differ from quantity if the inventory is full before quantity is reached.


hasItem(itemDescriptor, quantity) - returns true of the player is in possession of quantity number of itemDescriptor


[b]removeItem(itemDescriptor, quantity)[b] - Behaves exactly has addItem only removes item. Returned value can differ from quantity if less than quantity of itemDescriptor is contained in inventory


Example
Code:
var player = game.getPlayer();
var eric = game.getWorld().getEntity('eric');


if(player.hasItem('item/healthpack.jitm', 1))
{
    me.echo('Fair trade!');
    if(eric.hasItem('item/rifle.jitm', 1)
    {
        player.removeItem('item/healthpack.jitm', 1);
        player.addItem('item/rifle.jitm', 1);
        eric.addItem('item/healthpack.jitm');
    }else
        me.echo('Looks like eric doesnt have anything left to trade!');
}

wonder(radius) En-queues asynchronous wonder task to randomly move around.


distance(target) Returns the distance (in tiles) from the given target


look() Has the character look around it's given area (using is sight properties described in its configuration file). Any found objects cause the object to invoke a onFound() routine - you can't really use this via the command console only via entity scripts.


loadState(path) Restores the state of the entity as described by the state located at the given path. The current release uses memory states so this is sort of like a memory virtual filesystem.


saveState(path) Saves the state of the entity to the given path.




Functions exposed by World ScriptBridge in command console


setAmbientLight(r, g, b, a) - Configure's world's ambient light.


setHour(hour) - Sets world's time
setMinute(minute)
setSecond(second)
setHour(hour) - 24 hour time


getHour, minute etc...


setTimeMultiplier(multiplier)


Example
game.getWorld().setTimeMultiplier(10000);


createEntity(name, className, npcFile)
- className has to be jevarpg.RpgCharacter
- npcFile can be:
npcs/innocentspider.jnpc
npcs/player.jnpc
npcs/spider_almostatcontrol.jnpc


getEntity(entityName)
jevaengineunderground_mpgh.net.zip5.9 MB · 7 downloads Clean
Fack Approve this shiz
Too much information...

Also, don't forget your virus scans.
Oooooh, will download after being approved.

inb4screamer.
Lol, just keep in mind this is a very very very very very early release.
Quote Originally Posted by radnomguywfq3 View Post
Lol, just keep in mind this is a very very very very very early release.
Buddy I played WarZ in its beta. I think I can handle this.
Quote Originally Posted by radnomguywfq3 View Post
Lol, just keep in mind this is a very very very very very early release.
Very understandable man, remember reading your first thread about it.

Believe you had some issues with finding a designer and shit like that.

Will play anyways. Just wanna see how smoothly it runs.
Looks pretty interesting.. did you put any of them secret characters in there? :P
I just played it through very quickly (it's a short game right now) some things to note:
Maps can be absurdly large (1000 x 1000) they're only small because I haven't had the time to work on a large map. Further, only equip your weapon when you need it, and unequip it when you don't since equip items are not saved in the entity state and thus don't carry on to the next map (a small bug I just noticed, fixing...)

Also, if you want an automatic rifle, open up the console and type:
game.getPlayer().addItem('item/autorifle.jitm', 1);

Then press CTRL then press E - i.e Not CTRL and E at the same time. Open your inventory and you will have the autorifle. Finally to interact with anything, right click on its tile - not on it.
Will play once approved
Quote Originally Posted by Hack in the box View Post
No one wants this piece of shit.
Someone doesn't know how hard it is to make something like this.
Waiting for approval.

Wanna see how smooth this game looks.
You are one clever motherfucker
Congratulations on your success
Posts 115 of 16 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?