General Progress Thread

Discussion in 'Mobius Engine Project' started by Gen, Mar 11, 2012.

  1. Sofox

    Sofox

    Member Member
    The reason I haven't been active recently was because I was hit by project assignments that I only finally completed yesterday. While I would like to dive back into the engine code, we now have Christmas comming up which complicates things with all it's obligations. I will be keeping Mobius in mind, but Christmas isn't going to make it ieasy to contribute.
     
  2. Aerosol

    Aerosol

    FML and FU2 Member
    10,247
    1
    18
    Not where I want to be.
    Sonic (?): Coming summer of 2055...?
    On the contrary, Christmas means I'll be less busy than usual next week :v:
     
  3. Sofox

    Sofox

    Member Member
    Recently I've had a wedding, a funeral, and a bout of sickness along with the previous holiday festivities. Kinda got in the way of Mobius development, I aim to get back on track in the next few days.
     
  4. Sofox

    Sofox

    Member Member
    Okay, added some basic code for managing the collision mesh for the world.

    Relick: I upgraded my graphics card, and I don't know what it did but I can barely use the mouse camera controls. Any movement of the mouse makes the camera jump erratically, and it takes me a few seconds just to get the camera looking level at the scenery and mange it from there. Please fix this, or if you can't, disable it by default.
     
  5. Relick

    Relick

    Member Member
    197
    0
    0
    England
    C++/DX10 Engine (not sonic related)
    At a guess, it is probably the combination of your sensitive mouse, your boost in FPS from the new card, and the fact I haven't added any deltaTime regulation to the camera rotation.
    I'll test it out and push something tonight when I get home, but this is all you should need to do (on line 218 of main.cpp):

    PHP:
    1.  
    2.  world.camera.rot.x += input.mouseRelY * 0.2;
    3.  
    to

    PHP:
    1.  
    2.  world.camera.rot.x += input.mouseRelY * 0.2 * deltaTime;
    3.  
    and then repeat that for line 226 if you want the other mode to work properly too.
     
  6. winterhell

    winterhell

    Member Member
    1,159
    0
    16
    For rotating the camera with the mouse you don't need a delta time for the current frame, as long as you take snapshots of the mouse X/Y deltas every frame. Maybe you changed the resolution you are running the demo?
    As for movement of the type "press&hold a button", you do need deltaFrameTime measuring the time between the current and last frame, for example just before reading the input devices. And then you have pseudo code if(player1Controller.Right.isPressed) player1Character.pos.x+=movementSpeed*deltaFrameTime.
     
  7. Relick

    Relick

    Member Member
    197
    0
    0
    England
    C++/DX10 Engine (not sonic related)
    So would a sensitivity slider be better? It is using the mouse X/Y deltas, but since the mouse is run by the hardware this delta can be huge for sensitive mouses per frame while small for insensitive mouses. Now that I think about it (I was in a rush) I guess using the time delta wouldn't really help.
     
  8. winterhell

    winterhell

    Member Member
    1,159
    0
    16
    Yep, a sensitivity slider sounds like a good idea. You'll still have to tweak the default value.
     
  9. Relick

    Relick

    Member Member
    197
    0
    0
    England
    C++/DX10 Engine (not sonic related)
    Ok until GUI is added, sensitivity amount just comes up in the app title along with the FPS. Scale goes from 0 (no movement) to 2 (twice as sensitive as normal). O decrements by 0.1, P increments by 0.1. It has been pushed.

    Next I think its necessary to get some base classes in. Make ourselves a Math.h which includes Vector2, Vector3, Quaternion, Matrix and perhaps even Transform to tie them all together. Its simple stuff but it will be inevitably be needed throughout the engine. I can try and do these tomorrow, but I can't guarantee anything as I must revise for more exams.

    As for the rest of the app, I think its time to stop putting in provisional stuff and start building what we will actually be using. A collision sphere on the camera is not necessary at the moment until we can actually get collisions implemented. I now have a pretty good grasp on how Bullet does stuff and how it works - I have abstraction classes already built up in my own project which I can pretty much just copy in. Just let me know when you are ready to add the bullet includes and I can get started on implementing and explaining it all.
     
  10. Sofox

    Sofox

    Member Member
    Alright, I've tried out your solution, and the problem is still there.
    It seems I was hasty in my original diagnosis, and after looking at it more closely the problem seems to be more with the mouse warp. The cursor reaches the top of the screen and when it warps the the center, sometimes the camera resets to a position that looks straight down. Since the camera usually starts by looking down, it means that even just trying to get the camera look level requires the cursor to warp several times, one of which is bound to reset the camera meaning I can't get the camera to look up. I have to wave my mouse frantically before somehow the camera goes level and I can make small camera movements that adjust the camera without resetting it. I'm not sure what's causing this.

    I do agree we need Math functions, but we don't need to put them in a class, just simple a set of standalone functions in a Math.h and Math.cpp file should be fine. Already I've committed the bare bones of this class, using the functions you've already written, to demonstrate how I think this should go.

    I'm still not sure how we're going to use Bullet in this project. I'd appreciate it if you could give me a brief explanation of your abstraction classes beforehand.

    As well as the above Math change, I've added to the collision mesh code so it's displayed in the world, and my next move will be the actual collision detection algorithms between sphere and triangle.

    Also, as I said I would a while back, I've changed the license to MIT, there were no severe objections.
     
  11. Relick

    Relick

    Member Member
    197
    0
    0
    England
    C++/DX10 Engine (not sonic related)
    Whenever WarpMouse is called, it creates a mouse movement event. I specifically put in a check in case WarpMouse was called so that the mouse movement event it created was ignored in order to prevent the above behaviour from occurring. As I can't replicate it on Windows, I'm installing Ubuntu in order to see if it is a problem with Linux (and then I can subsequently fix it).

    I'm not sure what your objection is to having classes like Vector3, however AFAIK you are the more experienced coder so if there is a better way to do it then please let me know for the future.

    If you are able to get on the IRC tonight I can explain in full.
     
  12. Xaklse

    Xaklse

    Member Member
    If you're going to use Bullet...

    Code (Text):
    1. #include "vectormath/vmInclude.h" //An optional header file from Bullet Physics,
    2.                                   //provides functions for 3D/4D vectors,
    3.                                   //3x3/4x4 matrices and quaternions.
    4.  
    5. typedef Vectormath::Aos::Matrix3 Matrix3;
    6. typedef Vectormath::Aos::Matrix4 Matrix4;
    7. typedef Vectormath::Aos::Quat Quat;
    8. typedef Vectormath::Aos::Vector3 Vector3;
    9. typedef Vectormath::Aos::Vector4 Vector4;
     
  13. Relick

    Relick

    Member Member
    197
    0
    0
    England
    C++/DX10 Engine (not sonic related)
    Thanks for that, I hadn't realised that Bullet had separated their vector stuff. It's definitely interesting stuff.

    @Sofox, this is one of the reasons I want to use Bullet - they implemented Sony's SIMD vector maths library into it. This means that the physics can handle more objects at a lower cycle cost meaning more detailed collision etc. Using Xaklse's code we can even make use of this ourselves (with little implementation effort) and it gives the designer even more resources to use in their game.
     
  14. Relick

    Relick

    Member Member
    197
    0
    0
    England
    C++/DX10 Engine (not sonic related)
    Hey Sofox, not sure what's happened but after pulling your commit, I can't get it to run. It builds fine on Fedora, Ubuntu and Windows but opening the app just makes it close again straight away.

    EDIT:
    After debugging, I have found the problem is definitely in AddTriangle, and it crashes on this line:

    PHP:
    1.  
    2. mesh.triangles[mesh.triangleCount] = t;
    3.  
    Perhaps because you never initialise mesh.colMesh before that point (as far as I can tell)?


    Fixed it by adding
    PHP:
    1.  
    2. mesh.colMesh = me_collision_mesh();
    3.  
    before the first AddTriangle. Pushed the fix. Now I can get to fixing that mouse problem ^.^

    EDIT:

    The only way I could replicate the problem was by turning on virtual mouse integration in VirtualBox. This caused the problem because even though WarpMouse was being called, since VirtualBox had control of the mouse it never actually moved into the centre of the window. However, if I disable the integration (so the mouse is locked to Fedora), then it worked fine.

    When you move your mouse to the edge of the window, does it actually warp to the middle?
     
  15. Sofox

    Sofox

    Member Member
    Thanks for the fix Relick.

    Yeah, whenever the cursor hits the edge of the screen, the mouse does warp to the middle. It's at that same instant that the camera sometimes resets.
     
  16. I really hate to be "that guy", but I've been trying to avoid asking this for what seems like forever, and it's really bugging me...

    Are there any updates to this project? Not updates as in "We're nearly done!" or "We finished this part, have some pictures!", but simply things like how development is going or what you're working on at the moment. I've been following this, just not posting because I don't know anything that would be helpful to you guys.

    Anyways, I'm sorry for bugging you and asking what has to be the most annoying thing ever, but I really don't want this project to end up dead. A few days ago, a scanlation group that was translating one of my absolute favorite mangas had their website finally go down after an eternity of no updates whatsoever, so there wasn't anything like a message saying that they were finished or anything, it just stopped. I'd hate to have this happen here. If you're throwing in the towel, saying something would be nice. If you're not and I'm worrying for nothing, then confirmation would be nice as well.
     
  17. Relick

    Relick

    Member Member
    197
    0
    0
    England
    C++/DX10 Engine (not sonic related)
    I drop in IRC every other day to see if anyone is in there, however there usually isn't. I don't get a chance to speak with Sofox for long enough in order to sort out his mouse problem or understand why he opposes making / typedef from bullet maths classes. Now I've got end of main school exams coming up so I'm focusing on them until about halfway through June. If I get time I'll just be making some commits to get the thing rolling again.

    If you want to speak in IRC about what you could do to help I'm in there now.
     
  18. Uh... I don't actually know how to use an IRC program. Also, I don't think I know much of anything I can do to help. My PC is from early '09, and has an overheating problem, so I can't do anything like modeling. I don't know any programming except for barely enough to read code and work out what it does. I don't know enough to edit it or find mistakes. The only thing I can think of that I can do right now is test things to see if they work on low-end PC's, and I don't think that's all too helpful.

    I just wanted to know if the project was still going or not. I'm sorry I can't do anything to help.
     
  19. Rolken

    Rolken

    Tech Members Tech Member
    This particular rocket fell over on the launch pad when a soft breeze rolled by.

    But if you're interested in game tech, Fabien Sanglard regularly posts great game engine analyses and discourses, which could be an interesting place to start learning about it.
     
  20. Sofox

    Sofox

    Member Member
    Hey guys, sorry for the lack of updates. Truth is a bunch of real life things have been taking all my attention from Mobius. Just recently I had to finish a few assignments that took up a lot of my attention.

    Looking forward to the next few months, I will be busy, but will have a less busy week here and there. I can't promise constant activity, but I'll try to get more stuff done on the project in the future. Sorry I dropped the ball in the meantime, which is exactly what I criticised the previous project leader for doing...

    Relick, we'll need to talk about the issues you mentioned. I'd assumed you were going to look at the mouse control details yourself or at least revert the changes for the time being which I suggested you doing. To be honest, in general if a commit someone make causes problems, it's their responsibility to either fix it quickly or revert it (especially in our case since we only have one main branch). It honestly was a bit of a blow to my motivation on the project to see changes that screwed with what I had been working on and then having those changes interfere every time I tried to test the engine, even if I was testing something completely unrelated. In any event, it's silly it's been left this long. People working on the same code should communicated and coordinate so I'll try to head to the MobiusEngine IRC channel and we can discuss it more in real time.

    Kharen, IRC is something we've all had to learn to do at some point. It's just a case of installing a program and following a guide. Usually, you just need to find the right place to enter your server name, chatroom name, and your own user name and the rest is just minor details about the program itself. The most common program to use is mIRC which you can get here: http://www.mirc.com/ and you should be able to find instructions on the internet.
    Testing on low spec computers is a helpful task. As for other skills, for programming, just download Code::Blocks from here: http://www.codeblocks.org/ and try coding in that. It's not the best IDE, but you can write code and then have it compile and run at the click of a button which is good if you're just trying to get familiar with code.