-
Posts
815 -
Joined
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Alienhead
-
Neither, those doc examples show what the command takes as a parameter.. It's just for reference.. When actually entering the parameters for the command there is no = ( equals sign ) used. Think of the Syntax section of the docs as a legend on map - it simply highlights what the command itself is looking for. Window Create(string title="Leadwerks", number x=0, number y=0, number width=1024, number height=768, number style=Titlebar) Would translate into win = Window:Create("Leadwerks", 0, 0, 1024, 768, Window.Titlebar)
-
Well in case anyone else ever has this problem, I was finally able to track down leadwerks.cfg file inside Documents, deleted it and it seemed to have reset my window positioning.. problem solved..
-
Just finished reinstalling leadwerks completely, still the same results... fn' odd.
-
I seem to be having a problem, I have my map made, my terrain laid out and obstacles tagged as Nav Obstacle. I go to tools > build nav mesh .. i click it but nothing happens.. no pop up box as the docs describe and no nav entity showing the map. I have started 2 blank projects with just a terrain an 1 entity on the map, but I get the same results.. no nav mesh generated or input box appearing. Ant suggestions ? ty
-
Well you do need a MAIN.lua, but it doesn't have to be the framework main.lua included with LE. Here's the most basic framework you need to start a project. It creates and spins a cube on the screen. -- Create a window window = Window:Create("Start", 0, 0, 800, 600, Window.Titlebar+Window.Resizable) --<< we need a window to start -- Create the context panel context=Context:Create(window) --<< we need a panel; to draw to ( panel is created inside the window ) world = World:Create() World:SetCurrent(world) --<< we need a world to play in. -- Make a 3d cube entity = Model:Box() --<< we need a 'thing' in the world to look at . -- Main Loop while true do -- do your 3d stuff here entity:Turn(0,1,0) --<<< make the 'thing' do something. --Update the app timing Time:Update() --Update the world world:Update() ---<< update the world ( let a day pass ) --Render the world world:Render() -- << no other 3d operations will show up after rendering, until the next pass -- If you were doing any 2D, text or images -- they would go here. After Rendering but -- before flipping. context:Sync(false) ---<<< flip everything that happebd in this loop to the display buffer. end
-
Take small steps... Like Yue said, don't dive into the Main.lua.. create a blank project and start by rotating a box around the screen. Once you have familiarize yourself on how to do that - then make the box change color or scale bigger etc... before to long you will have a basic concept on how things flow.. plant that seed ! To be honest the programming language really isn't the obstacle to overcome, be it C++, LUA, c# ... or whatever.. Leadwerks ( or any other game engine ) is going to take the same instructions regardless what coding language the instructions were sent from. Sure theres some differences between the actual languages which makes one choose one over the other but when it comes down to it - Leadwerks ( or whatever engine ) is what you need to learn.. The languages just give you a means to tell the game engine what you want done. The real learning is in the game engines themselves. I've been coding for 15 years solid, I came over to Leadwerks about 9 months ago. I restarted my project 3 times, not because I didn't know how to code, while learning the in's and out's of the game engine. So as you can see the language is no barrier, it's getting a good understanding of what your working with, how you want it to work and best avenues to take provided by the game engine itself..
-
Is there a command not documented that sets a light's 'brightness' in code ? Doh, I've been working on day to night transitions all day and all commands and colors are running together in my head lol.. I overlooked light:SetIntensity().. Ignore this post plz.
-
I've looked all over the forums but didn't find any info on this topic. My question is what is the max packet size in LE? UDP packet. I'm guessing 65,507 bytes, roughly translated into string packet size 255 ? ? Just want to be clear on this before I go much further with my networking system, may have to break up some packets into sub packets.. dunno yet.
-
-
I'm cleaning up some possible mem leaks and wanted to know if the following code inside a normal Function/End could be a possible memory leak. ---Check human list --- for r, m in pairs ( serguard ) do if chkAggression(s.myRace, mobdef[m.entity.script.id].race) then The R and the M. Inside the function they are not declared local. Do these variables drop off to GC() after losing scope or are they passed as globals and remain in memory.. I have tons of for/next loops with unlocalized variable usage like the above.. Should I go back and localize them all or do they drop ? Thanks.
- 1 reply
-
- 1
-
Nice animations, run is the hardest to get down.
-
-
So these are engine values? any way to set a custom range ?
-
I think I already know the answer to this question, but doesn't hurt to ask I suppose.. I'm in need of setting custom view ranges, the Medium ( for my usage ) is to close and the Far is to ... well far. If there is no way to adjust or set these view ranges then I ask if entrity:Hide() is actually the same as the engines view range behavior ? If so then I can simply hide and show the mesh myself I suppose.. But if the engine does any special culling outside hide/show then I'd probably need to use the built in entity view range?
-
After seeing YUE's posts about GUI's I decided to finish up my own GUI system, I was going to go with the LE system but I really wanted more customization options so started writing a .lib and it's worked out nicely thus far. Further proving my point that LE is a jewel to work with. This screenie showing about 60% or the GUI system finished. It's looking pretty simple right now, but the underlining logic is finished and in place.. As I continue the game I'll slowly but surely have the gui skins dressed up nice.
-
You need to place the the Mouse Draw commands at the very end. 2D is drawn in order you send the draw commands at it. So draw the mouse image LAST and it will overwrite your panels. As matter of fact, draw the mouse image right before you context:Sync()
-
---Draw Mouse Pointer window:HideMouse() context:SetColor(1,1,1,1) local mousepos = window:GetMousePosition() context:DrawImage(img_mouse, mousepos.x, mousepos.y, 40,40 ) Top secret code ! no sharing !
-
I found out what was causing it, I had a HUGE rock in the scene, it was scaled to high and clipped everything out .
-
Thanks for the offer, I ended up replacing the base shaders with new ones from a new project, and it cleared up. ty.
-
Hmm not sure, I found the billboard png file in the directory and painted it myself.. looks fine, but it just won't compile the color to the pngs upon creation.
-
I was wondering if someone else may have encountered this same situation, and if so maybe offer a solution to a fix. I have a standard non-alpha masked grass entity, just a solid mesh. I'm getting white, texture-less billboards on the grass entities. Has anyone seen this before?
-
This just started happening to me, When I drop the camera below a certain height or angle the backdrop and objects clip out of view. No post effect shaders are loaded. Heres 2 shots, normal and camera positioned down a but more. It's happening even within the editor. Any ideas?
-
I see you got the fonts to fit the tabs, nice.
-
Aye, I'm building Echo-Server routines directly into each client so it's as simple as toggling, host, client or solo at the start of the game to begin a session.. It's just simple 1-4 player co-play, ENet is more than sufficient for these needs. The problem seems to not be with the packet control as I originally thought, I've traced it back to having multiple surfaces on the player mesh, I moved the character control to a pivot and just parented the character mesh to the pivot and it worked fine. Leadwerks is just awesome, where else could I had coded a complete co-op echo-server in LUA... in just 4 days...
-
yah that's the first thing I looked at, I ended up * 100 for now until.