Notes: I indented for clarity. Only copy from the start to the end of the text on each line
Steps to install curl
sudo apt update
sudo apt install curl
Steps to install Lua:
curl -R -O http://www.lua.org/ftp/lua-5.3.5.tar.gz
system('clear') | |
require 'ruby2d' | |
set title: 'Sprite animation' | |
set background: 'blue' | |
Zero = 0 | |
# hero parameters |
Notes: I indented for clarity. Only copy from the start to the end of the text on each line
Steps to install curl
sudo apt update
sudo apt install curl
Steps to install Lua:
curl -R -O http://www.lua.org/ftp/lua-5.3.5.tar.gz
const ZERO = 0; | |
const GAME_WIDTH = 800; | |
const GAME_HEIGHT = 600; | |
let config = { | |
type: Phaser.AUTO, | |
width: GAME_WIDTH, | |
height: GAME_HEIGHT, |
const ZERO = 0; | |
const GAME_WIDTH = 800; | |
const GAME_HEIGHT = 600; | |
var config = { | |
type: Phaser.AUTO, | |
width: GAME_WIDTH, | |
height: GAME_HEIGHT, | |
physics: { |
const ZERO = 0; | |
const GAME_WIDTH = 800; | |
const GAME_HEIGHT = 600; | |
const TWO = 2; | |
var platforms; | |
var player; | |
var cursors; | |
var stars; | |
var bombs; |
function love.load() | |
x = 100 | |
y = 100 | |
width = 200 | |
height = 150 | |
speed = 75 | |
end | |
function love.draw() | |
love.graphics.rectangle("line", x, y, width, height) |
-- 1. in the draw function, update the code to set the rectangle to fill mode instead of line mode (***) | |
-- 2. in the draw function, update the code to centre the rectangle, in the game window (***) | |
-- 3. in the update function, update the code to make the rectangle move when you press the arrow keys | |
function love.load() | |
window_width, window_height = love.window.getMode() | |
rectOne = {} | |
rectOne.width = 200 | |
rectOne.height = 150 |