dennis Posted November 25, 2011 Share Posted November 25, 2011 Hello all, when I start up my game, it will load the camera and weapon and such. but how can I give it a real character mesh / model? it still has to be a FPS withou 3rd person cam. My script is attached in this post, (modified leadwerks fps player controller) fpscontroller_function_version.lua my load scene script is attached here too. start.lua Cheers! Quote Link to comment Share on other sites More sharing options...
Pixel Perfect Posted November 25, 2011 Share Posted November 25, 2011 You simply need to load a character model and move it to match your controller position and rotation in each iteration of the game loop. You will probably want to tie in suitable animation control for your character too so it animates as it moves. Take a look at the various tutorials dealing with loading characters and controlling animation. However, if you do this you will probably need a model that supports weapon attachments and has existing animation support for the weapon rather than using a stand alone weapon and simulated arms which is not expected to have a full model for the player. Not sure why you are wanting this if you are not planning on having third person camera support? If it's just for a third person view of the players death then you could just substitute in a model with a death animation at that point. Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
dennis Posted November 25, 2011 Author Share Posted November 25, 2011 You simply need to load a character model and move it to match your controller position and rotation in each iteration of the game loop. You will probably want to tie in suitable animation control for your character too so it animates as it moves. Take a look at the various tutorials dealing with loading characters and controlling animation. However, if you do this you will probably need a model that supports weapon attachments and has existing animation support for the weapon rather than using a stand alone weapon and simulated arms which is not expected to have a full model for the player. Not sure why you are wanting this if you are not planning on having third person camera support? If it's just for a third person view of the players death then you could just substitute in a model with a death animation at that point. it would be for multiplayer. so you can see the enemy walking. instead of a walking weapon Quote Link to comment Share on other sites More sharing options...
Pixel Perfect Posted November 25, 2011 Share Posted November 25, 2011 it would be for multiplayer. so you can see the enemy walking. instead of a walking weapon that explains it. Yeah treat it just like an NPC then, it just happens to be controlled by a player Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
dennis Posted November 25, 2011 Author Share Posted November 25, 2011 that explains it. Yeah treat it just like an NPC then, it just happens to be controlled by a player thanks pixel can you help me with one more thing? Quote Link to comment Share on other sites More sharing options...
Pixel Perfect Posted November 25, 2011 Share Posted November 25, 2011 If I can, ask away! Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
dennis Posted November 25, 2011 Author Share Posted November 25, 2011 If I can, ask away! When I load my scene, it just loads fine and such... but it takes a terrible time (it's too big) so I thought, maybe place a cutscene before the game start... but now I can make the cutscene and such. but How will be be able to: Show the cutscene background load all the files (simply by use Loadmaterial and Loadscene ...) then hide the cutscene when it's done. How can I do this? can you give me a shot in the right direction? Quote Link to comment Share on other sites More sharing options...
Pixel Perfect Posted November 25, 2011 Share Posted November 25, 2011 Leadwerks 2 does not inherently support multi-threaded execution so you can't simply load the level data in the background whilst executing LE code in the foreground. However, I know others have looked at this in the past and come up with a few suggestions. You might want to search the forum for previous threads on this or hopefully someone who may have implemented a solution might see this and provide some more direct input. Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
dennis Posted November 25, 2011 Author Share Posted November 25, 2011 Leadwerks 2 does not inherently support multi-threaded execution so you can't simply load the level data in the background whilst executing LE code in the foreground. However, I know others have looked at this in the past and come up with a few suggestions. You might want to search the forum for previous threads on this or hopefully someone who may have implemented a solution might see this and provide some more direct input. okay thanks, and what about the pre-loading? such as a normal loading screen? Quote Link to comment Share on other sites More sharing options...
Pixel Perfect Posted November 25, 2011 Share Posted November 25, 2011 You can display a load screen but its not going to be dynamic as there are no inbuilt hooks within the LoadScene command to supply loading feedback plus, being single threaded, this command must execute first before control is handed back to any other Leadwerks code that might be updating the load screen. There is nothing to stop you launching seperate threads or applications to display say a video cut scene but the problem is still synchronising those, maybe through the use of some shared memory and critical section type devices you might get something workable. As I say, I'm sure others have looked at this in some depth, I seem to recollect Metatron having some threaded solution to aspects of this but I don't remember if it was a full and viable solution. Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
Pixel Perfect Posted November 25, 2011 Share Posted November 25, 2011 Worth taking a look at this thread: Progress Bar Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
dennis Posted November 25, 2011 Author Share Posted November 25, 2011 Worth taking a look at this thread: Progress Bar thanks but the problem is, there isn't a solution yet. but will find my way through. if you got me some tips and tricks to get fast more familiar to this all (with lua) they are welcome Quote Link to comment Share on other sites More sharing options...
Pixel Perfect Posted November 25, 2011 Share Posted November 25, 2011 thanks but the problem is, there isn't a solution yet. Well that's a great opportunity for you to find a solution and make a name for yourself Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
dennis Posted November 26, 2011 Author Share Posted November 26, 2011 Well that's a great opportunity for you to find a solution and make a name for yourself the problem is I'm new to LUA but I'm such a great technical engineer, so my ideas are there. but need to code it. I'm a VB.net expert. but want to work with LUA. Cheers! Quote Link to comment Share on other sites More sharing options...
Pixel Perfect Posted November 26, 2011 Share Posted November 26, 2011 I find most programmers who are good with one language can move between languages pretty easily. Take your time, review the language and the rest should come easily. I don't use LUA at all currently, I code everything in C++ but I don't think I'd find the transition to LUA much of a challenge. Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
dennis Posted November 26, 2011 Author Share Posted November 26, 2011 I find most programmers who are good with one language can move between languages pretty easily. Take your time, review the language and the rest should come easily. I don't use LUA at all currently, I code everything in C++ but I don't think I'd find the transition to LUA much of a challenge. I know, the transition isn't that hard. but it need some time, and the problem is, I don't have much of that high valuable stuff with all the exams I have till march 2012 and I need to hold my good athletic shape off-course. (can't believe I'd said that ) but yeah, the army thanks for your tips Cheers Quote Link to comment Share on other sites More sharing options...
Rick Posted November 26, 2011 Share Posted November 26, 2011 I know, the transition isn't that hard. but it need some time, and the problem is, I don't have much of that high valuable stuff Welcome to the life Quote Link to comment Share on other sites More sharing options...
dennis Posted November 26, 2011 Author Share Posted November 26, 2011 Welcome to the life thanks that's very supporting of you I just turned 18, and I don't even have time to sleep XD Quote Link to comment Share on other sites More sharing options...
Rick Posted November 27, 2011 Share Posted November 27, 2011 Making video games and all that is involved with doing so takes a very, very long time. The most experienced people here have been doing so for many many years all while having family and full-time jobs, and all that comes with life and most have never finished a game yet. There isn't much to be supportive about because in life you'll never have enough time to do all that you want and there isn't much you can do about that. This is true when you are 18 and will be true when you are 60. Just prioritize the things you really want to do and go after them. If you truly want a multi-threaded loading feature then you can either do it yourself as Pixel mentioned or wait until LE3. Not trying to be mean or anything, this is just the reality. Pick and choose what's really important to you. Quote Link to comment Share on other sites More sharing options...
dennis Posted November 27, 2011 Author Share Posted November 27, 2011 Making video games and all that is involved with doing so takes a very, very long time. The most experienced people here have been doing so for many many years all while having family and full-time jobs, and all that comes with life and most have never finished a game yet. There isn't much to be supportive about because in life you'll never have enough time to do all that you want and there isn't much you can do about that. This is true when you are 18 and will be true when you are 60. Just prioritize the things you really want to do and go after them. If you truly want a multi-threaded loading feature then you can either do it yourself as Pixel mentioned or wait until LE3. Not trying to be mean or anything, this is just the reality. Pick and choose what's really important to you. Haha I know what you mean was just kidding but I can have enough time, by give myself less sleep and such Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.