-
Posts
36 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by Averice
-
-
I haven't run it either but by the sounds of it they're talking about some sort of visibility meter that knows when you're being lit up by a light source.
-
Those assets look like something I bought ...but for another engine ... the "sci-fi level kit" from HedgeHog..
Probably is, It's from the unity asset store.
-
Woo adding caves in the terrain generation, still very early.
- 4
-
Polygon fill would be great it means I could port my gui to be rendered in 3d space easily!
-
As a side project I've started working on procedural voxel terrain generation, it's got the basics of a chunk system, and perlin noise.
Here's a picture of 1 generated chunk.
- 1
-
debug.traceback is what you want.
-
Menu is slowly getting there.
- 7
-
GUI
in Programming
http://www.leadwerks.com/werkspace/blog/154/entry-1390-more-gui-work/
I'm working on one as I write my game it's independent of all game code bar my event module which can easily be packaged with it, it's not far from completion.
-
Thanks for the feedback everyone, I'll post a new picture once I get some more stuff happening in the scene to avoid posting the same scene 4 times haha.
Good eye panther, the seats were out by 1cm, no I didn't make the models, I originally started this project in unity and had bought the model pack from the asset store so I just dropped them into Leadwerks and continued using them it was a pretty seamless drag and drop and they were able to be used which was nice, the only thing I had to do was re-add the materials to them which took about 5 minutes.
The unity asset store has some really nice content that is compatible with Leadwerks( am I allowed to say that? ), some model packs have their models as a U3dMesh which for some reason puts the pieces out of alignment in Leadwerks but it's as simple as opening blender and using the Leadwerks exporter instead of the usual .fbx exporter and they're fine to use again.
-
-
More menu background map progress, I plan to have it as a live background map so you'll see AI walking around doing their jobs and **** nothing major just something to pop out and show it's an actual map not just a picture in the background.
Need some help deciding, Bloom or no bloom
Note this is only for a menu background, not an actual gameplay map.
- 2
-
Nice code, mind if I add it to the wiki?
Go right ahead, would be good for others to get some use from it too.
Alright I've decided to post some modules on my leadwerks.com blog, when I get spare time I'll try to post more of them with some usage guides.
http://www.leadwerks.com/werkspace/blog/154-lua-is-better-than-you-think/
- 1
-
I wrote a quick event binding module in lua for the game I'm working on, all you have to do is import this file and add event.CheckInput() in your loop somewhere.
This solves the problem of leaving unchecked keys in the event and also allows you to add more functionality to a single key check instead of adding it all in one massive loop in one file.
For some reason I can't paste the code here because it won't copy tabs and looks ugly
Usage is quiet simple.
-- keyboard binds. event.AddInputBind(key, name, held, func, ...) -- Key code, Unique Name, Run on key held?, function, function args event.AddInputBind(Key.A, "unique_name_here", true, print, "hello", "leadwerks", "community"); -- mouse binds. event.AddMouseBind(but, name, func, ...) -- mouse button code, unique name, function, function args. event.AddMouseBind(mousebuttoncode, "unique name", print, "hey there");
I have quite a few helpful modules I've written for the game I'm working on, is there somewhere you guys would like me to put them so others can take advantage of them?
- 1
-
Snip -- rick answered it
-
Looks like it's coming along nicely, I think you should have the enemies only make the alert sound sometimes so they can sneak up on the player occasionally, at the moment it pretty much alerts you of it's presence right away which makes it easy to pre-aim and kill.
Something like
if prevmode~="chase" then if self.sound.alert and math.random(1, 100) < 25 then self.entity:EmitSound(self.sound.alert); end end -- 25% chance of alerting of presence.
On a side note I'm working on the map for the menu background of my game, it's themed in a Spacestation
- 8
-
No I've disabled sandboxing so I can use require, and require works fine except when I try to require .dll
-
I think you have to use import instead of require. Not sure though.
import tries to read it as lua and gives me lua errors on the symbols inside the file.
-
I don't know if this is on purpose or not but whenever I require a non-lua library it crashes before launching, I can just ffi the C versions of these libs but that's not what I want to do.
Is there any ideas on why this is? It's not the libraries themselves as they run perfectly with the lua interpreter outside leadwerks.
-
If you are referring to the mousewheel being clicked, then you can use 'self.window:MouseHit(Key.MButton)' or 'self.window:MouseDown(Key.MButton)'. If you are referring to the mousewheel being scrolled, then use 'self.window:GetMousePosition().z'
GetMousePosition().z is what I was looking for, thanks!
-
Currently porting my GUI lib to leadwerks and decided to port my console over.
It took a few tweaks but overall it was really easy to port over.
The text entry does move and clip text so you can see what you're doing if it's out of the boxs bounds, it also has carrat positioning, line wrapping and scrollbars are there too.
Parenting and dragging are supported.
Does anyone know if there is a keycode for the mousewheel up and mousewheel down in lua yet?
- 2
-
Sorry for the double post, but if anyone else is looking for a working glScissor ( or other gl functions ) I've managed to get it working using luajits ffi library.
ffi = require "ffi"; gl = ffi.load("OPENGL"); -- windows. ffi.cdef[[ enum { GL_SCISSOR_TEST = 0x0C11 }; typedef unsigned int GLenum; typedef int GLint; typedef int GLsizei; void glEnable(GLenum cap); void glScissor (GLint x, GLint y, GLsizei width, GLsizei height); ]]
Usage:
gl.glEnable(gl.GL_SCISSOR_TEST); gl.glScissor(0, 0, 100, 100); -- draw stuff gl.glScissor(0, 0, scrwidth, scrheight);
The only difference is the origin is bottom left instead of top left so I've provided this.
function math.glreverse(y, objH) -- y is the position on the y axise, objH is the height of the obj you want to place at y return (App and App.context) and App.context:GetHeight() - y - objH or 0; end
-
Set the camera as a variable on the entity? That way you can just lookup the entities own camera from the entity itself.
-
It let's you specify a rectangle on the screen in which anything drawn outside it during that pass is not actually drawn, it's part of openGL I was just wondering if it had been bound to Lua for leadwerks at all.
glScissor(x, y, width, height) -- small rect
-- Draw stuff
glScissor(0, 0, screenwidth, screenheight) -- return to normal
-
I might have completely missed it if it's already there but can anyone tell me if there is a version of glScissor for Leadwerks Lua? Or if it's planned at all? Thanks
Procedural (Generated) Level's using prefabs
in Programming
Posted
If you look in what are you working on thread I have been using perlin noise for terrain generation using blocks and pure Lua, would work the same using a prefab and instancing it.