aboutsummaryrefslogtreecommitdiff
path: root/bin/client/data/init.lua
diff options
context:
space:
mode:
authorAlexander Pickering <alex@cogarr.net>2018-09-23 16:41:55 -0400
committerAlexander Pickering <alex@cogarr.net>2018-09-23 16:41:55 -0400
commit079b5a7ce38a241b04bae2c9c94d091bd7295ce4 (patch)
treeb830c88eaae9254a2b6a077f50bbf6672cffd810 /bin/client/data/init.lua
parentb14229c2b3a7d7ae8e03c12cd51fac2f02c2bd0b (diff)
downloadbrokengine-079b5a7ce38a241b04bae2c9c94d091bd7295ce4.tar.gz
brokengine-079b5a7ce38a241b04bae2c9c94d091bd7295ce4.tar.bz2
brokengine-079b5a7ce38a241b04bae2c9c94d091bd7295ce4.zip
Added inital files for client and server
Added init.lua files for both the client and server binaries.
Diffstat (limited to 'bin/client/data/init.lua')
-rw-r--r--bin/client/data/init.lua68
1 files changed, 15 insertions, 53 deletions
diff --git a/bin/client/data/init.lua b/bin/client/data/init.lua
index 8829e01..e893fa4 100644
--- a/bin/client/data/init.lua
+++ b/bin/client/data/init.lua
@@ -1,57 +1,19 @@
+print([[
+Welcome to Brok[en]gine!
-dofile("../data/mahjong.lua")
+This file is located at bin/client/data/init.lua,
+it is the first file run after brokengine starts.
+Modify it to make your game.
-do return end
-print("Phys was:",phys)
-for k,v in pairs(phys) do
- print(k,":",v)
-end
-local cam = scene.newcamera()
---local cam_m = getmetatable(cam)
---print("cam's meta table is ",cam_m)
+Before brokengine starts, there's another file
+located at bin/client/data/deviceinit.lua, which
+is a settings file for the window, and does not
+have access to a lot of the functions that
+brokengine provides. If your game is crashing
+right away, check for errors in that file.
---for k,v in pairs(cam_m["__index"]) do
--- print(k,":",v)
---end
+For more information about the functions
+avaliable in brokengine, run `ldoc .`, and look
+at index.html in the doc/ folder.
+]])
---print("attempting to create the first physbox")
-local cambox = phys.newcphysbox({1,1,1},{0,0,0},1)
---print("function is",phys.newphysbox);
---print("attempting to create the second physbox")
-local floor = phys.newcphysbox({10,1,10},{0,-10,0},0)
-local floor_light = scene.newlight(1000,{0,-5,0})
---print("created cam box")
-print("cambox_m is:")
-local cambox_m = getmetatable(cambox);
-for k,v in pairs(cambox_m["__index"]) do
- print(k,":",v)
-end
-print("cambox is:")
-for k,v in pairs(cambox) do
- print(k,":",v)
-end
-floor:setcpos({0,5,0})
-
-print("floor is:")
-local floor_m = getmetatable(floor);
-for k,v in pairs(floor_m["__index"]) do
- print(k,":",v)
-end
---print("gui is:")
---for k,v in pairs(gui) do
- --print(k,":",v)
---end
---local checkbox = gui.newcheckbox({0,0},{100,100},0,"test");
---floor_light:getpos()
---GAME.tick = function()
- --print("In game tick")
- --cam:setpos(cambox:getpos())
---end
-GAME.onKeyDown = function(key,down,ctrl,shft)
- if(down and key == 65) then -- a
- print("Setting box's position")
- cambox:setcpos({0,5,0})
- print("After setpos was called")
- end
- print("Got key input:",key,down,ctrl,shft)
-end