Tips and solutions for creating stages
Posted: Sat Feb 01, 2014 10:14 am
Hello, love community!
I just wanted to ask if there is a certain way to create stages / rooms properly.
What I'm currently have in mind is to create a table of invisible bounding boxes like this:
Then loading a graphics on top of that like
I am not trying to achieve a big room though, just a big world divided into small parts. I am currently creating a 2D Sidescroller RPG like the old Valkyrie Profile games. It has small but many rooms to explore. Also, I don't like using tilesets because I feel like I'm limited to square tiles, or am I incorrect? Anyway, to create a stage, I am planning to render it first in 3D and capture a 2D image from it. Same goes for creating spritesheets. 3D model then capture the 2D poses. etc.
Will it have an impact from the speed of the game? or is there a particular technique that can be used other than this?
EDIT:
Also, is there a way to insert the stage design from a text document?
For example, I have stg.txt:
then in main.lua
then when I try printing using print(self.stageDesign[1][1]) it gives me an error.
It appears that it is storing them as a string which becomes
Any ideas how?
I just wanted to ask if there is a certain way to create stages / rooms properly.
What I'm currently have in mind is to create a table of invisible bounding boxes like this:
Code: Select all
{1, 1, 1},
{1, 0, 1}, where 1 = Solid, 0 = Free Space
{1, 1, 1}
Code: Select all
love.graphics.draw(ImageOfRoom, x, y)
Will it have an impact from the speed of the game? or is there a particular technique that can be used other than this?
EDIT:
Also, is there a way to insert the stage design from a text document?
For example, I have stg.txt:
Code: Select all
1,1,1,1
1,0,0,1
1,1,1,1
Code: Select all
self.stageDesign = {}
for line in love.filesystem.lines("stg.txt") do
table.insert(self.stageDesign, line)
end
It appears that it is storing them as a string which becomes
Code: Select all
Index 1 = "1,1,1,1"
Index 2 = "1,0,0,1"
Index 3 = "1,1,1,1"
AND NOT
Index 1 = 1
Index 2 = 1
..
Index 2,2 = 0
..
and so on ..