Jump to content

Mud-H

Members
  • Posts

    183
  • Joined

  • Last visited

Posts posted by Mud-H

  1. Hi!

    I'm currently working on a new version of my game

    . I decided to rewrite the custom vehicle class I'm using for a while since It produce some weird error "bins" that I have never been able to figured and I think I can do better with my enhanced C++ knowledge.

    My previous vehicle class was worked based on the Hover Vehicle class since I want that Old-School steering which make the car rotate arround it's center instead of realistic wheels steering. Now I'd like to based my new class on the WheeledVehicle since it's deal better with physic (Suspension, roll over, etc). I did some experiment to add the HoverVehicle steering code but I can't get it to work since (I think) some wheels forces are preventing the car to simply rotate. I'm optimistic to be able to find a work-around but I'm curious to see if someone have an idea about how it could be done simply. I want to keep the WheeledVehicle class code the more intact I can.


    I suspect the tires forces part of code is what I need to modify to allow to freely rotate the car:

     // Tire direction vectors perpendicular to surface normal
            Point3F wheelXVec = bx * cosSteering;
            wheelXVec += by * sinSteering * wheel->steering;
            Point3F tireX, tireY;
            mCross(wheel->surface.normal, wheelXVec, &tireY);
            tireY.normalize();
            mCross(tireY, wheel->surface.normal, &tireX);
            tireX.normalize();
    
            // Velocity of tire at the surface contact
            Point3F wheelContact, wheelVelocity;
            mRigid.getOriginVector(wheel->surface.pos,&wheelContact);
            mRigid.getVelocity(wheelContact, &wheelVelocity);
    
            F32 xVelocity = mDot(tireX, wheelVelocity);
            F32 yVelocity = mDot(tireY, wheelVelocity);
    
            // Tires act as springs and generate lateral and longitudinal
            // forces to move the vehicle. These distortion/spring forces
            // are what convert wheel angular velocity into forces that
            // act on the rigid body.
    
            // Longitudinal tire deformation force
            F32 ddy = (wheel->avel * wheel->tire->radius - yVelocity) -
               wheel->tire->longitudinalRelaxation *
               mFabs(wheel->avel) * wheel->Dy;
            wheel->Dy += ddy * dt;
            Fy = (wheel->tire->longitudinalForce * wheel->Dy +
               wheel->tire->longitudinalDamping * ddy);
    
            // Lateral tire deformation force
            F32 ddx = xVelocity - wheel->tire->lateralRelaxation *
               mFabs(wheel->avel) * wheel->Dx;
            wheel->Dx += ddx * dt;
            F32 Fx = -(wheel->tire->lateralForce * wheel->Dx +
               wheel->tire->lateralDamping * ddx);
    
            // Vertical load on the tire
            verticalLoad = spring + damping + antiSway;
            if (verticalLoad < 0)
               verticalLoad = 0;
    
            // Adjust tire forces based on friction
            F32 surfaceFriction = 1;
            F32 mu = surfaceFriction * (wheel->slipping ? wheel->tire->kineticFriction : wheel->tire->staticFriction);
            F32 Fn = verticalLoad * mu; Fn *= Fn;
            F32 Fw = Fx * Fx + Fy * Fy;
            if (Fw > Fn) 
            {
               F32 K = mSqrt(Fn / Fw);
               Fy *= K;
               Fx *= K;
               wheel->Dy *= K;
               wheel->Dx *= K;
               wheel->slip = 1 - K;
               wheel->slipping = true;
            }
            else 
            {
               wheel->slipping = false;
               wheel->slip = 0;
            }
    
            // Tire forces act through the tire direction vectors parallel
            // to the surface and are applied at the wheel hub.
            forceVector = (tireX * Fx) + (tireY * Fy);
            pos -= bz * (wheel->spring->length * wheel->extension);
            mRigid.getOriginVector(pos,&r);
            mCross(r, forceVector, &t);
            mRigid.torque += t;
            mRigid.force += forceVector;
    

    I'm still not very good with physic coding and maths... Someone have an idea about what I have to change to unlock free rotation. I want to use something similar to the Hover steering function:

    Point3F sn2;
      currTransform.getColumn(0, &sn);
      currTransform.getColumn(1, &sn2);
      mCross(sn, sn2, &r);
      r.normalize();
      torque -= r * (mSteering.x * mDataBlock->steeringForce);

     

    Like I said, I'm just starting and will to some experiments but I'm hoping someone can provide me a hint to where I should look at.


    What you think prevent the car for steering when I use the Hover steering at end of the WheeledVehicle updateForces code? With some test I have been able to make it work a little but only if the car was moving. (The rotation was faster when the car was moving faster). I tought it was related with the atRest check, but even with atRest always false, it don't rotate. Could enableCollision/DisableCollision be helpfull in my situation?(I think not since the ground collision is deal with castRay).


    Any hack suggestions/solution is welcomed! :roll:

  2. Speaking of IDE's, Don't forget you have "TIDE" run on linux too is a plugins of jEdit (Cross platform) which have a lot of plugins may be have the stuff you need. Highly configurable and customizable. The license is GPL, you can contribute. (open source)

     

    Interesting, strange that I never heard about it before. I will have a look at it, thanks.

  3. I just want to share the current status of a racing game I have been working on during the last year. It's my second attempt for this game after the fail of initial project called: "NO2 Racing". The name was changed to Boost! after I realized my stupid mistake that Nitrous oxide is N20... and N20 racing sound bad after being used to N02...


    Boost! is a multiplayer racing game project that take it's major inspiration from good old arcade/NES game "SuperSprint". The game won't be a SuperSprint clone, it have many different racing modes and track style planned which most are based on other retro racing games. I won't get into details now and the website is down until I clean up the future plan for Boost! and which features would be part of an eventual initial release. I stopped development in February because I needed a break but I'm considering a return to it since it was getting close to be a playable game. We did some conclusive Multiplayer testing, but still need to enhance the collision system to provide a better experience.


    So here's the first unofficial Public video of Boost! that I decided to shared with Torque3D community to show where I am at. Now, maybe some of you will be able to help me with some issues I'm facing...

    This video have PostFX disabled... Forgot to activate it

    sx4YyHD8MI4


    I have also publish a rough video showing the FX Manager I use to save different track ambience presets. The current version is in a middle of a restructuration so some features are broken (like the Precipiation presets saving). I'm planning to update the FX Manager to be a T3D extension that could be added to any projects allowing to quickly and simply edit the environment settings of a level without having to load the editor.

    x0IRSQAn3nE


    That's it for now. I'm currently reorganizing the project and would start on a fresh script base with a simplified initial release plan. I would also rewrite my custom Vehicle Class since I'm having some problem with it. Current class is base on HoverVehicle since I wanted an old-school steering feel (Car rotate 360 around it's middle point) but this time I will use WheeledVehicle and remove the standard front wheel steering.


    Also, I just want to point that I'm working on this alone mostly (I have a motivation partner only) and starting to realize that if I want to get to release stage, I might need some development assistance. So, if any of you could be interested in helping me getting Boost! done, I'd like to discuss the possibility with you. I think what I need the most is a skilled T3D coder, I'm getting better and better with coding but I can't dedicated enough time to it as I need to deal with the arts and scripting. Anyway. it's not an official request, just wanted to say that I'm interested to get a serious development partner...(Before someone ask, I can't pay for assistance, I'm looking for long term association with shared revenues...)


    Thanks, and as usual, any feedback are appreciated but don't forget that it's a rough quickly produce videos which is not showing Boost! at is best...

  4. Just a little update about GameLab/WorldLab and I think this thread should be moved in ShowOff sections since no tools are provided...


    First GameLab is "cancelled" as T3D StarterKit product, I will just keep it as a prototyping platform for my projects but might release the structure later if anyone want to have a look.


    About WorldLab, I will get back at it and aim to release it for free as an Open-Source T3D in-game editors. It might happen soon but would be as Alpha release until I clean all the scripting syntax and formatting.. I just came back from a 1 month break and I will provide more informations soon...

  5. Thanks for your replies.

    Maybe IDE is not the good word for what I had in mind, my limited technical english need improvements...

    What I had in mind is to have something a bit similar to Unity in which you can manage the assets in an environment seperate of the game. I know that PolyCode is kind of a game engine but I tought it could be adapted to manage Torque assets. For example, it could be adapted to work with Torque materials to edit the materials completly outside of Torque even if the rendering is handled by a completly different engine.

    I know it would require a lot of work but maybe less work than working on a similar solution based on T3D. I examined this possibility based on my "WorldLab" work as I was thinking about plan for future to make WorldLab a standalone Torque3D editors from which you can manage assets from differents project at same place.

    In the last weeks I took a complete development break and did some thinking about my WorldLab project, I think I will aim to expand it as a stand-alone editor instead of worrying about PolyCode or other alternatives. Also I decided to make WorldLab (BTW,still unnoffical name) an open-source T3D editor project so anyone could benefit from it if they see some benefits... I would make it work as an extra editor so standard tools would still work normally while WorldLab installed...

    Anyway, this is not the place to talk about it so for this thread, I think the best is to just simply forget about PolyCode for now and stick with what we have.


    About scripting IDE, I use Torsion already but I don't like the fact that it's not tweakable. Some month ago, I tried the open-source TorqueDev and started updating the source to fix some lacks I found after being used to Torsion but gave up because of limited time. Maybe, we could set a Git for TorqueDev and those who use it can share some improvements? I'm not fully familliar with licensing but I think it's ok to set a Git repositiory for TorqueDev?

  6. Yeah I gave it a try in my GameLab project and it's working. Wasn't that hard to make it an extra weapon but I noticed the bad material naming/texture mapping. I was planning to give a try to see if it's fixable with 3dsmax by loading the .dae. I never really tried to open animated .dae for edit.


    Let me know if you plan to fix it, else I will proceed with updating the mapping.

  7. I came across Polycode the other day and I was wondering if it could be use to create a Torque3D IDE a bit similar to Unity. From what I understand, it seem to have some usefull features that could make a good T3D IDE, the only part that I'm confused is about the LUA scripts part. Is it something that could be used to add TorqueScript support to it to make it work a bit like Torsion?

    http://polycode.org/features/


    I'm just curious to have some expert opinion on that. I came across some other similar open source tools but this one look the best candidate for my eyes. I think having a T3D IDE that work independtly from the game could be a good + for Torque3D.


    If it's really what I think it is, we could adapt the features to work with T3D formats and we will be able to manage our game contents and scripts in the same environment outside of the game.


    So what you think? Am I missing something?

  8. Yeah, I remember having search for that .dae export issue a while back but I don't remember having found the fix. If you can find back what was wrong with the collada file, i'd like to have a look. I guess it shouldn't be too hard to make a simple script that check the .dae file and replace what's wrong. Anyway, for now it's not a priority for me and I will investigate deeper at that time.


    Where the Jeff Raab improvements are? Included in the stock editor already?

  9. What exactly are all the features it brings?

    Well, to be honest, as now, it doesn't bring much new features. It mostly the structure behind that has been rewritten/reorganized to make it easier to add new features or new tools. For example, it's possible to make changes to the GUI in th GuiEditor without worrying about creating corrupted .gui file (Some stock .gui have more than one hierarchy or have an unknown parent they were detached from that you need to figured out). To prevent that, when a new plugin is added, the editor keep in memory all the original parentGroup of the plugins GUI added and I added a Detach Editor Guis button, in GuiEditor to set back the plugins into their original hierarchy allowing to edit the GUIs normally.

    I will try to start documenting the system soon so I will be able to share more details about how it work because, on the fly like that, I forget a lot of things and since english is not my primary language it make it harder...


    About the tools features, most tools are still working like the stock editors but I will start working on more improvements since now the base seem quite solid. Also my plan is to rework brand new tools and keep the stock editor tools scripting quite intact so I can merge future tools upgrade without much trouble. Also during my work, I found many functions, tools or shortcut that I wasn't aware of and I'm trying to make the more accessible.


    Here's some of the few new features that I can think of:

    -> Clone array tool with mouse drag cloning (Could be usefull to build fences for example)

    -> The grouping tool which allow to group and ungroup any objects without affecting the MissionGroup.

    -> Forest brushes can be added to SimGroups making it easier to organize them.

    -> DragAndDrop plugin bar, you don't need a plugin, simply drag it out of the bar. You want it back, open the Disabled plugin bin and drag it into the bar. You can also, reorder them by dragging the icon in position you want. (Planning to add that features to the toolbar so it's easy to reorganize the toolbar)

    -> MissionArea editor is gone since the MissionAreaGui 3D editing feature seem to have been removed from Code so I simply show the Area editting GUI when MissionArea object is selected.

    -> New automated Settings GUI, you simply list the Plugin settings in a specified format and the editor will generate automatically the settings and add them in the Setting GUI (EX: %cfg.setVal("DefaultWidth", "10" TAB "Default Width" TAB "SliderEdit" TAB "range::0 100;tickAt 1" TAB "RoadEditorGui" TAB "1"); )

    -> Some other I might have forgot and many other small improvement to different tools...


    Anyway, it still quick early in development and I just wanted to share my initial progress, more features would be added in the future when I found the need for it while editing one of my game projects. Also, I'm open for suggestions about some features you'd like to see in the editor.


    Some of my "unofficial" future plans:

    -> New ShapeEditor-ish tool oriented toward specific type of objects (Ex: Editing the player or vehicle objects with the datablock setting in same place )

    -> New ConvexEditor with building features( I still need to investigate what's possible and wrong with the current(Exported .dae doesn't load correctly in game)

    -> ScriptEditor plugins which would allow to quick edit some scripts and reload them from the game.(I have currently a prototype but I need to work a new Gui class because GuiMLTextEditCtrl is not made for that)

    -> Shortcut/Toolbar management GUI


    Okay enough for now, I really need to start getting better organized about this project and start listing the changes and what's to be done. There's still a lot of work to be done before considering any kind of release.

  10. Just wanted to share my current work on an enhanced editor for Torque3D. I decided to revamped it a little because I always had problem trying to improve the tools GUI without having the editor to crash on the next load. So after a quick analyse, I decided the best would be to reorganize the scripting base completly and make it more modular so it's easy to add or update the tools. I ended up by doing a huge amount of changes to system and I decided to give the interface a more modern look. It have been a long ride so far but now it's stabilizing and I can focus on working on some tools improvement.

    So here's a rough video about current status, it's still in pre alpha stage so there's still many bugs, I just wanted to share it and get some feedbacks or tools improvement suggestions.


    EyD1qXm9vAI


    I'm still undecided about what I will do with it but I'm thinking to make it available for a small cost when it will be completed. I'd like to give it for free, but after all those years I really need to get some money from my work even if it's a ridiculous amount...

    So I'm looking to ear about what you think about WorldLab and also looking for tools improvement suggestions, I already have a lot of planned improvement but I'm curious to ear about what you think of.


    EDIT: Removed GameLab references

  11. Yup, I should... The problem is that I wasn't sure how to set a Git repo inside with Torque3D repo, might be time to learn about submodules or subtree.

    I confirmed that my issue was script-side so I decide to start on a fresh base and keep track of my changes. For my previous scripts, I have started with the T3D Bones minimal setup and I think there's some stuff not up-to-date in it. (I had issues with ShaderData and maybe my issue is related to that...)

    So now, I'm working on my own minimal script base and gonna add my project script carefully in it. And, I will commit every changes...

  12. Yesterday, I have noticed that my AIPlayers are now invisible on spawn and they were working fine before. I spent most of the night trying to figure what I did wrong but couldn't find it. I'm not sure if it's related to something I changed or my port to latest T3D engine (maybe something changed that can affect that..). So today, I want to get it fix without spending all day on it so maybe I could start by asking if someone have an hint about what is happening..


    At first I tought my AIPlayers were not spawning but I can see them in editor and I get the bounding box when I select them. Also, they are still moving around. I suspect some camera scripting changes I made. Is there something needed to be done on the camera to get a valid frustrum? Another suspicion was about the firstperson settings and renderFirstperson but my attempts didn't fix my issues.


    I tried to debug but I'm not sure how to find what's wrong with the AIPlayer rendering. Should the AIPlayer call Player::prepRenderImage when rendering, if so, that never happen. Any debugging suggestion to find my issues would be appreciate...

    So, if anyone have an idea about what is causing my issue, I'd like to here about it. Everything else is rendering fine, I only have issue with AIPlayer (I also tried different way to spawn them with all same result)

  13. With the Project Manager merging, I get 3 conflicts: .gitignore, .gitattributes and readme.MD. I should resolve the conflict, by keeping my files in that case, right?



    Hmm, now I'm confused again. I shouldn't merge the Project Manager repo into my build, right? It should be kept alone and I simply add the compiled files to my repo? So I'm reverting my merge/commit and will simply clone the Project Manager to a seperate folder to compile it. (I have always used the pre-compiled version of Project Manager before.


    (Sorry to post a lot about my Git setup but that way, you can easily tell me what I did wrong...)

  14. Ok. I think I was wrong to use a T3D fork as source for my private BitBucket repository and that I should simply add official T3D GitHub repo as a remote. My T3D Fork should only be used in case I'm planning to make a pull Request, right?


    Now I want to add the ProjectManager to my files by using the git repo: https://github.com/GarageGames/Torque3D-ProjectManager . So, I should add it to my remote repository and fetch it so I can merge it to my files. Should I keep the files in a local branch or should I merge them into my development/master branch... (Should I Pull project manager into current branch or Checkout project manager branch?)


    In general, do you work with many branches or try to keep them limited?

  15. After a while using Git for various projects, I'm getting more confortable with it but I'm still not sure what's the best way to develop using the Torque3D repository. Since I have never work on a Git project with a team, I'm still confused about how to set an efficient Torque3D git system and I always end up starting from scracth with a new repo.

    I'm not asking for a Git tutorial but more about how to use Git with Torque3D efficiently by allowing me to simply merge latest commit into my files without messing up with my changes.


    So here how I'm setting up my fresh repository for a project which will have limited code changes.


    First, I forked Torque3D on GitHub and cloned it to my PC. Next I created a new private repository on BitBucket. Now I want to use the private BitBucket one as default remote and I will use my GitHub fork to fetch Torque3D commits. (To get changes from a commit I should use Fetch and not Pull, right?)


    In that case, should I not use a Torque3D fork and simply use the Torque3D official repository? I'm not 100% sure about how forks work but while typing this I think my private BitBucket repo will acted as a fork?


    Now, how I proceed if I want to include changes from a Forked T3D repo? I add the Torque3D fork repository to my remote repository and Fetch the wanted branch into my default repository by creating a new branch? Then I can merge that branch into on of my work branches? What happen if I have modify the same files, it will ask me to resolve conflicts and should decided which to keep?


    I'd really like to know how contributors to Torque3D use Git. Someday, I'd like to contribute but before I need to have an effective Git workflow established. I have never used Pull Request. How you manage your Git setup to create Pull Request, you put all the changes in a Branch and the diffs are used for the Pull Request?


    Can experienced Git users post a simple description about how they use it to develop on Torque3D. I use mostly SourceTree but I'm starting to move to GitExtensions since I understand Git better..

  16. I have been working with T3D for years now and I never reported issues I found. Most are minor but I still think they should be fixed in the engine for future. Where I should report those? Here, on GitHub or on GG forum?


    For example, I'm currently experimenting for the first time with GuiMenuBar and just found a minor issue with GuiMenuBar::ClearMenus:


    From Online Reference:

    void GuiMenuBar::clearMenus	(	int 	param1,
    int 	param2	 
    )			
    Clears all the menus from the menu bar.
    
    Example:
    // Inform the GuiMenuBar control to clear all menus from itself.
    %thisGuiMenuBar.clearMenus();

    You can see tro parameters in function: param1, and param2. Unline the example clearMenus(); don't work, it required the 2 unused parameters. (clearMenus("",""); works fine. I had a look into the code and found this:

    DefineEngineMethod( GuiMenuBar, clearMenus, void, ( S32 param1, S32 param2),,
      "@brief Clears all the menus from the menu bar.\n\n"
      "@tsexample\n"
      "// Inform the GuiMenuBar control to clear all menus from itself.\n"
      "%thisGuiMenuBar.clearMenus();\n"
      "@endtsexample\n\n"
      "@see GuiTickCtrl")
    {
      object->clearMenus();
    }

    I don't know why those 2 parameters are there but they should be removed...


    So, how and where I should report this? I have some others to report.

  17. Well I found nothing in source code, is it something related to my Platform (windows) library? Now I tought of why not using the T3D GuiMenuBar instead of this native menubar.

    Anyone see a reason I shouldn't use the T3D GuiMenuBar? Would it still be crossplatform? For now I will keep the original menubar script intact and would make it optional to use the new Menu from GuiMenuBar (if it work fine...)

  18. Yes I saw that a while back. Look good but it's mostly a recoloration of the existing theme. I'm working on a complete new theme with new icons and GuiCtrls assets.


    Anyway, that Dark UI is still using the default menubar which make the Dark look incomplete. I guess the guy that did it didn't found also how to change the look of the menuBar. I will have a look into the source code files, maybe I will find something there. I'm not familliar with C++ gui elements, but it got to be somewhere that menubar graphic...

×
×
  • Create New...