Jump to content

mdgunn

Members
  • Posts

    626
  • Joined

  • Last visited

Posts posted by mdgunn

  1. If I'm correct (I don't use the C++ version just now) the C++ files produced work best in Visual Studio. I think there is a '.sln' (SOLUTION) file produced which I think you can just open and will compile and run to a bare project straight away. You might get it working other compilers but it may be tricky.

     

    As I say...I'm personally not a C++ guy, I just saw no response yet and thought I'd tell you what I thought may be the case.

     

    Ah...I see you're on Linux. Sorry, guess it must produce something Linux friendly too. I wouldn't know much about that sorry.

  2. Interesting idea. Recent trends in editors have tended towards light-weight editors with plugins to add small extra features which are often simple or text based UI additions. Unfortunately the Leadwerks editor lacks some basic editor tools and doesn't allow plugins.

     

    For your scenario I would usually use what in most editors would be called a 'bookmark' at the location I want to return to (not a feature of the editor - but present in most other editors).

     

    The other way that is supported is to use Ctrl-G to move to a line number ( so Ctrl-G '0' ENTER will get you to script property area at the top, and CTRL-G '494' ENTER will get you back to your coding location. I think Ctrl-Home and Ctrl-End jump between the top and bottom of the page too.

     

    Rick also makes a good point that some good coding practices can help keep things from getting out of hand, such as splitting out functionality into separate files and breaking out lengthy code sections to functions. The main body of the sequential code is then likely to remain close to the property definitions with the function definitions out of the way at the bottom or in separate files. The 'flow code' becomes a series of simple logic statements and function calls and the function names give you something identifiable and memorable to jump to with Ctrl-F should you want to navigate around. It takes some discipline to work this way.

     

    I think a lightweight editor with plug-in support would have been a nice way forward to allow the community to drive forward what is perceived to be the necessary extensions, and also to learn and build upon those too. (See Sublime editor, Visual Studio Code, Brackets etc.),

    • Upvote 1
  3. Thanks, i will definitely keep that in mind when I feel confident enough and finish the tutorials to start my own.

     

     

     

    Is there any specifics on how things need to be done to work within leadwerks?

     

    I might as well ask now, but is there a way to allow(or a plugin) MP4 files to work within leadwerks?

     

    There are a few approaches that might work. Some people might like to know that they have assets that are going to work for them so they get this detailed work of sorting out engine working characters early. However if your new to game dev I would suggest working with assets from the workshop and just getting a game done and under your belt.

     

    A good way is to build your game from simple to complex. Personally I try to split everything down into tiny chunks and make sure I can do that thing in isolation on a bare bones map. Literally a cube for a floor with the generic FPS prefab dropped in it. Maybe I'm creating a teleporter or something. Once you have the thing working you can save it out as a prefab and bring that into your main level map. For level maps a possible approach is to 'block out' the level very roughly and quickly with CSG, apply materials and align them to faces then add in external FBX models (chairs, pipes etc) and creatures. It is also possible to export the CSG to a file which you can take into a 3D program then bring it back in as an object. Lighting is probalby best left till late in the map development. You may need to fine tune the amount of lights and the types to retain performance (only some lights should have dynamic shadows).

     

    Try to make your first games ones which will not run into performance issues so much anyway, e.g. an 'outdoors', maybe abstract game were there is maybe only 1 light or few. Keep mechanics simple. Better to do multiple short games than 1 big one. Each can tackle different aspects of a bigger project you may be working towards (e.g. something with an inventory, somthing with a better UI, something with more complex lighting etc.)

     

    Personally I try to keep any scripts or prefabs etc I create separate so I can easily copy just those folders around if I want to put them in a new project.

     

    As far as MP4 goes....you mean for videos? I can't remember if Leadwerks supports that and I couldn't find the list of supported files, but I think it does not (which may be why you're asking)? It will play video files, for cutscenes or whatever (I believe) but you may need to convert to a supported format.

     

    When using C++ things are a bit more open as you are essentially using Leadwerks as the core of your game and you can wrap whatever other libraries around it (e.g. extra file type support). So you're game might load the video and play it, then talk to Leadwerks to launch a map. If you're using LUA then you're more 'within the engine', sort of anyway and are more reliant on what it exposes to LUA. You can use LUA libraries to gain some functionality but I think they have to build on what is there (e.g. maybe some AI routines) rather than allowing support of file types not supported by the core.

     

    I'm not sure I explained many things well just now so if you've got further questions I'll try and make things a bit clearer.

     

    The forum has a handy chat feature (bottom right). So if I'm around you can get in touch that way if you want. Providing I'm actually at my machine and not just lurking :). I'm on UK time and am most likely on in the evenings.

  4. Yes, that was my goal with this engine to create a 3d side scroller. I tried working with other engines like Unity, Cry 3, and Unreal, but the level of complexity with those engines didn't exactly match my experience level. The major problem I'm running into is that I'm not a modeller and I don't really know how to rig properly in 3DS max, which seems to lack a straight forward guide for doing such things(atleast from what I've seen, still looking).

     

    You're situation is quite typical of many LW users so don't worry. Many people would use a 3rd party model for a character model and then may model some of their own simple assets, or get them from elsewhere. Get familiar with the Workshop and what is in there. Some things (e.g. post effects are almost essential in most projects).

     

    A character model could probably be updated later on without it totally breaking your game as long as the models have similar animations (the names don't need to be the same or anything - you can remap animations at any time). So don't let the lack of a perfect model stop you prototyping out your idea. At the end of the day it will largely stand or fall on the gameplay over the model quality.

     

    Arteria 3D are often used for LW models and I've heard Unity models work quite well so buying or using Unity assets is a possibility. Try some free ones first if possible. In general if you can get an animated model in FBX format you should be able to use it.

     

    You could try looking through the gallery for people who seem to be highlighting models (in which case they may be showing a model they've made and you may be looking at someone who has some model specialisation - there are a few people).

     

    Good luck.

  5. Only difference with Professional (I believe) is that you can use C++ yes, which it sounds like you don't need. Sounds like you are doing 2D side scroller with 3D models? There have been a few of these.

     

    Think Angelwolf (http://www.leadwerks.com/werkspace/user/15469-angelwolf/) did one recently for the game jam so if you're stuck you might want to check with Angelwolf for recent experiences, or just post a general request for help.

  6. Does that mean that if you're using orthographic then everything is 'fullbright' if you know what I mean (maybe controlled by ambient level or something). Do you have to just make your graphics have the right look in your art program so 'lit' by drawing them with shadows, highlights etc. and then they'll look the same in Leadwerks?

  7. I'd say the official tutorial *IS* worth going through in that it covers a good portion of what Leadwerks does but you will need a bit more....see below.

     

    An often recommended set of video tutorial series is this one.

    This is beginner level but covers many things.

    He also has some C++ tutorials if you have that version.

     

    I recently watched another set by Rick (often in the forums) here which shows real time development of a game from an experienced Leadwerks user. The game is just for a game jam but the end result is well on the way to being a decent game.

    https://www.youtube.com/watch?v=OHPP67rJ1Ok

     

    These pinned items in the Game Art forum are worth a read (http://www.leadwerks.com/werkspace/forum/57-game-art/).

    Mapping Standards: http://www.leadwerks.com/werkspace/topic/10016-mapping-standards/

    Content Creation Guidelines: http://www.leadwerks.com/werkspace/topic/14017-content-creation-guidelines/

    Blender Exporter (though FBX works well too): http://www.leadwerks.com/werkspace/topic/10246-official-leadwerks-exporter-for-blender/

    Blender & Leadwerks: http://www.leadwerks.com/werkspace/topic/14215-blender-leadwerks/

     

    In general Leadwerks tries to do be a game engine/tool that a single person could concievably master the whole of and produce a reasonable game that will work across desktop platforms (not mobile). It supports open standards rather than trying to do everything well internally. It doesn't try to model and animate but instead supports importing boned and animated assets which you can then tweak a bit. E.g. re-apply materials, remap animations etc.. It does have CSG brush based capabilties which can help to mock up levels and the idea of prefabs (a container of sorts for CSG/object models etc). You can also export CSG, take into modeller, modify, export, bring back in more complex geometry. LUA scripts attatched to CSG or models can then be very easily setup with parameters so you can tweak them in a UI and connect them together with a flow graph editor. Or you can write almost everything in code if you want and have code talk to code. If you have the C++ edition then you can write (faster?) object-oreinted code and hook into libraries that may only exist in C++.

     

    In general I think the software does not have any major 'limits' in terms of texture size or model faces but I don't know for sure. It isn't something I've had a problem with. AI you may need to code yourself, depending on what you want to do, though there is some supplied AI which can navigate using navmeshes which the engine builds. If you are hoping to buy lots of complex assets to do the heavy lifting for you and make you rich then Leadwerks probably isn't going to get you that. if you are hoping to be able to piece together a simple to moderately complex game working through simple issues by youself and assistance of the community and freely availble (generally simple) assets and have fun doing so, then Leadwerks is more like that. IMHO of course.

     

    I'd be interested to know what you thought needed to be better in the tutorials as I'm vaguely thinking of writing a few (.....erm maybe).

    • Upvote 1
  8. Not seen this but suggest some very obvious troubleshooting ideas that you may well have tried.

    1. Make sure the build output works on your machine, not just running the build from within Leadwerks.
    2. Try building the default FPS template project (because I think that has a torch in it too right) and run the OUTPUT of that on yours and the other machines.

     

    My only thoughts so far are that maybe something is not going into the build to define the torch light, or that the other machines are using build in GPU perhaps?

     

    More info is probably required. You could put a link to a build you've uploaded somewhere and others (with machines that presumably run Leadwerk builds OK) can download and see if the torch light shows.

     

    Not much info to suggest much else, given my knowledge anyway.

  9. http://steamcommunity.com/sharedfiles/filedetails/?id=630028747

     

    Ended up scrapping my previous game idea a couple of days ago, just before leaving for the weekend so as per usual ended up throwing something together which ends up as more of a demo than a decent game. Ended up pairing almost everything back in an effort to get something that does ...something. Not too much fun in its current state, but possibly the basis for something better.

    • Upvote 1
  10. In general I think thickness of walls floors does not matter TOO much. Having said that I think I have heard it said that if they are thin then there may be a form of light leakage or something. Suggest you work to multiples of 32. You might go down to 16 or 8 if you have some specific need but for boundary walls/floors etc probably 32.

     

    There is an example room map somewhere that I think supplies textures you can use based on multiples of 32. It is a good exercise to examine it and extend or duplicate it.

     

    I will see if I can find it....

     

    Check out these

     

    http://www.leadwerks.com/werkspace/topic/10016-mapping-standards/

    http://www.leadwerks.com/werkspace/page/contentguidelines

     

    Also consider using prefabs...e.g. for stairs...or almost anything really....these are like an isolated map with only the item in. You can use them across projects then too. They will probably help you keep control of things when you get lots of CSG brushes and find sticking them all in lots of folders gets out of hand.

  11. Might be worth you having a look at the camera dolly script. You might even want to achieve your effect by switching to a cam to highlight the action (though it sounds like you probalby want to remain with the character....

     

    ....anyway the important thing is that the camera dolly script can move a camera along a spline through way points where an event can be fired (using a flowgraph connection), potentially revealing your decal. Though you might not want a camera, perhaps the script can be modified without too much trouble to move your own 'revealing object' along a spline and triggering the reveals of the footsteps as it hits each waypoint....you could even have a spline for left footprints and one for right footprints, if it works out easier.

     

    The Camera Dolly script is in the workshop that you can get to from within Leadwerks.

     

    Just a thought.

    • Upvote 1
  12. The script almost works (and Aggrors almost worked apart from easy minor typo of enable rather than enabled).

     

    The logic is messed up in the toggle block. Try this

     

    function Script:Toggle()--in
    if self.enabled == false then
      self.enabled = true
      self.lastSpawnTime = 0
      self.counter = 0
    else
      self.enabled = false
    end
    end
    
    

     

    Make sure the toggle is hooked up to a block with an use script on it and connected to the spawner in the flow graph, but it sounds like you've got that figured.

     

    The debugger is super handy for putting in a breakpoint (click to the RIGHT of the numbers) and examining your code at a specific point (e.g. a logic branch).

     

    Also System:Print is a simple if archaic friend too!

     

    Hope it works out.

     

    Michael

  13. Fantastic, it worked!

     

    I was pretty sure I'd tried randomly swapping round my value into the different parameters already, but you're right switching the value to the last parameter (z?) stopped the weird behaviour.

     

    This was pretty fundamental to my game so I can actually go ahead now.

     

    Many thanks.

     

    Now if only I can find enough time to get it finished/started for the tournament.

     

    Thanks very much!

     

    Cheers,

     

    Michael

  14. I would like to shoot a projectile towards a point in space (in a 2D game). I have something almost working but I can't get my head round how to fix it.

     

    I would like to solve the following:

    1) How to shoot in a certain direction not just where the mouse is (I could only get it working right with this mouse pointer method but in reality I just want to shoot something in a direction (and maybe not use mouse).

     

    2) The projectiles shoot out sort of 90 degrees to where the mouse pointer is but I want them to shoot at where mouse pointer is. I seem to get automatically very confused when thinking about angles.

     

    3) At certain positions (90 degrees?) the projectiles sort of flip to the other side when I really just want it to track smoothly all the way round.

     

    Here is the code. Can anyone help? Maybe there is just a better way to do it?

     

    function App:Start()
     --Create a window
     self.window = Window:Create()
     self.context = Context:Create(self.window)
     self.world = World:Create()
     local camera = Camera:Create()
     camera:SetRotation(35,0,0)
     camera:Move(0,0,-6)
     local light = DirectionalLight:Create()
     light:SetRotation(35,35,0)	
     --Create a model
     self.model = Model:Box()
     return true
    end
    function App:Loop()
    
     if self.window:Closed() or self.window:KeyHit(Key.Escape) then return false end
     --Get the vector between the mouse position and the center of the screen
     local v = self.window:GetMousePosition()
     local dx = v.x - self.context:GetWidth()/2.0
     local dy = self.context:GetHeight()/2.0 - v.y
     v = Vec3(dx,dy,0):Normalize()
     --Align the model to the vector
     self.model:AlignToVector(v,2)
    -- Create projectile
     bullet = Model:Sphere()
    bullet:SetPosition(5,0,0)
    bullet:SetMass(1.0)
    -- Align to mouse pointer vector
    bullet:AlignToVector(v, 2)
    -- Add velocity
    bullet:SetVelocity(Vec3(0,10,0), false )
     Time:Update()
     self.world:Update()
     self.world:Render()
     self.context:Sync()
     return true
    end
    

     

    Thanks,

     

    Michael

  15. Move rotate and scale are already on 1/2/3, at least on windows. W and E are already used in moving the camera in the viewport and it seems fairly sensibe having W/A/S/D/Q/E.

     

    Did you mean something else because 1/2/3 seem not too bad?

     

    Me I'd like to see pick object/pick face keys because AFAIK these aren't assigned shortcuts and at times I've found myself switching these lots to access the material adjustment panel.

    • Upvote 1
  16. I've found this a bit of a pain at times too.

     

    I am struggling to think of a single time that I've needed the default behaviour (selective memory?), though I suppose I wouldn't want to lose it but instead toggle buton or modifier key.

  17. Dunno if you sorted this since but if you mean you can not find the generic human/manakin model then it may be because you are creating projects based on a template that does not contain it. E.g. Empty Template.

     

    Try using FPS Template maybe.

     

    You don't really need the generic manakin model (or whatever you want to call it - the one with it's arms stretched out). All you need is the FPS controller script, but then you usually need to move some sounds and images into the right place if you have a bare project.

     

    If you still have trouble get back to us with some further description if you can.

  18. Hi,

     

    I believe that if you change a variable named 'changemapname' then the main game loop that is running through Main.lua will pick up on the change in this 'secret' global variable and change the map for you.

     

    -- FROM standard MAIN.LUA template
    --Handle map change
    if changemapname~=nil then
    
    --Clear all entities
    world:Clear()
    
    --Load the next map
    Time:Pause()
    if Map:Load("Maps/"..changemapname..".map")==false then return end
    Time:Resume()
    
    changemapname = nil
    end
    

     

    You don't need .map on the end or other path info, just make sure the map you want to load is in Maps directory because as you can see in the code above this is where it will look.

     

    It's not the only way to do it but as it's sort of a built in global variable that is used in the standard Main.lua template it is one of the intended ways to do it. There is also a TriggerChangeMap.lua script.

×
×
  • Create New...