Jump to content

Felix Bytow

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by Felix Bytow

  1. Git and Mercurial are basically the same. Even the commands differ only in special corner cases. IMHO both are superior to subversion, though as already stated Subversion might be easier to learn.
  2. It is not like I had a choice * cough * (still waiting for the full version) Still the Map:Load function could have been implemented in a way that doesn't make your app look like it crashed ;-)
  3. Rick, sadly you are right. Coroutines do no preemptive multi tasking. A coroutine runs until it calls yield. Only then another coroutine or the main routine may gain control :/ so my coroutine test ran, but it had the same effect as using no coroutine at all. I also tested the Map:Load(mapfile, hook) overload again. The hook is called after most of the files have been loaded so is is of no use here :/
  4. As I also like to use Sublime Text for other things like perl development (or lately thanks to a new C++11 plugin also for C++ when a large IDE would simply be overkill) you got me to another idea. It would also be cool if one could configure leadwerks to use an external editor of choice (be it sublime, notepad++, ultraedit or whatever). So when you click the "edit script" button in leadwerks the file gets opened in the external editor.
  5. Hi, it would be cool, if there was an option for the builtin script editor to choose between tabs and spaces for indentation. Also the tabwidth should be configurable as 8 spaces is quite long for some people ;-) Another nice feature in that regard would be a button in the menu to convert indentation tabs to spaces and vice versa.
  6. So the Thread class of Leadwerks says the following: "This class is not available in Lua." However Lua itself supports something called coroutines. These are used for multithreading and as it seems would allow what I want to achieve. I'll try to create a proof of concept and if it works post some code here.
  7. Hi there... so here are actually 2 questions: 1. How would I do 2D physics? My game is 3D but with a flat ground and a top-down-camera... There is no jumping or anything so movement should only happen on x and z axis. I tried moving a box entitiy using AddForce and just moving it along the z axis (which works fine), but as soon as it hits e.g. a wall it bounces off and suddenly there is also y movement :/ How can I disable the y axis for physics? 2. Somehow related to 1... When the box hits a wall in an angle of 90 degree it should bounce off without turning to the side (atleast I would expect that), but it seems to bounce off randomly to the side. But what I would want even more is to disable the bouncing completely for that type of collision (this box hits any wall), but I coudn't really find a command to do so. How can I disable the bouncing on collision? I hope someone can help me :-)
  8. Though the "display a simple image up front and then load everything" would be a quick fix it is not quite satisfying. The player usually won't care for the loaded entities, that is true, but he might like an animated loading screen more than a static one. With the loading placed in another thread one could display an arbitrary complex loading screen, starting from playing an ogv, displaying an image with music, or showing somethign like a status bar. Even some spinning tribals might suffice to show the user "hey, there is still something going on".... ATM I am not sure how far Lua supports multi threading but I will do some research in that direction.
  9. I came across a little problem with Map:Load on a big map with lots of dependencies (entities, sounds, textures, ...). Though it works fine and everything it has one problem: While loading the engine does not care for the event loop, causing the operating system to mark the process as not responding. If you know what's going on, this is no problem. But it may be confusing to later customers that might become nervous that the game just crashed. Even if you know why the game freezes during the loading of the map you cannot exactly be sure if it is still loading or if it crashed. I found in the documentation that there is an overload of Map:Load allowing to provide a hook that is called for each loaded instance: http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/map/mapload-r510 Here my problem is: there is no example on how to use this method from LUA (as for now I only got the Indie version as a backer). I tried doing something like Map:Load("path to map", "onEntitiyLoaded"); But I am not sure on how to give self to that function so it can call e.g. self.World:Update() and stuff... also what I tried just made the game crash.... So there are 2 solutions I can think of: Doing the load in an extra thread which signals when it's done, so the main thread can just run the main loop and maybe show some art or a progress bar or what not. Or the load should be reentrant, so you can do the main loop and on each iteration you go on loading a bit more of the map.
×
×
  • Create New...