Jump to content

give my player controller a mesh?


dennis
 Share

Recommended Posts

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!

Link to comment
Share on other sites

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.

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

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

Link to comment
Share on other sites

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 ;)

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

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?

Link to comment
Share on other sites

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.

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

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?

Link to comment
Share on other sites

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.

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

thanks :D

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 :)

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

Well that's a great opportunity for you to find a solution and make a name for yourself :D

 

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!

Link to comment
Share on other sites

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.

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

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 :D 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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :mellow: was just kidding

but I can have enough time, by give myself less sleep and such

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...