summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2016-06-05 13:53:17 +0200
committerAki <nthirtyone@gmail.com>2016-06-05 13:53:17 +0200
commit6a95cb98187127fc2379127b176483d496ef5181 (patch)
tree9e79a4803d96cd2770a350fc0f4f24d19bd7b798
parenta9ca4ecbaa83cf1951cc2274174c04df9c2276ae (diff)
downloadroflnauts-6a95cb98187127fc2379127b176483d496ef5181.zip
roflnauts-6a95cb98187127fc2379127b176483d496ef5181.tar.gz
roflnauts-6a95cb98187127fc2379127b176483d496ef5181.tar.bz2
Clouds t
-rw-r--r--maps/default.lua2
-rw-r--r--world.lua10
2 files changed, 6 insertions, 6 deletions
diff --git a/maps/default.lua b/maps/default.lua
index d21f33f..956f24c 100644
--- a/maps/default.lua
+++ b/maps/default.lua
@@ -2,7 +2,7 @@
return {
center_x = 0,
center_y = 0,
- width = 320,
+ width = 360,
height = 240,
color_top = {193, 100, 99, 255},
color_mid = {189, 95, 93, 255},
diff --git a/world.lua b/world.lua
index d1f1a3e..81d69bc 100644
--- a/world.lua
+++ b/world.lua
@@ -21,7 +21,7 @@ World = {
Effects = nil,
camera = nil,
-- cloud generator
- clouds_delay = 6,
+ clouds_delay = 5,
clouds_initial = nil,
-- Map
map = nil
@@ -59,7 +59,7 @@ function World:new(map, ...)
o.camera = Camera:new(o)
-- Cloud generator
o.clouds_initial = o.clouds_delay
- for i=1,5 do
+ for i=1,6 do
o:randomizeCloud(false)
end
return o
@@ -133,11 +133,11 @@ function World:randomizeCloud(outside)
local x,y,t,v
local m = self.map
if outside then
- x = m.center_x-m.width+math.random(-30,30)
+ x = m.center_x-m.width*1.2+math.random(-50,20)
else
x = math.random(m.center_x-m.width/2,m.center_x+m.width/2)
end
- y = math.random(m.center_y-m.height/3, m.center_y+m.height/3)
+ y = math.random(m.center_y-m.height/2, m.center_y+m.height/2)
t = math.random(1,3)
v = math.random(8,18)
self:createCloud(x, y, t, v)
@@ -163,7 +163,7 @@ function World:update(dt)
local n = table.getn(self.Clouds)
self.clouds_delay = self.clouds_delay - dt
if self.clouds_delay < 0 and
- n < 14
+ n < 18
then
self:randomizeCloud()
self.clouds_delay = self.clouds_delay + self.clouds_initial