What I did today

I published my first app today ;D. find it here-> Tura It is VERY simple to play. I hope you guys enjoy it.

Prepping for the Canada Wide Science fair… I’ve finished my 5-page paper, the computer is built, everything is weighed to be transported through plane, and I’ve been working sleeplessly on the project board. There’s around seven days left until my flight. ;D

https://scontent-iad.xx.fbcdn.net/hphotos-xap1/t31.0-8/11059738_840677016025593_8503380945927844925_o.png?dl=1

I have no idea if I can actually use FB photos like this.

I made a Spinner widget! Because I was afraid of Swing and whatever AWT uses! I made my own! I also make many other things, like poor decisions!

That really sucks man… I’m sorry about that. I hope you’re feeling better, that must’ve been a pretty tough blow.

Thanks. Seems like the apartment’s mostly okay, and it doesn’t look like all hope is out for the summer job, although it won’t be what I expected and it seems like it’s not as much as it initially was. Well, better than nothing…

As long as you’ve got some source of income, you’ll be fairly better off than a lot of other people. I’m sure there are plenty of jobs available for programmers though, especially talented ones?

Finally found time to do some programming :slight_smile:
Created a working (but featureless ;c ) raycast renderer:

And a copy of Conway’s Game of life:

If you really want to try them here are the links:
DoomTest.jar (Left Right Up Down - move, zx - look)
GameOfLife.jar (space-run, as - increase/decrease step time, mouse-draw)

My only income is student aid, and I don’t get that during the summer. The problem is that I declined my previous summer job to get that one… Luckily it seems like not all hope is lost with the new one, although it seems like it’ll be a different task than what I had in mind.

I tried (and achieved) doing multi-threaded application using GLFW (My OO wrapper for GLFW actually).

This uses immediate mode mainly since it is a test, but the other tests are indeed modern GL. Will soon update this one. Source code is available here: GLFWMultiThreadTest.java

Bought a Windows Phone to test out and see if I like WP. Also probably going to get into developing apps for it if I actually do end up upgrading my current phone to a WP, which could be fun! I also have been working at getting my internship pretty hard, hopefully I’ll know here in a few days.

Did some nice thread profiling of WSW.

Without threading (off the charts!):

With threading:

Task details:

Red, green blue (x4 or x5) are physics updates. We do 250 updates per second to get good collision detection, so multiple ones are done for each frame rendered.

  • Red is the first threaded pass, where the position is updated based on velocity and then body-ground collisions are solved.
  • Green is the second pass where body-body collisions and body-triangle collisions are solved.
  • Blue is the third pass where body-ground collisions are solved again to eliminate any risk of falling through the ground (working on eliminating this).
  • Lastly, there’s a fourth pass (white) which is so fast it’s not visible. It’s a single-threaded task which updates the body data structure in a thread-safe manner, but since it only processes bodies that actually need updating (checked in pass 4), it’s almost instant.

The last tasks are for the rendering of the game.

  • Purple is actually part of the physics engine. It interpolates transforms for each body so the instance gets a properly interpolated matrix (allowing >250 FPS and reducing stutter at <250 FPS).
  • Then there’s a gap, which comes from updating some rendering data (updating the animation frame of all 3D models, the camera) which is single-threaded in this threading program.
  • Yellow (single-threaded) is the light culling. It’s fast so no real need to thread it.
  • Brown is 3D model ā€œresettingā€ which prepares the 3D models for being culled by updating their bounding box. It also handles instance ID handling for SRAA.
  • Black is shadowed light matrix generation, which generates views for shadow maps to be rendered.
  • Reddish (single-threaded) is octree generation for model culling.
  • Light blue is terrain culling. It determines what terrain ā€œtilesā€ are visible and constructs instance lists for each view (each light in that scene has 6 shadow maps which are also handled here).
  • Pinkish is model culling. Constructs instance lists for all views for 3D models.
  • Dark blue is terrain tile data packing in VBOs (an invisible green task maps the VBO after culling is done).
  • Red is model skeleton calculation and VBO uploading of instance data and visibility data for each view.
    ( - Last blue task is a rogue tile data packing subtask.)
  • Finally, the last black task (running on the top OpenGL thread) sends off all draw calls for the entire scene to the driver’s internal thread.

There are some other tasks too but they are too fast/simple to mention (3 buffer mapping and 3 buffer unmapping tasks)

1 thread: 14 FPS
8 threads: 48 FPS (Fraps screwed up the FPS in the screenshot…)
= 3.43x scaling on a quad core with Hyper-threading. Quite good considering all the draw calls are single-threaded due to how OpenGL works and the driver only has 1 internal thread.

EDIT:
Realized that the skeleton calculation was way too slow. Turns out I was calculating skeletons for instances that eventually were prevented from being rendered due to being LODed out. Added an extra LOD check during culling and the FPS went to 25 with 1 thread and 82 with 8 threads, or 3.28x scaling. Scaling dropped due to a bigger percentage of the frame time being spent in single-threaded parts.

EDIT2:
Turns out I actually got GPU limited after the skeleton animation optimization at 8 threads. Reducing the resolution a bit under 1920x1080 gave me an FPS of 26 with 1 thread and 89 with 8 threads, which equals 3.42x scaling like before!

Finally added the last kind of enemy, an orc:

http://puu.sh/hDdI8/648615c478.jpg

Yet another wonderful ad on JGO.

Hm… all ads are configured to be ā€œSafe for Workā€, I reported the ad to ProjectWonderful. Thanks for the heads up!

Got portals working!!

jCbQDq2ubPg

Found a bug in my test program (not the engine) which switched around the LOD models, so the low-resolution models were being used up close and for distant instances the high-resolution models were used, cutting my FPS by 1/3rd… >___<

::slight_smile: Achieved 150 days of GitHub streak today :o

My GitHub Profile if you’re interested to see. :point:

Woah, that’s cool. The most I’ve gotten is like 5 :stuck_out_tongue:

[offtopic]
Nice (updated) profile pic
[/offtopic]

Congratulations! Now I don’t feel guilty for only contributing one thing for the streak anymore :stuck_out_tongue:

Finally finished all my work for my internship interview, now I just have to await their decision! I’m currently relaxing and not even touching a computer… besides this one. Oops.