1. Post #1441
    Dennab
    July 2009
    12,246 Posts
    Experiencing a weird weird error where if I fly in a few directions, this happens:

    The seams are fixed once I place/remove a block(forcing the mesh to regenerate)
    I can't for the life of me find out why its happening though. Debugged it top to bottom and still can't find out what is causing it.

    That's the point. It's the same algorithm except that you don't run it per pixel.
    Why do you think I'm running it per pixel? Used http://www.cse.yorku.ca/~amana/research/grid.pdf -- seems that it'd be much cheaper to do that then to render, hang the GPU waiting for a pixel response and then picking from that.
    Reply With Quote Edit / Delete Windows 10 Firefox United States Show Events

  2. Post #1442
    Gold Member
    Tamschi's Avatar
    December 2009
    8,615 Posts
    Why do you think I'm running it per pixel? Used http://www.cse.yorku.ca/~amana/research/grid.pdf -- seems that it'd be much cheaper to do that then to render, hang the GPU waiting for a pixel response and then picking from that.
    ...exactly? That's why I say you should look up ray marching. It's not a rendering technique by itself, just a more efficient ray trace for cube grid data.

    Edited:

    The paper you just linked is exactly what's commonly known as ray marching.
    Reply With Quote Edit / Delete Windows 10 Firefox Germany Show Events

  3. Post #1443
    Dennab
    July 2009
    12,246 Posts
    ...exactly? That's why I say you should look up ray marching. It's not a rendering technique by itself, just a more efficient ray trace for cube grid data.

    Edited:

    The paper you just linked is exactly what's commonly known as ray marching.
    I was confused, thought you meant like what treb was suggesting. Take that science!!
    Reply With Quote Edit / Delete Windows 10 Firefox United States Show Events

  4. Post #1444
    Gold Member
    paindoc's Avatar
    March 2009
    9,263 Posts
    Every time I see voxels I think of this vid
    10 bytes per triangle wait what
    Reply With Quote Edit / Delete Windows 10 Chrome United States Show Events Agree Agree x 1 (list)

  5. Post #1445
    Gold Member
    Dennab
    December 2008
    6,828 Posts
    Just released another update for my game GIBZ today. Added some more content as well as some stuff people were asking for such as female playable characters. Did a lot of drawing for this update.

    Make your character's gender tied to your steamid

    Edited:

    Working on genetic algorithms in C.

    Supply a function in javascript through stdargs so that the program can find the optimum of any continuous function in some range
    Reply With Quote Edit / Delete Windows 7 Chrome United States Show Events Funny Funny x 1Disagree Disagree x 1 (list)

  6. Post #1446
    Dennab
    July 2009
    12,246 Posts
    10 bytes per triangle wait what
    He uses color tables and IIRC calculates the UVs in the shader.

    Edited:

    Anyone have any good resources for simple AABB/voxel collisions?
    Reply With Quote Edit / Delete Windows 10 Firefox United States Show Events

  7. Post #1447
    Gold Member
    Tamschi's Avatar
    December 2009
    8,615 Posts
    10 bytes per triangle wait what
    There's really good documentation, so here's the render mode overview: https://github.com/nothings/stb/blob...render.h#L1245

    Edited:

    Anyone have any good resources for simple AABB/voxel collisions?
    You can round the edges of the AABB to be larger (meaning that they point to the block they're in), then check against the inner cubes of the boundaries, so for example:
    Code:
    var x0 = floor(x);
    if (cubes[x0] && !cubes[x0+1]) x += restFrac(x); // Make sure it's really a boundary. restFrac gives 1 - the fractional part.
    else
    {
        var xMax = x + xWidth;
        var x1 = floor(xMax);
        if (cubes[x1] && !cubes[x1-1]) x -= frac(xMax); // Gives the fractional part.
    }
    It's not _perfectly_ symmetric, but it should be close enough. In dimensions higher than 1D you have to apply this tiled for each face, with a loop
    Code:
    for (var y_ = y0; y_ <= y1; y_++)
    for (var z_ = z0; z_ <= z1; z_++)
    for example. You should cache all the bounding values beforehand of course.

    That said, this code is only for plain grids and I'm just making it up here.

    Edited: Fixed upper bound collision code.
    Reply With Quote Edit / Delete Windows 10 Firefox Germany Show Events

  8. Post #1448
    Dennab
    July 2009
    12,246 Posts
    I'm planning for each entity to have an AABB(mins/maxs of xyz) in local space(eg, 0,0,0 1,1,1). The thing is, plain AABB is easy but then you have the problem with when you move too fast you're able to move through blocks; thats what I'm trying to work around.

    Edited:

    How terrible of an idea would it be, to calculate physics, have my world object generate a list of cubes within an AABB as a vector?

    Edited:

    Either I'm overcomplicating this a ton or this is oddly difficult.
    Reply With Quote Edit / Delete Windows 10 Firefox United States Show Events

  9. Post #1449
    I'm planning for each entity to have an AABB(mins/maxs of xyz) in local space(eg, 0,0,0 1,1,1). The thing is, plain AABB is easy but then you have the problem with when you move too fast you're able to move through blocks; thats what I'm trying to work around.

    Edited:

    How terrible of an idea would it be, to calculate physics, have my world object generate a list of cubes within an AABB as a vector?

    Edited:

    Either I'm overcomplicating this a ton or this is oddly difficult.
    Add substepping for fast moving objects, it's the easiest solution without having to do continuous collision detection which in comparison is a lot more complicated.
    Reply With Quote Edit / Delete Windows 10 Chrome Netherlands Show Events Agree Agree x 1 (list)

  10. Post #1450
    The TRUE Holly
    nutcake's Avatar
    August 2008
    2,520 Posts
    How to make a Voxel engine:

    Step 1) Render a cube



    Nice.

    Step 2) Do that a lot



    Perfect.


    My brain is not made for three dimensions.
    Reply With Quote Edit / Delete Linux Chrome Switzerland Show Events Funny Funny x 8Programming King Programming King x 2Artistic Artistic x 1 (list)

  11. Post #1451
    Hi.
    reevezy67's Avatar
    July 2011
    5,254 Posts
    I missed this forum, the web dev forum is so boring.
    Reply With Quote Edit / Delete Windows 10 Chrome Australia Show Events Funny Funny x 9Agree Agree x 2 (list)

  12. Post #1452
    johnnyaka's Avatar
    January 2012
    469 Posts
    I missed this forum, the web dev forum is so boring.
    After this sentence, Don't you ever dare to come back to the web dev section ...
    Reply With Quote Edit / Delete Android Chrome Germany Show Events Funny Funny x 12 (list)

  13. Post #1453
    Gold Member
    Zelpa's Avatar
    December 2011
    958 Posts
    I missed this forum, the web dev forum is so boring.
    the webdev waywo guys rate me dumb :( at least you guys rate me programming king ironically.
    Reply With Quote Edit / Delete Windows 7 Firefox Australia Show Events Programming King Programming King x 25 (list)

  14. Post #1454
    Gold Member
    BlkDucky's Avatar
    May 2008
    6,162 Posts
    I missed this forum, the web dev forum is so boring.
    web dev is lame
    Reply With Quote Edit / Delete Windows 10 Chrome United Kingdom Show Events Agree Agree x 18Disagree Disagree x 2Programming King Programming King x 1 (list)

  15. Post #1455
    Hi.
    reevezy67's Avatar
    July 2011
    5,254 Posts
    Why is it lame? You can do 3D and shit on the web now too, I'm writing a realtime multiplayer card game.

    I've gotten past the annoying tools, Typescript helps.
    Reply With Quote Edit / Delete Windows 10 Chrome Australia Show Events Programming King Programming King x 2Informative Informative x 1Winner Winner x 1 (list)

  16. Post #1456
    Gold Member
    Falcqn's Avatar
    July 2010
    3,106 Posts
    So I made a tiny little library in Lua to make doing the stats and tests for dice n stuff for a tabletop game I'm making quicker and easier.
    Reply With Quote Edit / Delete Windows 10 Chrome United Kingdom Show Events

  17. Post #1457
    Dennab
    July 2009
    12,246 Posts
    Add substepping for fast moving objects, it's the easiest solution without having to do continuous collision detection which in comparison is a lot more complicated.
    Substepping is so unfuturistic~
    Sweeping is also that much harder. I might end up going with simply stepping for sanity's sake.
    Reply With Quote Edit / Delete Windows 10 Firefox United States Show Events

  18. Post #1458
    Gold Member
    Dennab
    December 2008
    6,828 Posts
    I missed this forum, the web dev forum is so boring.
    I like this thread because there's so much positivity. Not that I'm complaining about the constructive criticism in web dev, but posting something here is like "Wow! That's so awesome! You're awesome! You did a great job and should be super proud of yourself!"

    posting in web dev is like "cool. Your padding sucks, your fonts suck, your color scheme is shit, you're ugly and your mother dresses you funny"
    Reply With Quote Edit / Delete Windows 7 Chrome United States Show Events Funny Funny x 17 (list)

  19. Post #1459
    Dennab
    July 2009
    12,246 Posts
    I like this thread because there's so much positivity. Not that I'm complaining about the constructive criticism in web dev, but posting something here is like "Wow! That's so awesome! You're awesome! You did a great job and should be super proud of yourself!"

    posting in web dev is like "cool. Your padding sucks, your fonts suck, your color scheme is shit, you're ugly and your mother dresses you funny"
    tacky post, try again

    Edited:

    please use proper html in your posts next time
    Reply With Quote Edit / Delete Windows 10 Firefox United States Show Events Funny Funny x 12Agree Agree x 2 (list)

  20. Post #1460
    Pappschachtel's Avatar
    January 2014
    330 Posts
    is there a reliable way to messure let's say "average time needed to render a frame" on android ?
    I use a real device but it outputs what ever it wants ...
    run 200 sprites per frame and get output A
    run 200 sprites per frame again get output B
    run 100 sprites per frame get output A ...
    A < B

    i am confused...
    probably the phone downclocks cpu and gpu cause it gets hot ...
    Reply With Quote Edit / Delete Windows 10 Chrome Germany Show Events

  21. Post #1461
    Ott
    Gold Member
    Ott's Avatar
    June 2012
    6,625 Posts
    Reply With Quote Edit / Delete THIS BUG NEEDS FIXING, BUT I DONT KNOW WHAT CAUSES IT, SO SHUT UP AND STOP POSTING ABOUT IT. Thanks. United States Show Events Funny Funny x 31Agree Agree x 1 (list)

  22. Post #1462
    Dennab
    September 2016
    7 Posts
    Hello!

    I'm new to this forum. And was told about it by a friend that I could show off work here and take ideas from other people.

    Well, thats exactly what I need.

    I started a 3d game engine last night called "Keplar Engine". It will be cross platform and is coded in C++, OpenGL / SDL.

    Its been a great project.

    I coded ~1500 lines last night. I was really in the zone. I got terrain working (you can load terrain from a heightmap, the engine will read the heightmap then generate the terrain, I got a vector3 library working, I got camera partially working, and I got skybox working.) So quite a lot done last night.

    Heres what it looks like atm



    Its a WIP, I'm going to texture the terrain later on.

    All suggestions of what I can do to this engine are welcome! I love coding! :)

    - 0xDEADBEEF

    Happy coding

    (User was permabanned for this post ("Alt of permabanned user: Verideth" - layla))
    Reply With Quote Edit / Delete Windows 10 Chrome United States Show Events Winner Winner x 13Funny Funny x 2Artistic Artistic x 1 (list)

  23. Post #1463
    Click for bunny <3
    MattJeanes's Avatar
    September 2010
    1,475 Posts
    One of the best first posts I've seen on this forum - just one tip though, no need to sign your post - your username is already next to it. For one night of work that looks really impressive too - cool stuff!
    Reply With Quote Edit / Delete Windows 10 Chrome United Kingdom Show Events Agree Agree x 7 (list)

  24. Post #1464
    Dennab
    September 2016
    7 Posts
    One of the best first posts I've seen on this forum - just one tip though, no need to sign your post - your username is already next to it. For one night of work that looks really impressive too - cool stuff!
    Thanks!

    I'll keep that in mind :)
    Reply With Quote Edit / Delete Windows 10 Chrome United States Show Events

  25. Post #1465
    Dennab
    July 2009
    12,246 Posts
    Hello!

    I'm new to this forum. And was told about it by a friend that I could show off work here and take ideas from other people.

    Well, thats exactly what I need.

    I started a 3d game engine last night called "Keplar Engine". It will be cross platform and is coded in C++, OpenGL / SDL.

    Its been a great project.

    I coded ~1500 lines last night. I was really in the zone. I got terrain working (you can load terrain from a heightmap, the engine will read the heightmap then generate the terrain, I got a vector3 library working, I got camera partially working, and I got skybox working.) So quite a lot done last night.

    Heres what it looks like atm

    Its a WIP, I'm going to texture the terrain later on.

    All suggestions of what I can do to this engine are welcome! I love coding! :)

    - 0xDEADBEEF

    Happy coding
    More 3D? Yes please

    Edited:

    Experiencing a weird weird error where if I fly in a few directions, this happens:
    Well I fixed this problem by binding my VAO in a different order. Not sure why, might be an Intel issue, but it fixed it so not complaining
    Reply With Quote Edit / Delete Windows 10 Firefox United States Show Events

  26. Post #1466
    Gold Member
    /dev/sda1's Avatar
    March 2012
    1,119 Posts
    One of the best first posts I've seen on this forum - just one tip though, no need to sign your post - your username is already next to it. For one night of work that looks really impressive too - cool stuff!
    its not his first post, its just yet another verideth alt
    Reply With Quote Edit / Delete Windows 10 Chrome United States Show Events Funny Funny x 19Agree Agree x 1Winner Winner x 1Zing Zing x 1 (list)

  27. Post #1467
    Fourier's Avatar
    July 2014
    4,001 Posts
    Why is it lame? You can do 3D and shit on the web now too, I'm writing a realtime multiplayer card game.

    I've gotten past the annoying tools, Typescript helps.
    Typescript is sweet.

    Edited:

    Our team just won at Slovenian Game Conference with game Floatlands. I feel sweet after a long time .
    Reply With Quote Edit / Delete Windows 8 Chrome Slovenia Show Events Winner Winner x 2Agree Agree x 2 (list)

  28. Post #1468
    The TRUE Holly
    nutcake's Avatar
    August 2008
    2,520 Posts
    Thanks!

    I'll keep that in mind :)
    Also, many people on FP are cynical assholes, so it's better to be passive and watch how the people here 'work' before posting in other parts of the forums.

    Very nice work with your engine tho. Is it based on any kind of graphics library or are you making it completely from scratch?
    Reply With Quote Edit / Delete Linux Chrome Germany Show Events

  29. Post #1469
    Dennab
    September 2016
    7 Posts
    Also, many people on FP are cynical assholes, so it's better to be passive and watch how the people here 'work' before posting in other parts of the forums.

    Very nice work with your engine tho. Is it based on any kind of graphics library or are you making it completely from scratch?
    I'm making the whole engine from scratch.

    I'm using OpenGL and SDL
    Reply With Quote Edit / Delete Windows 10 Chrome United States Show Events Winner Winner x 2 (list)

  30. Post #1470
    Dennab
    July 2009
    12,246 Posts
    Have some voxels

    (ignore the mipmap errors pls thx)

    I'm making the whole engine from scratch.

    I'm using OpenGL and SDL
    Whats your vertex attribute format since thats the new trend apparently?
    Reply With Quote Edit / Delete Windows 10 Firefox United States Show Events Winner Winner x 5Late Late x 1 (list)

  31. Post #1471
    MrSpore's Avatar
    March 2015
    37 Posts
    Very impressive for a single night for the engine, great job.
    Reply With Quote Edit / Delete Windows 10 Firefox United States Show Events Agree Agree x 2 (list)

  32. Post #1472
    Dennab
    September 2016
    7 Posts
    Hey guys, I've been running my game engine on a toaster. So my FPS is quite bad. But I'd still expect this computer to be able to run it (tho it can't run games like League of Legends, even at the lowest settings).

    Can someone be kind and benchmark it for me then tell me how their performance was? On this toaster I'm getting ~25 - 30 fps.

    Please tell me your specs as well.
    Reply With Quote Edit / Delete Windows 10 Chrome United States Show Events

  33. Post #1473
    Dennab
    July 2009
    12,246 Posts
    Looks like you're using deprecated OpenGL. You should target at least 3.3 -- no immediate mode but much better performance.

    Edited:

    In addition, I'd heavily recommend GLM, a tried and true GL math library.
    Reply With Quote Edit / Delete Windows 10 Firefox United States Show Events Agree Agree x 2 (list)

  34. Post #1474
    Gold Member
    helifreak's Avatar
    May 2011
    7,217 Posts
    I'd recommend not locking the FPS to 30 if you want benchmarks.
    Reply With Quote Edit / Delete Windows 10 Waterfox Australia Show Events

  35. Post #1475

    May 2014
    562 Posts
    Yeah, it appears to be locked at 30 FPS for me too. Also, I'm not sure if this is intended, but the terrain is all stark white. In your screenshot there seems to be some shadow.
    Reply With Quote Edit / Delete Windows 10 Chrome United States Show Events

  36. Post #1476
    Dennab
    September 2016
    7 Posts
    Looks like you're using deprecated OpenGL. You should target at least 3.3 -- no immediate mode but much better performance.

    Edited:

    In addition, I'd heavily recommend GLM, a tried and true GL math library.
    Yeah, I was using deprecated OpenGL for some things.

    Edited:

    Oh my god, sorry guys. I made FPS locked in that version. I'll upload a new one

    Edited:

    New updated version. Sorry bout that haha

    I decided to add textures to terrain, @roastchicken it might be easier to see the terrain now.

    Edited:

    Yeah, it appears to be locked at 30 FPS for me too. Also, I'm not sure if this is intended, but the terrain is all stark white. In your screenshot there seems to be some shadow.
    Yeah I had lighting I removed it tho for some testing reasons. Forgot to reimplement it back.
    Reply With Quote Edit / Delete Windows 10 Chrome United States Show Events

  37. Post #1477
    Gold Member
    /dev/sda1's Avatar
    March 2012
    1,119 Posts
    whys ya email johncena69@?
    Reply With Quote Edit / Delete Windows 10 Chrome United States Show Events Dumb Dumb x 3 (list)

  38. Post #1478

    May 2014
    562 Posts
    I wasn't able to check the FPS because your application decided to hijack my mouse (it started randomly taking control of the mouse while I was alt-tabbing between it and other applications, eventually taking full control) and then progressively slow down my computer until I had to just hold the power button to force a shutdown because I couldn't even get to Task Manager.

    If some brave soul wishes to test it despite this, I recommend saving all your work and maybe just closing everything else.
    Reply With Quote Edit / Delete Windows 10 Chrome United States Show Events

  39. Post #1479
    Dennab
    September 2016
    7 Posts
    I wasn't able to check the FPS because your application decided to hijack my mouse (it started randomly taking control of the mouse while I was alt-tabbing between it and other applications, eventually taking full control) and then progressively slow down my computer until I had to just hold the power button to force a shutdown because I couldn't even get to Task Manager.

    If some brave soul wishes to test it despite this, I recommend saving all your work and maybe just closing everything else.
    Yeah, its really bad right now.

    Working my hardest to optimize it.
    Reply With Quote Edit / Delete Windows 10 Chrome United States Show Events

  40. Post #1480
    srobins's Avatar
    December 2014
    4,795 Posts
    Sort of off-topic (as usual), but can anybody share their experience applying for internships with Big 5 companies? Is it actually as hard as it seems to get an interview, or will I fare a decent chance so long as I have some good personal projects on my resume?
    Reply With Quote Edit / Delete Windows 10 Chrome United States Show Events