Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Core

Members
  • Posts

    117
  • Joined

  • Last visited

Posts posted by Core

  1. So if I do the calculations as you suggest and still obtain a negative angle, would it be okay just to add that negative angle value to 180? Trying to find the best way to make this process as automated as possible!

    This is how I would do it:

    slopes.png

    You may want to switch the positive and negative values if you're using a downward Y axis. In any case, I think it's important to keep the distinction between positive and negative angles, and between acute and obtuse angles.

    eh.. All the programming language I'm familiar with use the downward Y axis as the positive value.. This part still goes a bit over my head!

    I would think that depends on the engine, not on the programming language. C for example doesn't impose anything; I just prefer to use an upward Y axis because it's similar to the trigonometric circle. But either way it's fine; you just need to make sure all the calculations are consistent.

  2. If you have DeltaX = -15 and DeltaY = -9, then the angle is:

    angle = atan(-9 / -15) = atan(0.6) = 0.54 radians

    or 31 degrees (= 0.54 * 180 / pi)

    I think luksamuk made a mistake; what he calls angleInRadians should be the angle in degrees. An arctan function normally returns the angle in radians, so if you need it in degrees you'll have to convert it.

    Apparently the ATan2 function did give you the right angle in degrees directly, though it subtracted 180° because you gave a negative DeltaX. Normally you should calculate like this: DeltaX = X2 - X1, rather than X1 - X2. Same with DeltaY.

    If you give positive numbers to the ATan2 function it should give you the right angle.

    If you need the angle in radians:

    angleInRadians = angleInDegrees * pi / 180

    I don't know if you will need it; it depends on what you need the angle for.

    By the way, here you end up with a positive angle for a downward slope. I don't know how Sonic games are made, but I'm used to the opposite: positive angles for upwards slopes and negative angles for a downward slopes, because I use a upward Y axis (basically I would have DeltaX = 15 and DeltaY = -9). Maybe that's normal for Sonic games, but you should check to be sure.

  3. Sorry about the controller configuration. I initially wanted to have the user assign a button by pressing it, the same way it's done with the keyboard keys. But I couldn't make it work... so instead you have to select the buttons/axes from a list, and if you press a button its number is displayed. It's not ideal, but it should be usable enough...

  4. Thanks a lot for your feedback.

    I know the camera needs work, but from what I understand in your video, you use the keyboard to jump/roll and the mouse to move the camera. This is strange, because you're supposed to either use the keyboard only (with the C key to move the camera), or use the mouse buttons to jump/roll while moving with the arrow keys.

    In any case, it is true that the level design needs work. I'm not too good at it, but I'll try to improve.

    I've already been told that Sonic should have a shadow, but I have no idea how to implement it...

  5. Quick poll: do you think it would be better if I replaced the Insta-Shield with a Homing Attack?

    It may be too difficult to hit enemies without the Homing Attack, but I fear it would become too easy with it.

    ---

    @TailsSena: adding DirectX support is probably something I should do; the problem is that I've never used DirectX and don't know how to use it. I think I'll look into it once the game is finished.

  6. @justin123: thanks for replying. Sorry about the camera problems; I'll try to fix the camera before SAGE.

    @TailsSena: I don't think rendering unused geometry would slow down the game so much; the problem seems to come from somewhere else. Maybe the game is using too much resources. Or maybe your OpenGL drivers are too old. I don't know if you can update them.

  7. Thanks for the replies.

    Camera collides with the ground but not the walls. :P

    Yeah, camera is supposed to collide with the walls but it often manages to get through... Don't know why, but I'll try to correct that.

    @TailsSena: only 7 FPS!? Now that's worrying. It also seems that most of the drawing time is spent drawing something else than the 4 things displayed... I don't know what could take so much time. Or why you're spending so much time waiting.

    I'll try to find ways to make the game run better, but I'm a bit lost here.

  8. Since some people have framerate issues, I've made a special version that display the framerate and the time taken by several functions.

    So, if you have framerate issues, please try this and tell me what it shows (for example, what takes the most time and what framerate you have compared to what you're supposed to have), so that I may know what I need to improve.

    Download

    (note: the game's framerate should actually be 1 or 2 FPS higher than what the setup program says)

    (by the way, I've reduced the gravity a bit, which causes other problems that I will correct later. Please ignore them and just look at the numbers)

  9. I experienced a lot of slowdown with my computer. With the heat wave, framerate is really instable. It can go up to 120 FPS (according to Fraps); it usually varies between 80 and 110 FPS, but sometimes it drops and at times the games freezes for a while. With the 2 other versions, the framerate is more consistent and varies between 50 and 60 FPS, but sometimes it drops.

  10. What kind of game are you making? I think you should try not to use more than 3 buttons.

    If you really need more buttons than A,S,D I think I would prefer A,S,D,Q,W,E. Or if you need only one extra button, A,S,D,Shift.

    (But it would be nice to give the player the option to reconfigure the keys, since I'm actually using an AZERTY keyboard.)

  11. I was still wondering about power-ups, and in the end I've decided to add invincibility.

    ssw_i01_th.png

    But instead of being activated immediately, you can activate it whenever you want (by pressing the roll key during a jump). That way you can save it for later if you want (and I don't have to worry about placing it where it's useful).

    This little icon appears when you have an invincibility that you can activate:

    ssw_i02_th.png

    And invincibility looks like this:

    ssw_i03_th.png

    (yeah, I'm not an artist. But it looks a bit better in motion.)

    I've also found a use for the rings: now they increase the size of the Insta-shield. Compare:

    th_ssw_i04.jpg th_ssw_i05.jpg

    The more rings you have, the bigger the Insta-shield is. There's currently no maximum.

    Thoughts?

    Also, I'd like to ask again, does anyone think that Sonic is too small or that the plants are too big? I need another opinion.

×
×
  • Create New...