Entities - aimgamez/aimscriptz GitHub Wiki
Start off by including the engine into your main file inc:engine
Next we are going to add the function for the player! function player{( )}
Now we are going to add a color and shape [images for sprites will be added soon] function player{( draw[square, green] )}
When we think of a player in a 2D spaces, we usually think of gravity! So we are going to need to add gravity to the actual function! function player{( draw[square, green, gravity] width:50 height:50 gravity:floor )}
Now that we added gravity, we need to add FLOORS function ground{( draw[rectangle, black] width:1000 height:20 floor )}
If you noticed, after the drawing function there is a floor string, that is defining an extra variable that the function is. [Defining it as a floor]
Now we have to go to the X and Y coords.ground(x,0,y,-500) player(x,0,y,0)
Now you have created a basic platformer! (View the “viewport” wiki page for camera functions!)
At the end it should look like this:
inc:engine
function player{(
⠀ draw[square, green, gravity] width:50 height:50 gravity:floor
)}
function ground{(
⠀draw[rectangle, black] width:1000 height:20 floor
)}
ground(x,0,y,-500) player(x,0,y,0)