Jump to content

mdgunn

Members
  • Posts

    626
  • Joined

  • Last visited

Posts posted by mdgunn

  1. If you tried this on a mechanical disk and also a SSD would the results vary a lot do you think? I think the SSD may load before 100% complete or the mechanical may say 100% for some time I think. I suppose you could first do a quick estimate of I/O speed by reading a small test file in and then adjusting the timer accordingly to better guess when 100% might hit.

    Maybe with a larger map you might want something more like a spinner where you are not saying how much is loaded but rather that loading is taking place?

    Neat example.  Never tried co-routines but they seem like a nice easy way to get a simple loading screen going.  Thanks!

     

  2. Try removing the existing Leadwerks.cfg file (take a backup first if you want).

    <USER_FOLDER>\Documents\Leadwerks

    You'll lose your history of projects but there is quite a good chance this will sort it out.

    To get back your old projects you can import them again. You don't need to do a blank project and put stuff back in, the import button will read in your existing project file.

     

  3. Yeah, I can get the actor class working fine. The issue for me isn't that that they don't work. The issue is that the tutorial explicitly says there should be an implementation of the Actor class MyActor (extended from Actor) but there isn't one.

    This isn't a code problem bug report but a web site tutorial bug report.  The text on the website should be corrected so it is accurate.

    Either it should not say a MyActor class is created or the starter source should contain it.  If it is changed to not mention the MyActor class then I think we sorely need a nice non-trivial example of a C++ project to go with an extended tutorial. Preferably one that retains most of what people get in Lua. E.g. working menus, illustration of how to manage some simple entities and pass data back and forth from lua to c++.

    Yeah there is some forum data on this but I think it would be preferable to have a decent official example where a number of points can be brought together into a single place of maintained sample code (rather than potentially eventually non-working or misleading forum post from 2014 or something). 

    Anyway the original point was that there is an error in the web site tutorial but I feel there is more to this issue than that.

    • Upvote 2
  4. Yes, the C++ starter code in the PROJECTS folder created when you create any new project.  Think they are always the same regardless of the template you choose, though I suppose I could be wrong. 

    That the tutorial text doesn't match what the Project folder seems to give you is a poor start for anyone not experienced and venturing down the C++ route.

    A few examples beyond just the starter template would be useful, so as I say maybe the correct solution is a few simple examples and maybe the starter content could mostly stay the same.

    I found a single sizeable example here in case anyone finds it useful.  

    https://github.com/ArchaicMage/Leadwerks-Template/

    I've not tried it yet so it may need updating to work properly but the principles it uses still probably apply and worth a look at.

     

  5. Quote

    By default, a new game will include a sample actor class you can modify called "MyActor". The code for this can be found in the "MyActor.h" and MyActor.cpp" files in the "Source" folder in your game directory.

    C++ tutorial says the above but in my new projects I don't see this.  As a tutorial I feel it is important that information presented as a tutorial is correct, otherwise it is a bad experience for a new user.

    Although some may argue people doing C++ should know there...stuff, I don't agree.   If you're interested in learning C++ LeadWerks is quite a good place to start (and puts itself forward for educational use).   It's a missed opportunity if there isn't a good sample or reliable and detailed information on how to get a NON-TRIVIAL example going (i..e loading up a map and getting entities out, passing data in etc.).  

    I wish the sample project DID go a bit further with it's example as the way it loads up the Lua Interpreter but doesn't pass in any worlds, context, or get any out (if that is even possible - they are created in the Lua example it loads).  What the natural next steps would be are unclear given this starting approach. Well, at least to me  I can see I could rip stuff out and do it a different way (which I did) but the Lua Interpreter loading seems to suggest an intriguing alternative way.

    Maybe the sample project should stay as it is with perhaps a few more comments as to what next steps should be, but there should probably also be a more thorough EASILY FOUND sample(s) to show you.  Examples beyond the useful, but sometimes simplified out of realistic context, help system examples, is an area that LeadWerks is still a bit weak in. 

     

  6. Seems some simple/small improvements to model import, specifically with regards to sensibly remembering settings for a batch, or previously applied before re-import.

    Re-importing a model or import similar ones in a batch it can quickly become annoying.

    Model import should remember settings applied after import (e.g. resize, normal settings) so that if you do reimport you have option to reapply previous settings. If you are iterating the creation of your own models it feels like LW is mocking you everytime you take the 'crazy' step to re-import your improved own model.

    If you import many models at once the chances are you want the same settings applied (resize/normals) so why not have tickbox or something to apply previous settings or something.

     

    • Upvote 4
  7. 17 hours ago, karmacomposer said:

    (and i'd love floating particles in the air as well - how would I do this in Leadwerks?

    Mike

    Should be pretty simple with with LWs particles.   Sometimes with particles you need to combine a number of emitters to get what you want in a smart way (i.e. without harming performance, or with a particular look)Try attaching the emitter as a child of your character controller and maybe see if a second emitter also attached deals with more distant particles or a variation so it's doesn't look like the particles are just around your character.

     

  8. In release mode I think it is F11 will get you fps but not some of other info, but you can change this a bit if you want some other stats coming out. The bit of code should be in main.lua. You can also set up your own global level debug flag and bind a key to turn it on and of in game to write out messages around your suspected trouble point. Primitive but eternally useful.

    Debugging a large level can be a problem but that should be a last resort. Aim to MAKE problems actually HAPPEN early in a simplified test environment (which can still have complex interactions) during mechanics development, and use it to reproduce suspected problem scenarios if found later in large level.   The simplified level should run just fine in debug mode.  

    I sometimes  develop on a laptop with integrated graphics and I would suggest that Leadwerks is actually more practical to use in such a setup than most other engines.  Small test levels launch quite quickly and the uncluttered editors are practical to use on small screens.

    At some point you probably need to retreat to a desktop to do full level development but you can do a lot of groundwork on a light system.   If your game isn't fun when its in a simple level it may indicate that adding loads of stuff in isn't going to make it any more fun.

    I don't need to worry about that though.  My games are never fun!

    .....sigh. 

     

  9. I have a triple monitor setup.  I often have one in portrait mode.  When it is LW won't launch a game. Window appears then closes.  This is similar to previous issue with multi-monitor which was fixed, but it seems not if one monitor is portrait.  

    If I put the monitor back in landscape then game launches (so there is a workaround for now).

    It seemed to affect non-beta and beta (if that is any different at this time).

     

  10. I pondered the problem of last months challenge a while ago and came up with a few ideas, some of which I though would be quite tricky for me to get. Ultimately I faked it (in my opinion) with a model that had an invisible bone foot ( and animated to bob up and down a bit).  So I made the flying enemy a ground enemy really so I could use the navmesh for pathfinding.

    Shame there were no entries as I was interested to get some info on a better approach.  :(

    Maybe for next time an easy one that has multiple possible solutions might help?

     

     

    • Upvote 1
  11. I think EmitSound *IS* probably what you want.  I think Play is usually too simplistic for most cases.   

    that it's playing slow and stopping makes it sound like the parameters are not aligned and it is maybe taking the 0.002 as pitch and the 1 as false. Could be an area things are out of sync slightly between beta and docs.

    Maybe try setting the 0.002 to be 1 assuming it's pitch and the 1 to be false or 0 and seeing if it stops the looping?

    Also make sure you're not accidentally triggering it again (I've had that and it can sometimes make the sound seem strange - maybe like it is not the right rate). 

    Simplify with a simple code based world (using a renamed main file) that response to a key press and literally just plays a previously loaded sound on a sound source. Rule everything out, otherwise it can get pretty confusing introducing new commands in a complex world. At least it helps my brain :)

     

     

     

     

     

     

  12. You'll probably find it useful to have a project set up (even if a different project to the one you are mainly working on) with the FPS sample as it's base template. 

    It is usually very up to date with current changes so if something not working maybe search that whole project with a text editor and there's a good chance it'll find your command in use in the current method with a good working example.  

    Not saying it'll solve everything but might save a few minutes. 

    The API docs have had recent work to so should be quite current and almost always have an example that gets you going.

    For some things it is even worth having a second main script that you switch between that sets up a very simple code based world as some examples take it from this point and you can usually just cut and paste the chunk in and see the example working straight away in simplified world.

     

     

    • Upvote 1
  13. There have been recent changes in playing animation which if you're following an older example may cause confusion.  

    I think the entity (not script) now has methods for PlayAnimation whereas before it was sort of inherited by the script iteself by an include.

    Try

    --Play an animation
    self.entity:PlayAnimation("screaming",0.05,500,1)

    https://www.leadwerks.com/docs?page=API-Reference_Object_Entity_PlayAnimation

     

    self in a script refers to the script.  A script attached to an object can access the object as self.entity.

    I think that's correct anyway.

    (Actually I thought the old methods were still available, but it might depend on if the script you're doing this in is not including the old stuff anymore).

     

     

    • Upvote 1
  14. I downloaded the recently added workshop fog but it doesn't seem to be responding for me to changing the color or distance, which I believe are the lines below.  I'm tying to set the fog to be bluer below but I see no change. Also the distance didn't seem to be having an effect.

    //Fog color.  Use alpha for transparency
    uniform vec4 fogcolor = vec4(0.5,0.5,1.0,0.75);

    //Start and end fog range
    uniform vec2 fogrange = vec2(0,50);

    Ultimately the fog will be superceded by official packaged shader but I don't see that in my 4.4 beta and if based of this then it may need a check for similar issues.

     

  15. Unsure if tesselation fits your need. I think you probably can displace a mesh according to what you want to do but if it was me I'd probably do it in a more scripted and limited fashion so it only looks like the effect of what you are going for.  I would have only limited locations where an animated fbx model was placed in location in the wall and textured and animated as if it was coming out of the wall. If only for effect then a simple approach may work. If a key mechanism of the game that may need to work all over the place then maybe not.


    Decals work well for things projected onto walls.  Unsure if they can be animated but probably. Just thinking/typing out loud and this probably won't work but if you can hook up a camera to render to a texture you might be able to somehow record a 3d entity moving and project a processed version (e.g. alpha where 3d model not colouring image) on to an animated decal.   Never tried anything like that but most of the bits are there (render camera to texture etc.), but unsure if it all joins up.

    Personally I'd probably try and fake it first with animated custom fbx models/decals done in 3D package .

     

×
×
  • Create New...