Jump to content

Guppy

Members
  • Posts

    775
  • Joined

  • Last visited

Everything posted by Guppy

  1. have you dragged the material onto the model? and what does the shaders of the material say?
  2. That depends entirely on what is supposed to be shown on the gui and what the source is
  3. Leadwerks doesn't support true alpha transparency on models - only what is essentially 1 bit transparency ( think GIF vs PNG ). This means that a pixel is either fully there or fully not there. What the shader does is take a cut off value like say 50% transparent and discards all pixels that are below this value and draws the ones above - so you cannot have semi transparent objects like you wanted above. As I understand this is a technical limitation of the engine. Because your UI is essentially an overlay you can still do it with a bit of trickery tho, every frame; first render you UI to texture keeping the alpha values. Wait for the engine to be done drawing ( context.sync() iirc ) Draw a quad ( tristrip/vert buf/etc ) on top of everything ( in orthomode) with the correct blending mode using the texture you created in step 1 set blend & perspektive mode back to defaults
  4. It especially shows on bright backgrounds: Ps. I couldn't upload this image to the forum as I can aparently only upload images up to 70.99K, that's really really low
  5. Not sure what it is you want support for output? they posted glsl shader to distort your image to fit, like so ; http://glslsandbox.com/e#20035.0 ( gonna need to render the scene twice, but even so ) tracking? as I understand it will present it self as a HID device, so that shouldn't be a problem either
  6. http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/entity/entitysetanimationframe-r141 you just have to decide the blend factor your self ( usually 1/number of animations playing simultaniously )
  7. Just hoping it will NOT be via steam for these reasons; You'd exclude standalone users You will be unable to sell libraries ( think gui, network, ai tailored for leadworks ) You would have pay tithe to Josh and steam both ( the steam cut is under NDA but assume it's 30-40% ) Any thing you buy you would be unable to modify even if the license allows you to. ( adding animations to model, etc ) So for those reasons I'd much perfer to see a store.leadwerks.com - if not we will properly end up each setting up our own shops and such a fragmented system would do more harm that good
  8. Agree 100% - especially as I can see no way to iterate over leadwerks virtual file system.
  9. While having a small set of fairly simple tables you could properly get away with using Leadwerks::Interpreter::NewTable(); size_t top=Leadwerks::Interpreter::GetStackSize(); Leadwerks::Interpreter::PushString("Key1"); Leadwerks::Interpreter::PushString("Value1"); Leadwerks::Interpreter::SetTable(top); Leadwerks::Interpreter::PushString("Key2"); Leadwerks::Interpreter::PushInt(5); Leadwerks::Interpreter::SetTable(top); (ect) But it's really rather bothersome and hard to read and maintain. And it doesn't get easier when you have somewhat complex like the event table for the gui I'm working on; { event = "onChanged", value = 25.7, caption = "label", widget = { numChildren = 0, parent = "parentWidget", properties = { enabled = true, captoion = "label", visible = "true", class = "ScrollBar", }. id = "testScrollBar", children { }, doStuff: [function] } } Just imagine having to push that to lua using the above technique! Weather or not you think what I've come up with is easier to use/read/maintain is a matter of taste so I'll give you a preview; using namespace luaHelper; typeMap widgetBaseinfo={ {"id", new luaString(widget->getName()) }, {"parent", new luaString(widget->getParent() == nullptr? "": widget->getParent()->getName()) }, {"numChildren", new luaInt(widget->getChildCount()) }, {"UserStrings", new stringTable(widget->getUserStrings()) } }; typeMap properties={ {"visible", new luaBool(widget->getVisible()) }, {"class", new luaString(widget->getTypeName()) }, {"enabled", new luaBool(widget->getEnabled()) } }; widgetBaseinfo["properties"]=new luaTable(properties); typeMap event={ {"event", new luaString(eventType) }, {"widget" ,new luaTable(widgetBaseinfo) }, {"value", value }, } luaTable *table=new luaTable(event); table->push(); delete table; The above is more or less the code I use now ( except I generate widgetBaseinfo, properties and event in different member functions ) if you like this way of working you can download the helper file here, and (ab)use it anyway you like http://decoder.dk/LE/lua_tablehelper.h ( aparently you cannot attach files in blog posts? ) Let me know what you think. I've been considering letting table::push automatically delete it self since I always seem to do that anyway - and it would save me some worries about memory leaks from forgetting to delete.
  10. It should be return (((T*)lua_touserdata( L, lua_upvalueindex(1) ))->*memberFunction)(L); I'd like to thank the forum for playing the part of rubber duck
  11. template <typename T,int (T::*memberFunction) (lua_State *L)> class luaMemberFunction: public luaType{ public: luaMemberFunction(T* _objectPtr):objectPtr(_objectPtr){} virtual void push() { lua_pushlightuserdata( Leadwerks::Interpreter::L, objectPtr ); lua_pushcclosure(Leadwerks::Interpreter::L,forwarder,1); } T* objectPtr; static int forwarder(lua_State *L){ //return ((T*)lua_touserdata( L, lua_upvalueindex(1) ))->*memberFunction(L); return ((T*)lua_touserdata( L, lua_upvalueindex(1) )).*memberFunction(L); } }; called else where as luaType temp= new luaMemberFunction<eventForwarder,&eventForwarder::testMemberFunction>(this); produces this error As you can properly tell from the comment above I've tried both - I feel like I'm missing something obvious but after two hours of starting at the code I'm still at a loss.
  12. The black viewports are most likely caused by all colors being saved as decimal values in the config file. Should you ever accidentally launch the editor form steam or the icon it will break the config and you will need to delete it and re-import all your projects again. (also for some reason it seems to break WSAD and scroll wheel in the main view port?)
  13. Use the prefab barrel it's already set up for physics
  14. A brief overview of programming So what is programming anyway? It's a way for you to impose your will on the computer. See computers are very, very stupid and completely docile so they will follow any instruction from anyone - this is also why your computer can get viruses/hacked/etc, it cannot tell the intent of the code or who instructed it to do something. ( You would do well to remember this once you start getting bugs in your code ). Lets take an example - on your shampoo bottle it most likely says "Lather, rinse, repeat" given those instructions a computer never finish washing it's hair. But enough dry theory stuff; Lua & programming in general http://luatut.com/ This is a great site because there is a functional lua environment built right into the page so you don't even have to worry about setting that up or having to alt-tab back and forth - just hit ESC and you can follow along the examples. This is the most efficient way of learning - basically "monkey see, monkey do", by actually typing out the examples you will get more involved and thus remember it more easily. Unfortunately while great it's also rather brief - so where do you go from here? Well fire up the Leadwerks editor and start looking at the scripts there - try to figure out what each does, and then change them to do something different. Maybe try to change that that 1 to a 2 and see if you can figure out what you change means before hitting run. I've already said it but let me re-iterate; getting into the code and just fooling about is the best way to learn, years of formal education sitting listening to a professor drone about the principles of programming only really succeeding in one aspect - giving me a common vocabulary to talk about programming with other programmers, the actual learning I did on my own ( and many years before going to university at that, so don't let your age stop you either ). One typical concern is "what if I mess up and it wont run?" - well Leadwerks got you covered there, simply create a "mucking about" project and once you messed it up completely delete it and create a new. Lua as it specificly relates to Leadwerks; http://www.leadwerks.com/werkspace/page/tutorials/_/script/ http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/ Leadwerks user Aggro has a series of short videos titled "Project saturn" in which he goes through the steps of making a game: I'm not really a fan of learning programing from watching videos because it's so inactive, but these are usually short enough that if you watch it and immediately start to try it out it should be fresh in memory. Even more resources Have you come across an online resource that you found helpful in learning? feel free to leave a comment with the information below.
  15. 1) The blender exporter is written for 2.70 - it may work for 2.69 but it also migth not I suggest using the blender ppa 2) you cant (on linux anyway) 3) see above 4) change the model of the fpsplayer and then dont hide it runtime Beware that running LM will preclude you from reporting bugs
  16. Try this http://www.technibble.com/repair-tool-of-the-week-video-memory-stress-test/ (or something similar ) It does sound like you have memory issues
  17. Oh and you need to completely quit steam before running the commands - incidentally this makes LE render the viewports black so you need to delete the settings files, exit steam and then run with different language settings.. :|
  18. you sure about that link Josh? I just got this; When clicking the url - I mean you'd think intel could afford a proper ssl certificate.
  19. Running the editor like this; LC_NUMERIC=en_US.UTF-8 steam steam://rungameid/251810 Seems to completely negate the problem - but when you launch from steam or the desktop icon the LC bit isn't there - and that's how most new users will launch it. Now should they happen to come from a civilized country where comma ( , ) is used as the decimal separator then using the editor is going to be frustrating to the point where I think they will just flat out quit. If you want to play along you can experience it your self by running; LC_NUMERIC=en_DK.UTF-8 steam steam://rungameid/251810 or even; LC_ALL=en_DK.UTF-8 steam steam://rungameid/251810 if it fails you may have to install aditional code pages. (The above commands use en_DK rather than da_DK because I don't like my OS speaking danish - feel free to change to your liking) a few examples of what goes wrong; 1) With eg. scale the 2nd input box is blank - you can enter something there but as soon as you select another entity and select the first again it's blank. The values seem to get saved but suffer from the same bug as the rest. 2) If I enter 1.5 into a field it immediately becomes 1.0 when the input looses focus, if I enter 1,5 it will change to 1.5 but reset to 1.0 once you do the entity dance from #1. 3) Some values ( seemingly at random, but always the same ones ) will be initialized as 1000000.0 - for instance the light range, changing it to something less will give either bug #1 og #2 4) Rotating, Scaling or Translating using the mouse on a single axis will enter random crazy values but seems to work in the scene. If you don't have the correct tab open this one is easy to miss unless your working spot lights since the light goes absolutely haywire. This may seem like a low priority thing since it has a work around, but like I said new users won't know to do this and will experience the editor as being hostile and most likely quit ( and tell their friends the software is a piece of garbage ). If you doubt that will be the reaction the feel free to observe what happens when people who never before used blender tries to ( even experience 3d modelers ) - the internet is full of those less than happy accounts I'd be happy to supply a test map, but it would just look like I drunkenly entered random numbers, run the editor with the above LC values instead.
  20. Isn't that what curve / curveangle is for? http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/math/mathcurveangle-r603
  21. if the 16 thing referes to 16 bits per channel then gimp is out untill version 2.10 comes out
  22. @CrazyM: "Help the lazer shooting pumpins kill the evil crawler" kind of deal?
  23. Going places - mostly backwards its seems keyhandling is completely fubar'ed and will likely need a rewrite. Automatic binding to lua functions ( onClick="Player:myFunction" or onClick="Player:output:myOutput" ) works perfect - but only for top level widgets... will properly have to do late/dynamic binding instead. Seems every time I tick one item off my todo list I add 5 new
  24. On linux at least this is a known bug with following work arounds; Dont open browsers from leadwerks Close the browser entirely before returning Make sure the browser is open and fully loaded before opening a browser from leadwerks ( this should auto transfer the request to the existing browser and end the synchronous command immediately )
×
×
  • Create New...