-
Posts
174 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by ChrisMAN
-
-
There is something kind of off where it is feeling artificially choppy. I am running off of a nvidia 670 ftw and am getting 40-50 fps. Something is definitely wrong unless this is supposed to supersede The Witcher 2.
-
If they offer a digital back catalog for games like Grandia, Lunar, and the other JRPGs I am sold.
-
Josh will you expose LuaJITs ffi package to LE3? It should just work out of the box but le does something funny i don't understand. I consider ffi to be superior workflow to creating bindings in many cases.
-
Our example game Darkness Awaits is written entirely in Lua. I was worried at first it might be too slow to script the whole thing, but it turned out Lua is fast enough for what we are trying to do.
When the JIT can figure it out lua is very fast. I know for a fact that i have gotten burned by simple things like exiting a function early. Microbenchmarks put it at 70-80% native C.
I would be curious to see what the lua profiler says. https://gist.github.com/perky/2838755
-
maybe after xmas in February, and i get to play around with 3's built in lightmapper, i'll be able to abandon all this...
--Mike
I have been horsing around with sdl and the likes trying to figure out how this stuff works. Here is to hoping for abandonment.
-
i dont get how you were able to blend 2 materials. can you reiterate how you did that? very cool stuff.
-
If what i remember hearing is correct you can attach post processing directly to the camera.
-
I would be very interested in hearing if any one has gotten free type integrated with leadwerks 2.5.
-
I don't know much about opengl but once i started thinking of buffers as an array of memory addresses on the video card things started to make more sense. When you copy from the buffer you are still just copying memory addresses so if you modify the buffer after a copy, the copy is affected as well.
Here is the trick to get the transparent buffer:
SetBlend(1) SetColor(Vec4(0,0,0,0)) ClearBuffer()
in summary set the color before clearing the buffer. the buffer's background will inherit the current color.
-
yes that is what i was doing. my gui framework i wrote handled it so i don't have a nice clean snippet of how to do it.
- create a full sized buffer
- copy the color buffer
- use DrawImage to draw just copied texture to the backbuffer
*protip be mindful of your color during this whole thing. it is much like setworld. if you don't manage it... it will manage you!!!
as far as positioning goes i positioned everything using left, right, top, bottom. right and bottom subtracted the width of the element to that it could cleanly snap to the side/bottom of an element. again the gui tool i wrote handle this for me. i also used a combination of horizontal/vertical centering for things that would go in the middle of the screen.
i find using these relative coordinates solves the majority of ui issues.
if you can't get that to work i can cook something up.
- create a full sized buffer
-
I had been using leadwerks buffers to downsample eveything. I havn't tested the extremes though :| I could see it falling apart after 30%
- 1
-
there is a pattern from functional programming called partial application which is kind of interesting for message handlers
-
I have considered a no internets rule until i finish a song. Not keeping up with music has been one of my biggest regrets. You don't wan t to go longer than 3 years. It is been 5 for me and it kills.
-
never done it. just using my magic google powers.
for ltp/serial on linux you write to a file. on windows its WinApi
there is libusb for usb stuff.
- 1
-
Here is a character animation template i wrote for the leadwerks community project in lua
https://gist.github.com/friesencr/4743009
require("scripts/class") require("scripts/math/math") require("Scripts/constants/engine_const") local class=CreateClass(...) function class:CreateObject(model) local object=self.super:CreateObject(model) local animation_data = { walk = { start = 50, frames = 23, multiplier = 1 }, idle = { start = 0, frames = 44, multiplier = 1 }, strafe = { start = 75, frames = 117 - 75, multiplier = 3 }, run = { start = 125, frames = 142 - 125, multiplier = 1 }, run_strafe = { start = 75, frames = 117 - 75, multiplier = 5 }, jump = { start = 150, frames = 176 - 150, multiplier = 1 }, land = { start = 210, frames = 214 - 210, multiplier = 1 } } local current_frame local animation_state local animation_start_time = AppTime() local current_animation = animation_data['idle'] function object:Update() local ca = current_animation local time = AppTime() - animation_start_time local frame = (( time / 60 ) % (ca.frames/ca.multiplier)) * ca.multiplier + ca.start self.model:Animate(frame, 0.2,0,1) end function SetAnimationState(state) animation_state = state animation_start_time = AppTime() current_animation = animation_data[state] end function object:ReceiveMessage(message, extra) if message == 'idle' then object:Idle() elseif message == 'walk' then object:Walk() elseif message == 'run' then object:Run() elseif message == 'jump' then object:Jump() elseif message == 'land' then object:Land() elseif message == 'strafe' then object:Strafe() elseif message == 'run_strafe' then object:RunStrafe() end end function object:Walk() if animation_state ~= 'walk' then SetAnimationState('walk') end end function object:Idle() if animation_state ~= 'idle' then SetAnimationState('idle') end end function object:Run() if animation_state ~= 'run' then SetAnimationState('run') end end function object:Strafe() if animation_state ~= 'strafe' then SetAnimationState('strafe') end end function object:RunStrafe() if animation_state ~= 'strafe' then SetAnimationState('strafe') end end function object:Land() if animation_state ~= 'land' then SetAnimationState('land') end end function object:Jump() if animation_state ~= 'jump' then SetAnimationState('jump') end end end
-
Don't forget to set the color to 0,0,0,0 before clearing the buffer.
-
One way:
https://developer.nv...ies-83111271645
http://www.void.gr/k...ng-imagemagick/
http://www.fmwconcep...Dtext/index.php
Another way?
I think you can attach a shader to to a 2d texture. If you want to animate it this is a much better option. I would try this one first.
-
I wrote a library that inverts callbacks and allows you to compose their behavior. On the web side of things we use them all the time. They are called promises. Lua has awesome continuations but ultimately they cannot be controlled well or composed so i created a promise library and an event emitter library. I don't know why the game world hasn't caught on. I feel like I am taking crazy pills. It's like c++/game devs live in a vacuum.
-
I know these can be hard discussions to have because people often get attached to their systems and fight to the death to defend them and I hope I wasn't coming off that way.
Fortunately no body dies.
-
Write a little bit of abstraction to give structure but most importantly the code needs to be hack-able and able to handle some good spaghetti I am written many complex web interfaces and it usually comes down to some good spaghetti. Conventions can help to reduce confusion among fellow developers.
-
You are better off learning Java because it forces you to make EVERYTHING a class. C++ doesn't have this requirement so it's probably not the best language to learn about classes with. I suggest coding in Java for a couple months so you are used to making everything a class, then come over to C++ and learn it's slight differences in how it handles classes, but at least you'll be in the good habit of making everything a class.
It is about to gain blocks, and dynamic typing. It will almost be a on parity with c#.
Seriously though... the inability to use procedual forms of programming... I love procedural programming. OO is the devil in diguise. There was so much knowledge that was built up through the 70s and 80s and it was destroyed by .net and java. It wasn't until about 5 years ago where the renascence picked up again. Try reading up on logic programming. It is pretty wild how they solve things. I a few years out from learning a functional language. I hear you have to wear a sweater to be a functional programmer. Clojure is picking speed. Soon it will have alternative VMs to the jvm.
Rust lang http://www.rust-lang...ang.org/ This language has epic potential. It has bindings to sdl.
Too much to learn. So little time...
- 1
-
Lua does OO very differently. It's OO system was modeled after Self. http://en.wikipedia.org/wiki/Self_(programming_language)
Its method of oo uses the caller of the method as the 'this' or as lua calls 'self'. even though the owner of the function can be a totally different object. if you have ever done OO in javascript you will feel this pain if you used to the C family languages.
There are basically 2 ways of doing classes in lua. You can use meta tables or you can literally copy methods from one object to another. The copying method is often called a 'mixin'.
There is no way around reading luas documention on tables and meta tables. To make matters worse lua has gained much of its popularity from it being the language used for the user interface system in WoW. That means that google is half as effective.
If you use metatables for your 'classes' you are using something much like prototypical inheritence
This is what got me started with metatables as classes http://lua-users.org/wiki/SimpleLuaClasses
If you want to use a mixin you can use a function like this
function mixin(dest, src)
assert(dest)
assert(src)
for key, value in pairs(src) do
dest[key] = value
end
end
If you are writing code for someone else to use. You should use mixins because they don't depend on metatables to work.
I am sorry for not explaining this better.
-
I use events / pub-sub for most everything. You have to be careful about cleanup though.
-
That is so wrong, it's just a horrible idea, why would anyone in their right mind do it?
I was a .net 'build master' for a company. This link made me see the words msbuild again. There needs to be blood. I double dog dare anyone to integrate an open source testing tool(which are the only good ones) as part of a tfs build with reports working /fml
Leadwerks 3 Beta Evaluation Kit
in General Discussion
Posted
ok. debug off. vsync off. i ran around in the main room for like 5 minutes and started with 100fps and ended with 60fps smells like a leak.