Hacktendo Sneak Peek

Lately I've felt a bit like a hermit, regarding my contributions to Hack Wars. I've been fairly busy with my courses, and as a result have not been in the game much lately. This having been said, I have been working hard on what is probably the largest -- and most exciting -- update that Hack Wars has seen.

Hacktendo is a fully functional game programming engine, that allows you to leverage the scripting language in Hack Wars to create your own custom arcade games, more details will be released soon but, without further adieu, I give you the first video of the Hacktendo engine in action (an arcade game I have been working on to test it out)... Keep in mind that these games can be purchased with in-game money, and run in game -- moving Hack Wars one step closer to blurring the line between video game and retro operating system.

Cheers,

Ben.

Comments

Quick Breakdown of API and

Quick Breakdown of API and Specs:

Specs:
Sprites 32x32 by 8 frames allowed 64.
Tiles 32x32 allowed 128.
Screen Size: 288x256
Map Size: 5x3 screens Screen Size 8x9 tiles allowed 9 maps.

setXSpeed(int speed):
Sets the scroll speed of the game window in the x direction, used for smooth scrolling transitions.

setXSpeed(int speed):
Sets the scroll speed of the game window in the y direction, used for smooth scrolling transitions.

deleteTimeStamp("key"):
Removes a time stamp associated with the key provided.

checkTimeStamp("key"):
Returns the time in milliseconds that has passed since the creation of the time stamp associated with the key.

createTimeStamp("key"):
Creates a timer and associates it with the key.

Note: Functions that don't provide the ID assume that the script associated with the sprite running the given script is the target.

getX(int id) or getX()
Returns x position of sprite associated with ID.

getY(int id) or getY()
Returns y position of sprite associated with ID.

getZ(int id) or getZ()
Returns z position of sprite associated with ID. [0,1,2] 0 being the farthest back layer.

getFrame(int id) or getFrame()
Returns the current cell of the sprite being rendered [0-7]

getImage(int id) or getImage()
Returns the current 8 cell image associated with the sprite.

getScript(int id) or getScript()
Returns the current script ID associated with the sprite.

setX(int id,int x) or setX(int x)
Sets the current x position of a sprite.

setY(int id,int y) or setX(int y)
Sets the current y position of a sprite.

setZ(int id,int z) or setX(int z)
Sets the current z position of a sprite. [0,1,2]

setFrame(int id,int frame) or setFrame(int frame)
Sets the current animation frame of the sprite [0-7]

setImage(int id,int image) or setImage(int image)
Set the current 8 frame image associated with the sprite.

setScript(int id,int scriptID) or setScript(int scriptID)
Sets the script currently associated with a given sprite.

setWidth(int id,int width) or setWidth(int width)
Sets the width of the sprite, used by the collision handling system.

setHeight(int id,int height) or setHeight(int height)
Sets the height of the sprite, used by the collision handling system.

setCollisionType(int id,int type) or setCollisionType(int type);
Sets the type used by the collision system. 0: Pixel Based 1: Rectangular.

setGlobal("key",[int,string,float,boolean])
Sets a global variable that can be accessed from any script via the key.

getGlobal("key")
Returns the global variable associated with the key.

setLocal("key",[int,string,float,boolean])
Sets a local variable that can be accessed from any script via the key.

getLocal("key")
Returns the local variable associated with the key.

getKeyUpCount()
Returns the number of keys that a player has stopped pressing down since the last time the key handler was accessed.

getKeyDownCount()
Returns the number of keys that a player has pressed down since the last time the key handler was accessed.

int getNextKeyUp()
Returns the integer value of a key recently depressed by a player... this removes it from the queue (e.g, you should do key handling in one location).

int getNextKeyDown()
Returns the integer value of a key currently being pressed by a player... this removes it from the queue (e.g, you should do key handling in one location).

messageSprite(int spriteID,String flag,Object message)
Messages a sprite referenced by id with a flag and value.

int getMessageCount()
returns the number of messages received.

int getCollidedCount()
returns the number of collsions since last frame.

String getFlag()
Returns the flag for the current message.

Object getMessage()
Returns the current message.

nextMessage()
Moves message queue to next message.

int createSprite(int imageID,int scriptID,int x,int y,int z)
Returns the sprites ID.

destroySprite() or destroySprite(int spriteID)
Destroys the sprite.

int getID()
returns the sprites id.

changeMap(int mapID)
Changes the map.

setMusic(int musicID)
Changes the background music.

playSound(int soundID)
Plays the sound.

nextCollided()
Moves to collision queue to the next collision.

int collidedWith()
Returns the sprite or tile ID of the object collided with.

int collidedType()
Returns the type collided with. 0 for a sprite, 1 for a tile.

save(String key,Object value)
creates a key-value pair to be saved in a save game file on players virtual HD.

load(String key)
Loads a value from a save game file on players virtual HD based off a key.

int getMapID()
Returns the current map id.

triggerWatch(String note)
Triggers a watch on makers computer based on the note of the watch.

boolean isPassable(int x,int y)
returns whether the tile at position (x,y) on map is passable or not.

setViewportX(int x)
Sets the map X value for display to screen.

int getViewportX()
Returns the current map X value for display to screen.

setViewportY(int y)
Sets the map Y value for display to screen.

int getViewportY()
Returns the current map Y value for display to screen.

drawRectangle(int x,int y,int width,int height,int red,int green,int blue,int alpha)
Draws a rectangle on the screen based on screen (x,y). Color values range from 0-255.

fillRectangle(int x,int y,int width,int height,int red,int green,int blue,int alpha)
Draws a filled rectangle on the screen based on screen (x,y). Color values range from 0-255.

drawText(String text,String font,int fontSize,int x,int y,int red,int green,int blue,int alpha)
Draws text on the screen based on screen (x,y). Color values range from 0-255.

drawLine(int x1,int y1,int x2,int y2,int red,int green,int blue,int alpha)
Draws a line on the screen based on screen (x,y). Color values range from 0-255.

drawOval(int x,int y,int width,int height,int red,int green,int blue,int alpha)
Draws an oval on the screen based on screen (x,y). Color values range from 0-255.

fillOval(int x,int y,int width,int height,int red,int green,int blue,int alpha)
Draws a filled oval on the screen based on screen (x,y). Color values range from 0-255.

drawArc(int x,int y,int width,int height,int red,int green,int blue,int alpha)
Draws an arc on the screen based on screen (x,y). Color values range from 0-255.

fillArc(int x,int y,int width,int height,int red,int green,int blue,int alpha)
Draws a filled arc on the screen based on screen (x,y). Color values range from 0-255.

debug(String message)
Sends a message to the terminal.

float sqrt(float value)
Returns the square root of value.

float abs(float value)
Returns the absolute value of value.

float tan(float angle)
Returns the tangent of the angle.

float cos(float angle)
Returns the cosine of the angle.

float sin(float angle)
Returns the sine of the angle.

float atan(float value)
Returns the arctangent of the value.

float acos(float value)
Returns the arc cosine of the value.

float asin(float value)
Returns the arc sine of the value.

float rand()
Returns a random value between 0-1.

float floor(float value)
Returns the integer value of value rounded down.

float pow(float value,float exponent)
Returns the value of value to the power of exponent.

int intValue(float value)
Returns the integer value of value.

boolean isGlobalSet(String key)
Returns whether the global variable represented by key has been set or not.

boolean isLocalSet(String key) or isLocalSet(int spriteID,String key)
Returns whether the local variable represented by key has been set or not.