Jump to content

tjheldna

Members
  • Posts

    938
  • Joined

  • Last visited

Posts posted by tjheldna

  1. Load a project with your level level open

     

    Change projects note that the level is cleared however it is still the active level (path still showing in the title bar)

     

    If you save the level now it overwrites the level from the previous project with a blank level or whatever you created (Very nasty when you go back to the project and find your level is gone). Currently you can manually load a level, however it really looks like you are editing a level from your newly selected project when you are not.

     

    Hope I explained the issue properly.

     

    Cheers

  2. It wont work with LE2 as a few function names have changed, nothing too big though if you want to give it a try. I have LE 2 code for this however it hasn't received the latest updates. I can do this, but I'll need time.

  3. Hi All,

     

    I created a C++ GUI system for LE2 and have been meaning to share it for quit a while. I've now adapted most of the main elements for LE3 and is cross platform...so here it is.

     

    The widgets only use the base drawText, drawRect etc so this works with LE with nothing additional to link etc.

     

    Installation:

    • Create a new LE3 project an replace the source with the archive files.
    • Open up VS and include the files into the project. Overwrite App.cpp
    • Add the sound and image files.

    Please Note:

    • This is a work in progress I am forever optimising it.
    • I would greatly appreciate it if someone does make a nice optimisation/create a new widget to share and I'll gladly add it in.
    • I won't be translating to LUA, however if someone want's to go ahead.
    • If someone uses this in their game, a credit mention would be nice =);
    • Before you say it's not working! Check the paths of the files and code and in your project and make sure they match.

    v0.2

     

    - Widgets Added - Border, Button, Group, Image, Label, Quad, SingleImageButton, Widget, Window.

     

     

    v0.2 (5th April)

     

    - CheckBox and images.

     

    - Cleaned up the demo window a little.

     

    - With the latest build of LE3 Left mouse click should be working although not tested as of yet.

     

     

    v0.3 (8th April)

     

    - Added Radio Group

     

    - Added Radio Button Widget

     

    - Added Radio Button Images

     

    - Modified Check box Image

     

    - Cleaning up of classes and formatting

     

    - Added Radio button Example

     

    v0.4- current (22nd September)

     

    - Added LineTextBox with switch for new line. Features include optional centre alignment new line switch. See example for usage.

     

    - Changed function some names in base Widget class. Instead of SetWidgetAlpha(num) it's now SetAlpha(num) SetPosX etc. (NOTE most have been done but not all yet)

     

    - Fixed a bug in the ImageBox class.

     

    - Added LineTextBox to example

     

    - Removed modifierFlags from widget class. They are now merged with SetWidgetFlags(). I did this because I found it confusing by somtimes passing setWidgetFlags into setWidgetModifierFlags and visa versa. It saves on a long variable declared for each widget.

     

    - Instead of each button radio button etc loading their own click sound, a sound is declared and released in the interface manager so widgets just need to call TheInterface->clickSound->Play();

     

    - Other optimisations that I can't remember as I did them a while ago.

     

    v0.5 - current (23nd September)

     

    - Added Progress Bar.

     

    - Added Progress Bar to example.

     

    - Fixed issues for values not applying to children

     

    - More renaming

     

    Bugs

     

    - Color is spelt colour (The Australian way). I'll change it to color.

     

    Roadmap

     

    - Image button (separate image for 3 states). These widgets have been coded already, they just need LE3 testing window zorder, window dragging.

     

    - Remove need to load textures for standard widgets. Instead use 1 main texture palette.

     

    - Add constructors for all widgets that use fonts and sounds to be able to pass a font and sound as a parameter. I won't need to include "Interface.h" in those objects and makes them more customisable.

     

     

     

    Download Project

     

    v0.5 (22nd September)

     

    Hope to cut down some of your development time so hope you enjoy!

    • Upvote 5
  4. Hi Aggror,

     

    This may help you it iterates over the entities when the level is loaded. From there I can wrap the entities in classes and/or store them in a list...

     

    void StoreWorldPointsCallBack(Entity* entity, Object* extra)
    {        
           std::string text = entity->GetKeyValue("name");
    
           if(text.compare("playerSpawn") == 0)
           {
                   TheGame->AddPlayerSpawnPoint(entity);
           }
    }
    
    
    //Load the map somewhere in your code
    if(Map::Load((const char*)(path), StoreWorldPointsCallBack))
    {
    }
    

    • Upvote 3
  5. I've been used a bit of cocos 2dx with Levelhelper and Spritehelper. If you want to go 2d I highly recommend these. Levelhelper and Spritehelper are OSX only, but they both compile for use on iOS and Android.

  6. This one is nothing big but can be a little annoying when you are getting a texture path for code.

     

    When a new texture is imported for the first time it is displayed in lower case in the asset window. If you close down the editor and reload the editor only then the correct case is displayed.

  7. Hi Aggror,

     

    I have this working if the hook is added to the entity itself... I had no need to define it in .h

     

    void UpdateMyPhysicsHook(Entity* entity)
    {
    blah blah
    }
    
    
    entity->AddHook(Entity::UpdatePhysicsHook, UpdateMyPhysicsHook);

    • Upvote 1
  8. Hi Josh,

     

    Getting a crash on PhysicsSetPosition when it hits the ground in c++. I'm not sure if I am creating the object properly in code or it's a bug.

     

    - C++

    - The Model is loaded dynamically in the game.

    - Add a shape to the model

    - Try to apply some velocity to it.

    - When PhysicsSetPosition is called I get a crash.

    - Variable projectileDirection can be any value.

     

    model = Model::Load("Models/Inventory/Projectile/Projectile.mdl");

     

    Shape* shape = Shape::Box();

     

    entity->SetShape(shape);

    shape->Release();

    entity->SetCollisionType(Collision::Prop);

     

     

    entity->SetMass(2);

     

     

    Game loop

     

    entity->PhysicsSetPosition(projectileDirection.x, projectileDirection.y, projectileDirection.z, 2);

     

     

  9. Hi Josh,

     

    Really could use this function to remove an entities key by name. I'm using key values to read in c++ once I have done this I have no need for the entities key anymore. I don't want to use entity->ClearKeys() as I don't want to hose all of them.

     

    entity->RemoveKey("name");

     

    Cheers!

  10. Hi YouGroove,

     

    I am in the process of migrating my inventory code and yes it appears to work so far. The way I line it up is have a dummy node linked to the players hand and a dummy node on the weapon which is used to set the position and transform. That way I can visually see how things line up.

     

     

    itemMountNode->SetParent(mountNode);

     

    itemMountNode->SetMatrix(mountNode->GetMatrix());

     

    The weapons are sorted in a vector and iterated upon. As I'm switching weapons they are shown/hidden as necessary and always have a pointer to the current weapon.

     

    I'm writing this quickly before work, hope this helps.

  11. Something similar happens in c++ when deleting the world object in the project. A similar error appears and the game craps out when trying to delete the newton physics object of the player. I didn't post this before as I wasn't sure if it was something in my code, but I believe it's not.

  12. Is anyone else having issues with the LE3 Light not holding its Range field? Seems like every time I reload the level it resets back to 5? Some of my lights are parented but that doesn't seem like it's the problem. Just trying to work out is it something in my project or a bug.

  13. Not too sure if this has anything to do with it as I mainly use c++ but I noticed there is a comment along the calloutputs function --in, could that have something to do with it? don't know.

     

     

    function Script:Activate()--in

     

    end

×
×
  • Create New...