Jump to content

Vulcan

Members
  • Posts

    92
  • Joined

  • Last visited

Posts posted by Vulcan

  1. During the summer I got more and more entangled game entity classes in my game project, and I really wish I had read this before I started on my journey. I recently stumbled on this article talking about why OOP is not really good for (larger) games to manage game entities, and that introduced me to a better approach. I have yet to test this out in Leadwerks as I am trying to learn more about this before taking a major overhaul. Anyway I hope this could help other people here that might struggle with this.

     

    Link to article: http://www.gamedev.net/page/resources/_/technical/game-programming/understanding-component-entity-systems-r3013

  2. Did I ever thought a good quality character would cost $1500+, obvious my price estimation was to naive. I presume it is an AAA character with all animation needed for a typical game. Some AAA characters could make a cool tech demo for Leadwerks, I thinking a mini game made with C++ to really show off the potential that Leadwerks engine has (just an idea). This could serve as a template for C++.

     

    You don't need the best 3D artist from industry, but a really talented guy.
    Yes while I agree it may not be wise for AAA.
  3. Some observations I have seen when other people play on their computer is that righties use WASD and lefties use arrows, so therefor one should implement both as standard for a game. Lefties often have the mouse on the left.

    Also noted that people that are using inverted mouse envision that the characters head (camera) has a stick w/handle back on the head and the mouse is like a hand on that stick (sorry not good at explaining this). And that people using non-inverted mouse are envisioning that the head is on a pole-stick and that the mouse is like the eye of that character. Again this illustrates why options and more options are good smile.png

  4. I used the Blender Exporter and exported a simple box with wood texture but in Leadwerks Editor it is without texture.

     

    This what I made in Blender:

    post-12025-0-13302600-1410454860_thumb.png

     

    And after exporting it to Leadwerks:

    post-12025-0-73263700-1410454869_thumb.png

     

    I can't figure out what I did wrong with this. How do I get the texture to show up?

  5. I am currently on a low-end wifi network somewhere and I wish that after restarting LE to download those workshop items that there could have been some indication of the download progress. A simple 0% to 100% text on the splash screen would be enough.

     

    I am looking at it and wonder if I should abort the download or not. Three minutes later it is complete! Yay!

  6. I would also enjoy learning how to use C++ and Lua together.

    Yes that would be great. How should one implement GameScripts like "if player has red-skeleton-key and BigBoss is defeated --> open up a new path for next level". Something like that perhaps.
  7. I am currently struggling with setting up a good (C++) GameObject structure so that it is fast and scalable. What I so far have is a GameObject that handles the game object, controller input, basic AI and animation but it is messy.

    All I have found so far are:

    1. Class Hooks
    2. How to Structure a Game
    3. Object-Oriented Game Design

    Looking through them I found out that I need to handle collision detection inside the game object (1.link) instead of a for(...) in game loop. And that I probably should use a static Enemy::UpdateEach() (2/3. link) instead of for(...) in game loop. I am not sure if this better in terms of performance but it is a new technique I haven't thought of.

    If someone could make a tutorial on this subject that would be nice.

    • Upvote 1
  8. Thank you! This solved my jitter problem. I did remove the parenting and changed my code to this if anyone are interested.

     

    entity->SetInput(angle, move);
    model->SetPosition(entity->GetPosition());
    if (b > 0.01f || b < -0.01f)
     model->SetRotation(entity->GetRotation());
    

     

    It might not be perfect but this seems to work.

  9. After some testing with UpdatePhysicsHook I still get this Z-rotating jittering when using SetInput(). I really don't know why but I am starting to wonder if it could be that it is only the model that are jittering but not the entity? Or should I just abandon the idea of using SetInput() ?

     

    Registering the hook:

    entity->AddHook(Entity::UpdatePhysicsHook, (void*)UpdatePhysicsHook);
    

     

    Updating physics:

    entity->SetInput(entity->GetRotation().y + 10.0f*window->KeyDown(Key::D1), 10.0f*window->KeyDown(Key::D2));
    

  10. I am playing around with a custom terrain once again. The terrain has a number of patches parented to it, depending on the terrain size these can be between a few dozen and several hundred. They are all directly parented to the terrain, no sub-hierarchy.

     

    I have added a hook

     

    void CameraPositionHook(Entity* entity) {
    MT::Terrain * terrain = static_cast<MT::Terrain*>(entity);
    Camera* camera = terrain->GetCamera();
    Vec3 position = camera->position;
    position.y = 0;
    if (camera) terrain->SetPosition(position);
    }
    

     

    which I add as an UpdateWorldHook to the terrain, and the SetPosition() call causes the observed rate drop.

    Are you trying to move the terrain? A terrain of 1024x1024 makes about 1 M vertices, that would really slow it down. If I am reading this correctly (I may be horrible wrong here).
  11. Why do you want have the entity follow the camera and not vice versa? But to answer you question about SetPosition(), I would say from my own experience that is not expensive to use. Heck I use it several places in my project. How many SetPosition() are we talking about each game loop?

×
×
  • Create New...