1 (edited by baboon 2017-05-26 08:41:40)

Topic: Help reversing Neverball motion logic

I wonder... would it be too difficult to implement a game mode where the ball would move  because a force was being applied to it rather than tillting the floor? In this game mode basically the camera would remain fixed at a nice wide angled view and the player would move the ball through the scenary by applying a force to it (the ball would gain momentum inertia). The floor would remain fixed. Would this be difficult to implement? What would it take? Which part of the nevercode would you start poking?

2 (edited by baboon 2017-05-25 23:52:27)

Re: Help reversing Neverball motion logic

Getting there! I have managed to stop the perceived tilting of the floor:

Line 153 and154 of code in game_draw.c:

    glRotatef(-tilt->rz * d, tilt->z[0], tilt->z[1], tilt->z[2]);
    glRotatef(-tilt->rx * d, tilt->x[0], tilt->x[1], tilt->x[2]);

need to be changed into

    glRotatef(-tilt->rz * d, 0, 0, 0);
    glRotatef(-tilt->rx * d, 0, 0, 0);

For me, the game is better now. The tilting of the floor gives me nausea and now it feels like you are appling a force to the ball to make it move. Now I just need to find a way of putting the view camera fixed in variety of corner(s) with a wide angle view. Any ideas on how to do this?

It would be great to feature this game mode in Neverball options menu.

3

Re: Help reversing Neverball motion logic

I find this idea interesting smile

I don't know anything about the Neverball code though, so I hope that somebody else can help you.

4 (edited by baboon 2017-05-25 23:58:13)

Re: Help reversing Neverball motion logic

Thanks GunChleoc!

I've been poking the nevercode and, so far, this is the best i came up with:

change lines 152, 153 and 154 of the code in the game_draw.c:

    glRotatef(0.0f, tilt->z[0], tilt->z[1], 0);
    glRotatef(0.0f, 0, tilt->x[1], tilt->x[2]);
    glTranslatef(-ball_p[0], -ball_p[1] * d - 1.0, -ball_p[2] - 2.0);

This not perfect but does give an idea of what we're trying to achieve here!

It would be good if we could tilt the camera view angle, or change to an arbitrary direction to which the camera is pointing. Does anyone know where in the nevercode the camera view rotation is implemented?