Jump to content

Aily

Members
  • Posts

    465
  • Joined

  • Last visited

Posts posted by Aily

  1. If i understand correct - you all talking about that i calling "messages system".

     

    Each active object on creation adds to "listeners list"

    They are all have one same method OnMessage(msg), string name and string class

     

    I have global function send(name,class,msg,delay)

    Message adds to "messages list"

     

    In main loop i run messages list

    decrace each of it delay value

    and if delay became to be zero

    compare name\class of message adres and "listener"

    if all cool, just call listener method OnMessage with current message object

    all done, message sent to all fits objects, removes it from messages list

     

    So i can sending messages with delay, and no need to warry abut - when entity will be broken by peaces, when fire sprites to be respawn, sound, etc...

     

    It's like Leadwerks messages system, but little updated to handle delay and possible to send many messages per iteration to one object.

     

    I have one try to gather Last Chapter with such "messages system", where i'm not acessing to objects directly, all stuff only by messages, and it works good and fast for Last Chapter gameplay.

     

    And in the end i'm get separate classes of all objects in world as usual, but they totaly movable from one project to another - without any warry for methods compatibility. If another project don't generate messages - this class will stay silent, if project trying to call unknown method of such messaging-class - just nothing happens, no any crashes.

     

    As for me it's best issue with my developements, and when i will return to making gamplay will be use this system.

     

    I hope you understand me wink.png

  2. Yes, Leadwerks don't have many finished games as some another engines.

    I agree with all guys here that saing Leadwerks2 is API for making your game engine.

     

    Me myself came here with zero knowlege of game making (Blitz3D only, and little 3DSMAX). Till this years Leadwerks primary teach me how things must be done, on it amzing shaders.pak i realy get how GLSL works, and what things must have any game engine. Thanks Josh.

     

    So this not stoped me before (working with lights tutorial is buy me smile.png ), i get it, and start lerning. And till this time it return all it cost to me in money (little not gaming projects), and much more in experience.

     

    I can't say that i'm good game programmer now. But thise days i'm working on my own OpenGL4.2 visualisation API for medical research, in C++ from scratch, and it's all Leadwerks fault, i can't say that make such results without Leadwerks.

     

    At last i can say - Leadwerks is very good engine for learning, and for thouse people ho like to make games, or something pretty render. Difenetley - it possible and fun to make good game with this, but me myself (and i think most part of us here) don't have enought patient for this and free time because of primary job.

    • Upvote 2
  3. How can it smile.png

     

    for (var t:Number = 0; t <1; t+=rez){
    
    

     

    I don't unerstanding you, think it can be ported to C like

     

     

    float rez=0.1f;
    for (float t=0.0f; t<1.0f; t+=rez)
    {
    }
    

     

    hmm, or not?

     

    main idea is to build spline class with control points going from start to end, and rez here is spline position from 0....1, 1- it's end. So if first path point is 0,0, and second - last 100,100, then rez=0.5 returns ~50,50. But if there will be more control points such code will return spline position smoothed.

     

    And this little function realy helps to get value betwen 4 spline points (if there will be less its easy to fill it like first,first,first,last for example :))

     

    Works with 3D too (checked)

  4. Cool! Any method that consistently gives valid paths is a valid method, the only concern then is the cost and it's ability to deal with realistic game geometry.

    Do you remember Diablo2? world is flat and maked by boxes, so Torchlight have same scene geometry. This little code can possible to make Diablo2 style game, if each wall represent to it AABBs.

  5. the only concern then is the cost and it's ability to deal with realistic game geometry.

    I was thinking about it, and will add another geometry types here (sphere,poly) and this can be used in little games, where just need to find path and send NPC by it.

     

    Now i think it can helps to make little strategy, or simple shooter with field and unwalkable areas on it (houses, trees, stones...)

  6. Working with pathfinding a little i found some sad things

     

    1. walking by waypoints as "by rails"

    2. navmesh code is hard to implement (recast\detour)

    3. all i saw last time is realy hard to use

     

    Target:

    1. game have big open field

    2. on this field many objects that charachters must drive over

    3. i need speed and simplify

    4. this must be easy attached to diferent projects

     

    At last my pathfinding is:

    each "unwalkable" area have aabb nav-body, that uses waypoints links as "can't walk here"

    each "unwalkable" area have waypoints in it corners, to find path around unwalkable areas

     

    base function give start (for example NPC) point as X,Y floats

    and end X,Y float point

    and returns path linked list where calculated path points runs each other from start path to end

     

    It's just first "zero" version of this idea, it works, but need some clean code, fixes and add more functionality (it's still 2D, but soon....).

     

    Try it guys smile.png Who can say that is not navmesh? biggrin.png

     

    BlitzMax source and EXE in archive.

     

    Hold F1 to see waypoints

     

    Next step is done it by bMax and port to Lua,C++ and ActionScript if i will have time and good mood for this.

    post-260-0-38554800-1350230803_thumb.jpg

    nav_grid_0001.rar

    • Upvote 2
  7. My customer very-very wants antialias, so...

     

    I found this old Josh's post about FSAA for BlitzMax and little reworked for BlitzMax 1.45

     

    All we know that BlitzMax creating OpenGL window without full screen anti aliasing, it's realy sad, and haven't any worked solution, just this Josh's post

    http://blitzbasic.co...c=64265#1022476

     

    (Thanks Josh, realy helpfull)

     

    I little reworked this, and now if you are creating window, you don't need to make first hidden window, next normal - it's simple like this for most usual games:

    Const GRAPHICS_MULTISAMPLE2X= $40
    Const GRAPHICS_MULTISAMPLE4X= $80
    Const GRAPHICS_MULTISAMPLE8X= $100
    Const GRAPHICS_MULTISAMPLE16X= $200
    GLGraphics 800,600,0,60,GRAPHICS_MULTISAMPLE4X
    

     

    all done, after this you enjoyed 4X FSAA in bMax smile.png

     

    Checked, and it works with

    1. Leadwerks (without deferred shading)

    2. Leadwerks in MaxGUI canvas (without deferred shading)

    3. minib3d (do not need to use acum buffer technique anymore)

    4. Standart BlitzMax OpenGL

     

    Examples and READY TO USE COMPILED(!!!!) modules in archive too. Just replace your modules with my, and be cool smile.png

    post-260-0-36001800-1342776360.jpg

    • Upvote 1
×
×
  • Create New...