Jump to content

tjheldna

Members
  • Posts

    938
  • Joined

  • Last visited

Blog Comments posted by tjheldna

  1. No effect on the game, more the development of it. It was just easy to drag the entity that I wanted into the box. I took a quick look at the new method tonight, still not convinced its better.

     

    I've never been happy having to use the 'name' field to do lookups in code. I'd much rather having a unique value taken care of in the editor like an auto increment field in a database table assigned to each model and use that instead whether it be a new ID value or forcing the name to be unique in the editor don't care. I don't know about any difficulties your end of the implementation of something like that, I'm just giving my thoughts on it and at the end of the day it's up to you.

     

     

    An alternate method for drag n drop would possibly be the other way around....

    • A non editable text box a button next to it with a crosshair icon on it or something similar to before.
    • Click on the crosshair button your cursor changes to the icon and you can then click on to select an entity in the perspective view port or in the scene graph to select your entity and your target field is populated.

     

    Also not sure if it's your end or mine, but after I compile I'm getting a 'Map file version 35 not supported' error. VS Project has been cleaned recompiled and updated in LE. Seems I run into that one regularly when I update the project. (when I load the game in code, it loads in the editor)

  2. I'm thinking in the space of my Mages game.

     

    I mainly use the target field so I can access the entity in C++.

     

    So I can have any number up to 10 targets as a max number I think it is.

     

    For example a door script assigned to the door mesh:

     

    slot 1 = pivot :closet orientation

    slot 2 = pivot :open orientation

    slot 3 = pivot: hinge orientation

    slot 4 = camera orientation when casting the spell on the door

     

    My C++ door wrapper then keeps a reference to those targeted entities using it's "name" field so I too need to keep the names unique.

     

    For this I just grab the entity I want and chuck it in the target field, very easy. As a 100% C++ user, this is the only way I know how to access an entity from the editor so I heavily use it.

     

    You know what, that old method of linking entities was a real good feature in 2.5.

  3. I'm trying to look at this with an open mind but this is what I keep getting back to these points..

     

     

    - The user can change referenced name at anytime.

    - The user can make a spelling error.

    - The editor will add meshes with a duplicate name by default

    - Random things happen if there are duplicates and cause frustration.

     

    Honesty, intuitive is not the word I would use. I also really like Einlanders suggestion.

     

    I'm just going by what I've read, I'm not too keen on updating my projects if I can help it just yet.

  4. Hi MaybeMe,

     

    Thanks for you comments! Love it!

     

    We put together a list of requirements we need for a playable prototype for the game. We actually finished this list about a week ago. Looking at what we have accomplished, we came to the conclusion that we need a little more artwork and a few more features before we can let you all have a shot.

     

    So, yes we will do a playable prototype to get your valuable feedback and from that we will work out first of all if we have a project that's worth moving forward and if we do, are there any changes? We are really looking forward to this and will keep you updated when we get close.

     

    Thanks Again

  5. It's fine YouGroove, other peoples opinion is very useful.

     

    -Are houses just abandoned or wrecked ? because interior are very clean , no dirt, no damage.

     

    I definitely will give all the textures another pass. I'm going for quantity not quality atm. There is also a lot of detail about the game we have not given away yet too, and I don't want the houses looking in too much ruin as they were abandoned not destroyed.

     

    - Road texture is too bumpy, not enough flatten normal map to look more road (you could add variation and damage later with incoming LE3 decals).

     

    The road texture is painted on via a terrain texture. It's something that will more than likely change when I look into my options.

     

    - Why there is not White lines on the road (perhaps grunge or damage white lines)

     

    It's only a side street, no lines needed for this road.

     

    - Street corner are very angular

     

    What I plan to do with the side walk is to create it all in LE and export it out. That way I can redo it in Modo and have the correct scale I need.

     

    - Bushes on floor looks up scaled with non detailed texture and look very low poly , more polygons ?

     

    I'd probably have to disagree on that one I don't want to go too high for anything other than characters and weapons.

     

    Thanks for the feedback all!

  6. Hi Josh,

     

    Yeah I am using the Curve() function for the camera position, but some of those jitters are too big to smooth out (without making my camera too laggy).

     

    I have noticed with vsync on the problem reduces.

     

    On the weekend I'll try to put a sample project together to help. I'm still trying to play around with it to see if I can find a cause on my end.

     

    Cheers!

  7. Some example to have smoothed character controller movement :

    http://www.leadwerks.com/werkspace/page/tutorials/_/artwork/third-person-template-r114

     

    Um Thanks, that is a valuable resource, but I know my code is quite solid not to mention is C++. The only thing that has changed here is an update of my projects.

     

    Here is a video of two projects with the issue occurring. The first is obviously my Mage's project the second is a project of an undisclosed nature that I tinker with from time to time......

     

    https://www.youtube.com/watch?v=J4UnnAumD2Q&feature=youtu.be

     

    It's funny when fraps was running the jittering slowed down a bit, but I think I captured enough in the video.

     

    I took a look at the demo projects and they are smooth with the character controller, but forgive me if my eyes are playing tricks on me, but I believe the terrain example is a little choppy when looking at the ground and going downhill.

  8. My FPS has gone through the roof... 30fps to 120fps on my laptop.

     

    I have and issue since this build though. The character controller is jittery as hell no matter what slope it is on now. Using C++ project cleaned and rebuilt in release. I haven't done any changes between updating to the latest beta.

     

    When I get home I'm going to test some more to see what I can come up with and if needed do a report about it.

  9. Sounds cool, even though it will be built into Leadwerks I think I'll back it anyways for support. What I would make this product more useful to me is being able to export to collada or the openGEX format for use with the C4 Engine. I rarely tinker with C4 these days so it's no real big deal plus there might not be a large enough target audience for you adding this support, but I just thought I'd mention.

  10. Glad this all happened and will make a substantial difference to models and animations. it was quite a process re importing an animated model every time you make a change. Having a file which remembers all the values is great.

     

    Also noticed there is now a play/stop button added below now too.

     

    Can I make one suggestion... If you re import/overwrite a model with animations it would be real neat if the animation and material values are transferred to the new version without having to import the animation file and assign the textures again. Maybe give the user the option if they want to do this in a messagebox? May or may not work, but just a thought.

     

    Love these new improvements nice work.

  11. Hope you find something Aggror, you have made a big difference in this community showing many skills, so hopefully that can work in your favor. It is the dream to get into the industry for most of us I recon.

     

    I did web development for a few years and I enjoyed it.

     

    Good luck!

    • Upvote 1
  12. Hi Einlander,

     

    This is working in C++ for my trigger class and gives me an onenter and onexit. The trigger saves every collided item to a list.

     

    If the item isn't in the list it is onEnter then it is added to the list.

     

    In the Physics update checks a value has been set on all objects in the list every loop, if it's not there it's onExit.

     

    There is a lot of **** in my code which is not necessary as I did a straight copy paste, but hope it may give you an idea.

     

    Cheers!

     

     

    Trigger.h

     

    struct CollisionItem
    {
    std::string   address = "";
    bool    hasCollision = false;
    };
    class Trigger : public GameObject
    {
    public:
    
      std::list<CollisionItem*>   collisionList;
      Trigger(long type);
      ~Trigger();
      void EnterWorld(void);
      void Update(void);
      std::list<Trigger*>::iterator it;
      static std::list<Trigger*> List;
    
      static void UpdateEach(void);
      void AddCollision(std::string address);
      void RemoveCollision(std::string address);
      void Activate(BaseObject *trigger, BaseObject *activator);
      void Save(pugi::xml_node *xmlNode);
    
      void Load(pugi::xml_node *xmlNode);
    };
    

     

     

     

    Trigger.cpp

     

    std::list<Trigger*> Trigger::List;
    void TriggerCollision(Entity *entity0, Entity *entity1, float *position, float *normal, float *speed)
    {
    GameObject* object = (GameObject*)entity0->GetUserData();
    if(object->GetBaseType() == kObjectTrigger)
    {
     Trigger *trigger = static_cast<Trigger*>(object);
     if((trigger) && !trigger->IsDisabled())
     {
      //Find what the hit target is
      GameObject* hitObject = (GameObject*)entity1->GetUserData();
      bool found = false;
      //Check if item exists
      std::list<CollisionItem*>::iterator it;
      for (it = trigger->collisionList.begin(); it != trigger->collisionList.end(); it++)
      {
       CollisionItem *object = (CollisionItem*)(*it);
       if(object->address.compare(hitObject->GetAddress()) == 0)
       {
     object->hasCollision = true;
     found = true;
       }
      }
      //We havent found the hit object so call Entered
      if (!found)
      {
       trigger->AddCollision(hitObject->GetAddress());
       hitObject->OnEnter(trigger);
      }
      if(hitObject)
      {
       switch(trigger->GetType())
       {
     case kObjectDeathZoneTrigger:
     {
      trigger->Activate(trigger, hitObject);
      break;
     }
     case kObjectFoodZoneTrigger:
     {
      //trigger->Activate(trigger, hitObject);
      break;
     }
     case kObjectLevelLoadTrigger:
     {
       if(hitObject->GetBaseType() == kObjectCharacter)
      {
       GameCharacter *character = static_cast<GameCharacter*>(hitObject);
       if(character->GetGamePlayer() == TheGame->GetLocalPlayer())
       {
        trigger->Activate(trigger, hitObject);
       }
      }
      break;
     }
     default:
     {
      trigger->Activate(trigger, hitObject);
      trigger->Disable();
     }
       }
      }
     }
    }
    }
    void TriggerUpdatePhysics(Entity *entity0, Entity *entity1, float *position, float *normal, float *speed)
    {
    GameObject* object = (GameObject*)entity0->GetUserData();
    if (object->GetBaseType() == kObjectTrigger)
    {
     Trigger *trigger = static_cast<Trigger*>(object);
     if ((trigger) && !trigger->IsDisabled())
     {
      //Check if item exists
      std::list<CollisionItem*>::iterator it;
      for (it = trigger->collisionList.begin(); it != trigger->collisionList.end()
      {
       CollisionItem *collItem = (CollisionItem*)(*it);
       if (!collItem->hasCollision)
       {
     GameObject *object = (GameObject*)TheGameWorld->FindObjectByAddress(collItem->address);
     object->OnExit(trigger);
     delete collItem;
     collItem = NULL;
    
     it = trigger->collisionList.erase(it);
       }
       else
       {
     collItem->hasCollision = false;
     ++it;
       }
      }
     }
    }
    }
    Trigger::Trigger(long type) : GameObject(type)
    {
       SetBaseType(kObjectTrigger);
    
    List.push_front(this);
    it = List.begin();
    }
    Trigger::~Trigger()
    {
    std::list<CollisionItem*>::iterator collit;
    for (collit = collisionList.begin(); collit != collisionList.end(); collit++)
    {
     CollisionItem *object = (CollisionItem*)(*collit);
     delete object;
     object = NULL;
    }
    collisionList.clear();
    List.erase(it);
    }
    void Trigger::EnterWorld()
    {
    GameObject::EnterWorld();
    //Material *material = Material::Load("Materials/Game/Trigger/triggerAlpha.mat");
    //entity->SetMaterial(material);
    
    entity->AddHook(Entity::CollisionHook, (void*)TriggerCollision);
    entity->AddHook(Entity::UpdatePhysicsHook, (void*)TriggerUpdatePhysics);
    }
    void Trigger::Update()
    {
    GameObject::Update();
    }
    void Trigger::UpdateEach()
    {
    std::list<Trigger*>::iterator it;
    for (it=List.begin(); it!=List.end(); it++)
    {
     Trigger *object = (Trigger*)(*it);
    
     if(!(object->IsDisabled()))
      object->Update();
    }
    }
    void Trigger::AddCollision(std::string address)
    {
    CollisionItem *item = new CollisionItem;
    item->address = address;
    item->hasCollision = true;
    collisionList.push_front(item);
    }
    void Trigger::RemoveCollision(std::string address)
    {
    CollisionItem *item = new CollisionItem;
    item->address = address;
    collisionList.push_front(item);
    }
    void Trigger::Activate(BaseObject *trigger, BaseObject *activator)
    {
    GameObject::Activate(trigger, activator);
    }
    void Trigger::Save(pugi::xml_node *xmlNode)
    {
    GameObject::Save(xmlNode);
    
    short index = 0;
    
    std::list<CollisionItem*>::iterator it;
    for (it = collisionList.begin(); it != collisionList.end(); it++)
    {
     CollisionItem *object = (CollisionItem*)(*it);
     std::ostringstream oss;
     oss << "coll" << index;
     xmlNode->append_attribute(oss.str().c_str()) = object->address.c_str();
     oss << "has";
     xmlNode->append_attribute(oss.str().c_str()) = Utill::BoolToString(object->hasCollision).c_str();
     index++;
    }
    xmlNode->append_attribute("collInd") = index;
    }
    void Trigger::Load(pugi::xml_node *xmlNode)
    {
    GameObject::Load(xmlNode);
    //rot.x = atof(xmlNode->attribute("rotx").value());
    int index = atoi(xmlNode->attribute("collInd").value());
    
    //Load link addresses
    for (unsigned int i = 0; i < index; i++)
    {
     ostringstream oss;
     oss << "coll" << i;
     CollisionItem *item = new CollisionItem();
     item->address = xmlNode->attribute(oss.str().c_str()).value();
     oss << "has";
     item->hasCollision = Utill::StringToBool(xmlNode->attribute(oss.str().c_str()).value());
    }
    }
    

    • Upvote 1
  13. Hey! I can't not be in on this and miss out on all the fun again!

     

    If you like I'll work on some more weapons / characters?

     

    I also have an unused shotgun model which was never added into LECP

     

    I am moving house within the month so I will have some down time as of late this month though.

  14. Thanks Pixel! I have made some vast improvements since this post and have added the ability to cast spells. I'm getting to the stage where a vast majority of the coding has dried up and I'm just adding polishing touches to it. I'm currently starting on level design and more character/prop work. I'll hopefully be posting a video very soon.

×
×
  • Create New...