The shoutbox is currently out of service. Join us on Discord instead.
You can help CodeWalrus stay online by donating here.

c4's 3D Game Engine [3d][lwjgl][java]

Started by c4ooo, July 22, 2016, 07:40:10 pm

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DJ Omnimaga

There, it works. Thanks :)

As for what it does, I can walk anywhere and only fall down from one corner without walls. I don't fall down if I don't walk over that corner. Is that normal?

c4ooo

July 28, 2016, 08:07:23 am #16 Last Edit: July 28, 2016, 10:06:16 am by c4ooo
Quote from: DJ Omnimaga on July 27, 2016, 05:49:02 pm
There, it works. Thanks :)

As for what it does, I can walk anywhere and only fall down from one corner without walls. I don't fall down if I don't walk over that corner. Is that normal?

Well, coalition is still a bit rusty; the platform has a circular collision hitbox :P

Can you send me a copy of your log.txt (or output.txt, forgot what i called it :P ). It contains some numeric data. BTW, on any of your tries, have you fallen straight through the platform without being able to walk on it?

Major Edit:

Ok, so i practically solved collision. Every face is either a wall or floor tile, and each has a slightly different method of collision. For wall faces i just see if my X vector collides, move X if it doesn't, then same thing for Z. For floor collision, i get a list of faces on which i am standing on (usually just one) and then get the get the height for a particular X,Z on that floor face. So if i set a face as a floor face, i will always be able to walk up it, vs if i set it as a wall i will never be able to walk up it.

Also, all the quads still have a "circular" collision hitbox <_<

DJ Omnimaga


c4ooo

Yes of course. IDK if i explained it well, but walls basically let/hinder your movement left/right/forward/backwards, but ignore Y. Floors force your Y to be the correct Y for your current X/Z. (So yes :) )

DJ Omnimaga

Wait, by ignoring Y, wouldn't slopes cause you to move towards the lower end of the slope but without actually going downwards?

ben_g

Quote from: DJ Omnimaga on July 29, 2016, 04:43:03 pm
Wait, by ignoring Y, wouldn't slopes cause you to move towards the lower end of the slope but without actually going downwards?

Y is the up axis in LWJGL, so what he means is that he calculates the height of the floor at the player's location and just sets the player's height to that value. This means that slopes work, but the (horizontal) speed of the player will always be the same regardless of the slopĂȘ's steepness (so a player would walk up a slope that goes 10m up and 1m forwards in the same time as a flat floor of 1m).

DJ Omnimaga

Oh ok, I thought he was refering to the Y location overall

c4ooo

Ime wondering what to do with the engine. I fear that unless i go for a minimalistic style the graphics/world will be sort of s***. 

DJ Omnimaga

Plain Jump would be cool. It would be better that you start small since you are new to 3D. I think low graphics are fine to start up. Later you could maybe do some sort of 3D Supersonic Ball clone?

Otherwise I don't have much ideas. Maybe a :walrii: maze game with the walruses as 2D sprites like DOOM and you have to find them?

c4ooo

I've implemented .obj model loading :)

Collision detection is still s*** so (for different reasons) so i'll be working on that :)

DJ Omnimaga

Are those space ships? Glad to see models loading working. :)

c4ooo


ben_g

Quote from: c4ooo on August 03, 2016, 09:17:32 am
Lol no its a giant monkey head  ;)


It's a standard mesh in Blender, intended for testing stuff like materials on a relatively complex surface, for those wondering.

DJ Omnimaga

Oh I see. By the way have you made any more progress on the map engine? I also wonder if textures would be easy to add at this point?

c4ooo

Not really, i implemented jumping though. Collision detection is still sort of a mess. (You commonly fall through floors if FPS drops). I'm trying to implement textures right now, but am having problems with paths in blender and some other openGL stuff :(

Powered by EzPortal