General Progress Thread

While I'm working the controls out, my short term aim is Max Payne style controls (FPS controls with a 3rd person perspective on the camera), then we can develop into more 3d platformer style controls.

Using matrices would definitely be cleaner approach, though the resulting outcome is the same.
Btw you should be wary of the way the axises work in OpenGL(and DirectX for that matter). Y is UP, despite what many people may tell you. They just artificially swap the letters for Z and Y in the 3D modelling programs because if Z is UP then some things are not possible, like doing a barrel roll with the camera. So when you load a model you may need to switch them, and maybe even negate one of them due to using left or right handed angles.

Using matrices would definitely be cleaner approach, though the resulting outcome is the same.
Btw you should be wary of the way the axises work in OpenGL(and DirectX for that matter). Y is UP, despite what many people may tell you. They just artificially swap the letters for Z and Y in the 3D modelling programs because if Z is UP then some things are not possible, like doing a barrel roll with the camera. So when you load a model you may need to switch them, and maybe even negate one of them due to using left or right handed angles.

I've always assumed Y to be up and all those 3D programs to be wrong :P. That method works for y = up.

Alright, I've added the camera orbiting, a few more items to the area to populate the scene a bit more, and did a bit more code cleanup. Changes pushed.

Relick & winterhell: Yes, I think that Matrices would be better for handling rotation, but truth is I'm a little rusty on matrix rotation, so I wanted to just get it working with minimal hassle. I'll probably revise it at a more appropriate time.

Relick: Currently, glRotatef handles it so that the first parameter gives the degrees of rotation (in degrees), and the following 3 parameters describe the axis that the rotation is meant to be around.

Basic movement is now done, time to work on basic physics. Time for researching and implementing collision detection.

Alright, I've added the camera orbiting, a few more items to the area to populate the scene a bit more, and did a bit more code cleanup. Changes pushed.

Relick & winterhell: Yes, I think that Matrices would be better for handling rotation, but truth is I'm a little rusty on matrix rotation, so I wanted to just get it working with minimal hassle. I'll probably revise it at a more appropriate time.

Relick: Currently, glRotatef handles it so that the first parameter gives the degrees of rotation (in degrees), and the following 3 parameters describe the axis that the rotation is meant to be around.

Basic movement is now done, time to work on basic physics. Time for researching and implementing collision detection.

What my trig does is positions the camera on the edge of a sphere around the player rather than just the circle around the player on a flat plane. I guess its not a problem while you can only rotate your pitch but I think it would be best to get it in now before physics so we can see our work space easier. I can modify it for use like this (I believe this works with axis rotation - glRotatef):

So I messed around with ideas for a HUD, and this is one of the designs I put together. It's very modern influenced, so I'll be working on something more retro influenced, as well as more drafts of this one. If you're interested in it, and if there are any changes you'd like to see made, let me know

(The picture of the ring is just a place holder for now.)

This post has been edited by TheKazeblade: 30 November 2012 - 10:59 PM

Hang on a second. First-Person controls in a third-person game. Does that end up anything like MegaMan Legends? I'm really good at that, and come to think of it, it could be fairly useful for controlling Sonic. Can we keep that until we have the engine fleshed out more, and see if it's worth keeping as a setting?

Using the mouse for camera controls is the best method of controlling the camera in a 3D Sonic game, by far, in my opinion, for the same reason why it's the best control method for a shooter - precision and speed tied into one fantastic package, while also allowing for buttons to be on hand even when controlling the camera.

Exactly what Candescence said, however the key difference between a Sonic game and a third-person shooter is that in a TPS the player/gun is always aiming at where the camera is aiming - whereas in a Sonic game; Sonic may not always be looking in the same direction as the camera at all times. SonicGDK is the best modern example of what we're talking about Kharen. You can run around and the camera will follow Sonic keeping your viewport always looking ahead of Sonic OR you can move the mouse around manually and have a look around for yourself - even while running.

I apologise for the huge post, I only did a few things:
1) Added a listener for mouse
2) Used the y mouse movement to change the X rotation of the camera
3) Used some trig to work out position of camera and the axis for X rotation.
It now has a 3D orbiting camera. There is still a problem with the mouse though, I have no idea how to get input past the window box. I'll look into this later.

After having a look at 3D rotational matrices, I have a feeling that while they will be cleaner they are also slightly more intensive than the method I have used here (this can still be optimised some more). I'm sure matrices will be better put to use for the character, enemies etc. but for a fixed object like the camera this is fine.

EDIT: Sofox, I have signed up to Bitbucket. Is there anyway I can get added to the list so I can commit stuff straight to the main branch or would you rather I make a fork and have it pulled in?

I can give you write access to the respository, but you'll need to send me the email address you used for your BitBucket account. Instructions for making forks, modifying them, and creating pull requests to have them merged back can be found here, but I don't think we'll need to use that unless the suggested changes become really big.

In terms of the camera debate, I have no problem with keeping FPS-style controls for now. We'll need to look at the various ways of controlling the character if we're going to figure out what the best method is (though we can certainly leave other methods available as an option).

Kaze: That is NICE! Very stylish with a good colour scheme.

If I had to suggest a few things, the colons could be more vertically centered, the shadows maybe a touch closer to the text and the number font could maybe be a bit... cleaner? Sorry, not sure if that's the right word, I'm not that experienced with design.

In any event, it looks good, and it'll be great to have this in the engine!

*If you press the key 'S' then you will change from these controls:
Left/Right keys rotate character and camera (they are locked together), camera's x rotation is changed by moving the mouse on the Y axis.

to these controls (and if you press it again you'll switch back):
Left/Right keys rotate character ONLY, camera's rotation is changed via moving the mouse.

Sofox, I have a couple of comments in there which you might want to look at. Nothing too important, just asking you where to put some variables and stuff.