Hello lovers,
Im noob here and i have a doubt, how can I do to load the next level when the character of my
game arrives at the end of current level?
Thanks!
How can i do a level transition?
Re: How can i do a level transition?
Have a Level class that holds most of the logic of how your game works. Create an instance of that Level to play in it and when you have to transition just create another instance and store or delete the first one.
Re: How can i do a level transition?
Nice, thanks! One more doubt, I do this using love.filesystem?
Re: How can i do a level transition?
If you want to be able to store the state of a level after you left (such as enemies killed, items picked up/destroyed) so that when you load it again that state is also loaded (instead of rebuilding the whole level again), then yes. Otherwise you can just do it without saving anything and consequently without using the filesystem.
Re: How can i do a level transition?
Ok, thanks!
Can you tell me what function i use to this without filesystem, or show me a example?
Sorry, im very noob, i have no ideia how to do this
Can you tell me what function i use to this without filesystem, or show me a example?
Sorry, im very noob, i have no ideia how to do this
Re: How can i do a level transition?
JackHide wrote:Ok, thanks!
Can you tell me what function i use to this without filesystem, or show me a example?
Sorry, im very noob, i have no ideia how to do this
Code: Select all
map = "map1" --the current map
mapTable = {}
function map_add(name,picture)
table.insert(mapTable,{name = name,picture = picture})
end
--this function draws the map(s)
function map_draw()
for i,v in ipairs(mapTable) do
if v.x == map then
love.graphics.draw(v.picture,0,0)
end
end
end
--the list of maps
function map_list()
function map_add("map1",pic1)
function map_add("map2",pic2)
end
also dont give up, just try something easier
Re: How can i do a level transition?
Thanks, jjmafiae!
I'll try to implement it in my code!
One doubt, its works with tilemaps too?
I'll try to implement it in my code!
One doubt, its works with tilemaps too?
Re: How can i do a level transition?
i think you can modify my code to work with tile maps, but i have nearly never used tile systems myself.JackHide wrote:Thanks, jjmafiae!
I'll try to implement it in my code!
One doubt, its works with tilemaps too?
Re: How can i do a level transition?
Ok, thanks again!
Re: How can i do a level transition?
Hello!
I am one of the people who are working with Jack in this game.
But we do not know really make a game. So we would like to know how we can do to add more levels in our game.
We have several versions of the game, each with a different level, but we do not know how to put it all together, do not know how to identify the player reached the end of the level, not as we do to end a level and start again.
Is there a simple way to do this?
Thank you for your attention.
I am one of the people who are working with Jack in this game.
But we do not know really make a game. So we would like to know how we can do to add more levels in our game.
We have several versions of the game, each with a different level, but we do not know how to put it all together, do not know how to identify the player reached the end of the level, not as we do to end a level and start again.
Is there a simple way to do this?
Thank you for your attention.
Zuli: http://love2d.org/forums/viewtopic.php?f=5&t=77467
Minus One Games: http://minusonegames.weebly.com/
Minus One Games: http://minusonegames.weebly.com/
Who is online
Users browsing this forum: No registered users and 5 guests