Jump to content

Guppy

Members
  • Posts

    775
  • Joined

  • Last visited

Posts posted by Guppy

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

    • Upvote 1
  2. Although I just wrote my own, I do believe it would be good for Leadwerks to come with a directory iterator for viewing the contents of a directory.

     

    Agree 100% - especially as I can see no way to iterate over leadwerks virtual file system.

    • Upvote 1
  3. 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

     

    ../../Source/util/lua_tablehelper.h|91|error: must use ‘.*’ or ‘->*’ to call pointer-to-member function in ‘&MyGUI::eventForwarder::testMemberFunction (...)’, e.g. ‘(... ->* &MyGUI::eventForwarder::testMemberFunction) (...)’|

     

    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.

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

  5.  

    you sure about that link Josh?

     

    I just got this;

     

    You attempted to reach communities.intel.com, but the server presented an invalid certificate. The authority who created the certificate is not allowed to speak on behalf of some websites. One of those websites is mentioned in the certificate, even though it shouldn't be.

    When clicking the url blink.png - I mean you'd think intel could afford a proper ssl certificate.

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

  7. TcJGtNs.png

     

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

    • Upvote 2
  8. Ive noticed when I open a browser with Leadwerks open and then return to leadwerks is when it crashes for me usually.

     

    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 )

  9. There was something like this a couple of weeks back on this forum.

    It's basically just on Linux because of the open source drivers not supporting OGL 4.0 on cards that do actually do support it.

    Leadwerks still needs 4.0, so as soon as you use a feature that needs a 4.0 extension, you will probably see issues.

     

    Other than the scifi pack props having disappeared ( this machine doesn't have steam so I suspect that is why ) there the scene renders identicaly.

     

    Any idea as to what I can try to add that would require opengl 4? It's easier to test if it runs off the intel HD gfx if it crashes from using the none opengl 4 one ;)

  10. $ glxinfo | grep version
    server glx version string: 1.4
    client glx version string: 1.4
    GLX version: 1.4
    OpenGL core profile version string: 3.3.0 NVIDIA 319.32
    OpenGL core profile shading language version string: 3.30 NVIDIA via Cg compiler
    OpenGL version string: 3.3.0 NVIDIA 319.32
    OpenGL shading language version string: 3.30 NVIDIA via Cg compiler
    

     

    Doesn't that mean it's OpenGL 3.3 ? ( I dont know what card it is - some cheapo that got installed into my work comp because the monitors didn't support displayport )

     

    I figured it migth be using the cpu's buildt in gfx card:

     

    $ cat /proc/cpuinfo | grep "model name"
    model name : Intel(R) Core(TM) i5-4430S CPU @ 2.70GHz
    model name : Intel(R) Core(TM) i5-4430S CPU @ 2.70GHz
    model name : Intel(R) Core(TM) i5-4430S CPU @ 2.70GHz
    model name : Intel(R) Core(TM) i5-4430S CPU @ 2.70GHz
    

     

    But as I understood it this doesn't work on linux yet, also I've done noting to try to make it use this driver - the desktop runs proprietary nvidia drivers.

     

     

    Reason I ask is I've been trying to find a way to reliable determine if the gfx card can support my game - and if not offer suggestions on how to use the card that comes with their cpu.

     

    How ever my efforts stopped dead in it's tracks when my test machine decided just to run the game instead.

  11. class animal{
    virtual void makenoise() { std::cout << "??" << std::endl; }
    }
    
    class dog: public animal{
    void makenoise() { std::cout << "wof!" << std::endl; }
    }
    
    
    std::vector<animal> animals;
    

     

     

     

     

     

    now if you iter over your animals vector dogs says woof, with out the virtual keyword they would say ?? even though they define their own makenoise() command - you would have to downcast them to dogs ( and know to do this ) to make them say woof.

     

     

    adding

     

    class bigDog: public dog{
    void makenoise() { std::cout << "big wof!" << std::endl; }
    }
    

     

     

    to the above example big doges will go "big wof!" even though dog is missing the virtual keyword - this is because virtual functions will always stay virtual. For this reason it's concidered poilite to type it out anyway when you overload a virtual function, even if you dont need to. It just avoids confusion

×
×
  • Create New...