Jump to content

Map referencing by project


YouGroove
 Share

Recommended Posts

Would help to be able using project manager to declare all maps a project would use with possibility to add maps, drop maps (It would be relative to project path and mandatory each map would have a unique name).

And finally in Lua or C++ , you would have a simple command like LoadMap("Name"), that would free all ressources and scripts of current map, and would load the new map and scripts.

Stop toying and make games

Link to comment
Share on other sites

function App:Start()

--Create a window

self.window = Window:Create()

self.context = Context:Create(self.window)

self.world = World:Create()

 

--Load a map

return Map:Load("Maps/start.map")

 

end

 

function App:Loop()

 

if self.window:Closed() or self.window:KeyHit(Key.Escape) then return false end

 

Time:Update()

self.world:Update()

self.world:Render()

self.context:Sync()

 

return true

end

 

 

The idea would be to change map in the Loop function what don't works.

 

Well i already tested in Lua, it can't work, caus you compile Leadwerks.exe that have a LoadMap already, and Lua Loadmap don't work to change the map level. Perhaps in C++ you control really how maps load, but in Lua it is more complicated caus Lua uses Leadwerks.exe.

 

We discussed it there :

http://www.leadwerks.com/werkspace/topic/7739-lua-and-loading-maps-question/

 

And the post here is just to submti some idea for people wanting to make a complete project using Lua only without needding to code special stuff in C++ to have maps passed from Lua to Leadwerks.exe.

So it is just a suggestion nothing more wink.png

Stop toying and make games

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...