Jump to content

Gameplay Tutorial Requests Here


Rick
 Share

Recommended Posts

I have a few requests for tutorials -

  1. How to map Input/Actions to a controller, keyboard, or joystick.
     
  2. Creating a load / save game system for our games.
     
  3. How to Implement Split Screen Cooperative or versus Play on a single machine for up to 4 players.

I can go on and on but I will leave these here for now smile.png

Link to comment
Share on other sites

Lua itself has no graphic capabilities. Most "core" languages don't so it's not as if this makes Lua bad or the odd ball. People make libraries in a given language that expose this functionality. Leadwerks exposes some functionality via Lua to do certain things.

 

I guess you'd need to give an example of what you are looking to do. If you are looking for what is called post processing effects (doing funky things to the entire screen) then that's shaders. It's very powerful and much faster and it's a good thing that it's not directly done on the CPU but on the gfx card itself because that's where shaders run.

 

The good news is you can code shaders in all editions of Leadwerks. Go to the shaders folder and just dbl click one and it'll open it up for you in the shader editor. The bad news is shader programming takes a good amount of time to learn and is an advanced topic. Shader programming has it's own language that is like C++ and the language is an OpenGL thing not a Leadwerks thing. However Leadworks can add it's own touch in how it exposes things to shaders. As I said, it's a pretty advanced topic, but if you put the time in you can learn it.

Link to comment
Share on other sites

@ Kavex I agree that would be cool. It however could be more of a modeling thing than coding. I say could be because there are different ways to attack this problem. I could offload it 100% on the modeler and just have them make new arms for the flashlight and in code I just switch what model I'm using. Or, the modeler could make the 1 model but have different animations using all the possible "attachments" already in the model just hidden below it and only have it show during certain animations in the model. Like, Arms_Pistol_Idle, Arms_Pistol_Flashlight, etc.

 

Or you can have the arms be 1 model, while the attachments be different models completely. Their animations could possibly need to be lined up still in order for it to look good, but then you would have bones on both models, and in code find the position of these bones and line them up (you could even parent one to the other if you like).

 

I would love to do a tutorial on this, but I'm not an artist and so I'd need the correct models to work with first.

Link to comment
Share on other sites

That would just be positioning of the 'flashlight' (a spotlight) which I assume is created in that FPSPlayer script (I don't have it in front of me). You can just increased the Y value probably to raise it up. I assume that's all you mean? You can also increase the Z value some maybe to move it forward some, and the X value to move it left/right.

Link to comment
Share on other sites

I can probably make a short example on render-to-texture security cam. Shouldn't require any extra shaders, just how to render a buffer to texture?

Would this be directly related to creating portals? Somehow Portal / Portal 2 creates round portals and I'm not sure how much harder that would be to create - but it would be really nice to see.

Link to comment
Share on other sites

Would this be directly related to creating portals? Somehow Portal / Portal 2 creates round portals and I'm not sure how much harder that would be to create - but it would be really nice to see.

 

the way or a way you could do it in leadwerks is to create a flat cylinder csg entity. Then you could apply a render to texture on the cylinder. Then to add effects add a flickering light and some cool particles. to get the actul teleporting i would just follow the teleport to tutorial.

  • Upvote 1
Link to comment
Share on other sites

I can probably make a short example on render-to-texture security cam. Shouldn't require any extra shaders, just how to render a buffer to texture?

 

Yeah - any post processing could be done by the objects shader.

System:

Linux Mint 17 ( = Ubuntu 14.04 with cinnamon desktop ) Ubuntu 14.04, AMD HD 6850, i5 2500k

Link to comment
Share on other sites

Would this be directly related to creating portals? Somehow Portal / Portal 2 creates round portals and I'm not sure how much harder that would be to create - but it would be really nice to see.

 

I would guess they just use a rectangular plane with a mask that makes it appear round.

Link to comment
Share on other sites

If I step through the portal I get collision in rapid succesion since player is moved between the portals every frame since collision occur immediatley after player is moved.

 

So I havent figured out a smooth way to solve this, any tip would be appreciated

 

 

I think this can be solved now with the new collision script that has enter/exit? Are you teleporting instantly or trying to do what portal does where you can see your character 1/2 and 1/2 in both. If teleporting instantly then look at my teleport video tutorial. It uses the enter/exit and before I send to the other portal it disables the destination portal so the collision that would happen when over there won't happen until I exit and come back.

 

http://www.youtube.com/watch?v=dTaSP1fKD7c

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