summaryrefslogtreecommitdiff
path: root/src/gnu_and_bola_brawlers/load
diff options
context:
space:
mode:
authorJorge Lopez Seijas <jorginho@riseup.net>2016-12-14 23:22:19 +0100
committerJorge Lopez Seijas <jorginho@riseup.net>2016-12-14 23:22:19 +0100
commit2ad018f3f77e7a0ddde9dfa3aa92bc151e9ea9a5 (patch)
treee8100ebbabb2eadd27161c7cd5b7e9db3ec8145e /src/gnu_and_bola_brawlers/load
parent49bc7c67d38ee6f474465423f85089c3d4d47de3 (diff)
Keep the code KISS
Diffstat (limited to 'src/gnu_and_bola_brawlers/load')
-rw-r--r--src/gnu_and_bola_brawlers/load/character.lua29
-rw-r--r--src/gnu_and_bola_brawlers/load/initialize.lua26
-rw-r--r--src/gnu_and_bola_brawlers/load/meta_sprites.lua7
-rw-r--r--src/gnu_and_bola_brawlers/load/player_controller_configuration.lua13
-rw-r--r--src/gnu_and_bola_brawlers/load/window_profile.lua11
5 files changed, 86 insertions, 0 deletions
diff --git a/src/gnu_and_bola_brawlers/load/character.lua b/src/gnu_and_bola_brawlers/load/character.lua
new file mode 100644
index 0000000..6ee15c7
--- /dev/null
+++ b/src/gnu_and_bola_brawlers/load/character.lua
@@ -0,0 +1,29 @@
+return {
+ bola = {
+ orientation = 0,
+ acceleration = 0,
+ velocity = 125,
+ gravity = -500,
+ position = {
+ x = windowProfile.mode.width / 2,
+ y = windowProfile.mode.height / 2,
+ },
+ scale = {
+ x = 1,
+ y = 1,
+ },
+ origin = {
+ x = metaSprites.bola.x / 2,
+ y = metaSprites.bola.y / 2,
+ },
+ stand = require 'stand',
+ walk = require 'walk',
+ jump = require 'jump',
+ actionLeft = false,
+ actionRight = false,
+ actionUp = false,
+ actionDown = false,
+ actionA = false,
+ actionB = false,
+ },
+}
diff --git a/src/gnu_and_bola_brawlers/load/initialize.lua b/src/gnu_and_bola_brawlers/load/initialize.lua
new file mode 100644
index 0000000..c4e62ae
--- /dev/null
+++ b/src/gnu_and_bola_brawlers/load/initialize.lua
@@ -0,0 +1,26 @@
+
+local load = {}
+
+load.initialize = function()
+ fps = 30
+ upTime = love.timer.getTime()
+ nextTime = upTime
+
+ windowProfile = require 'load/window_profile'
+
+ love.graphics.setBackgroundColor(0, 232, 216)
+ love.graphics.setDefaultFilter('nearest', 'nearest')
+
+ love.window.setMode(windowProfile.mode.width * windowProfile.scale.x, windowProfile.mode.height * windowProfile.scale.y)
+ love.window.setTitle(windowProfile.title)
+
+ playerController = require 'load/player_controller_configuration'
+ metaSprites = require 'load/meta_sprites'
+ character = require 'load/character'
+
+ sprite = {
+ bola = require 'stand',
+ }
+end
+
+return load
diff --git a/src/gnu_and_bola_brawlers/load/meta_sprites.lua b/src/gnu_and_bola_brawlers/load/meta_sprites.lua
new file mode 100644
index 0000000..e8cba17
--- /dev/null
+++ b/src/gnu_and_bola_brawlers/load/meta_sprites.lua
@@ -0,0 +1,7 @@
+return {
+ bola = {
+ image = love.graphics.newImage('/multimedia/ppu_rp2c0x/meta_sprites/bola/default_sheet_color0_alpha.png'),
+ x = 24,
+ y = 32,
+ }
+}
diff --git a/src/gnu_and_bola_brawlers/load/player_controller_configuration.lua b/src/gnu_and_bola_brawlers/load/player_controller_configuration.lua
new file mode 100644
index 0000000..ec6c99e
--- /dev/null
+++ b/src/gnu_and_bola_brawlers/load/player_controller_configuration.lua
@@ -0,0 +1,13 @@
+return {
+ player1 = {
+ left = 'a',
+ right = 'd',
+ up = 'w',
+ down = 's',
+ a = 'j',
+ b = 'k',
+ select = 'g',
+ start = 'h',
+ quit = 'escape',
+ }
+}
diff --git a/src/gnu_and_bola_brawlers/load/window_profile.lua b/src/gnu_and_bola_brawlers/load/window_profile.lua
new file mode 100644
index 0000000..0f6d928
--- /dev/null
+++ b/src/gnu_and_bola_brawlers/load/window_profile.lua
@@ -0,0 +1,11 @@
+return {
+ mode = {
+ width = 256,
+ height = 240,
+ },
+ scale = {
+ x = 2,
+ y = 2,
+ },
+ title = "GNU & Bola Brawlers",
+}