What I did today

@SHC
And it wouldn’t be Microsoft if the loading bar wasn’t at 20% while the dl-size is at 104% and the downspeed isn’t even shown ;D

Was thinking about it, but it’s far cheaper here.

Started rewriting my entire graphics engine , to be perfectly honest the previous one was pretty shoddy now looking at it. For the things I wanted to do it had too much overhead and required lots of micromanagement by the above programs. I have designed my new one to be much simpler to use with the core graphics handler class dealing directly with the openGL side of things and the renderer class dealing with with the graphics handler , interactions between world objects and the conversion of world coordinates to screen coordinates all with minimal input from the higher level classes. It has limitations in that it will only render squares ( tile based game so it doesn’t make too much difference to the total function ) , the renderer can handle a maximum number of objects before it just starts declining them however this will always be precalculated by the world so that if it does happen something has probably gone wrong. All of the graphics handler is extendable up to the limit of the system though so it should work just fine for that , it’s also made so that all my previous code will not require too much modification and if anything should become a lot simpler than previous especially in terms of memory efficiency which was my previous issue.

The graphics handler is the only class that will deal with floatbuffers and because of this memory leaks will hopefully be non existant , this class also directly deal with all of the vbo’s and because of this no other classes are required to have a cleanup method.

Learning raymarching again as when I first messed with it I didn’t bother to go through and understand the math - it’s really fun. I like math. I managed to implement hard shadows and reflections by myself (although they’re both a little off and not exactly correct). It looks decent at least imo. But I doubt the lighting is anywhere near accurate.

https://www.shadertoy.com/view/llcGDB

And I’ve got to share this, I think my therapist and I found good meds for me and I’m feeling really really great, haven’t felt this happy in years. Life is going really well now. I feel happy and good about things, being really optimistic which was becoming too irregular. :slight_smile:

It is so much better to have tried, and learned from the process, than done nothing at all.

And then try again and fail because you can’t write GLSL XD.

Ahah I’m not surprised, it’s terribly inefficient code! All for the learning

To resolve some sound smoothness issues in Vangard I did some analysis of the times logic frames are taking. On average they take 20ms on my laptop with a target of 30fps, so the frame times looked ok. However I then counted the logic frames for each logic frame duration and found that although the vast majority were 16ms or less, 10% of the frames were over 33ms, so the CPU was spending a lot of time at full utilization on all cores.

I don’t know how solveable the issue is. some of the spikes are probably due to my code, GC and so on, but sometimes the PC just has to do other stuff and with the CPU almost fully utilized by the game only bad things can happen.

For now i have simply provided a parameter to control world size. My laptop seems happy with 36km2, while I guess my fancy desktop can handle the original 100km2.

Did two major things today.

First I wrote a small Blender plugin for exporting meshes as files for our engine. It’s not complete yet, but is fully usable with static (unanimated) meshes so far.

Secondly, I finally, after something like 2 years, managed to get perfect normal mapping working. When I initially researched normal mapping a long time ago, I settled with the algorithm that was the easiest to implement. I found a super convenient algorithm that didn’t require tangents or bitangents, so I went with that. However, there were always some subtle problems. For handmade normal maps that were just made to add details/unevenness to the normal it worked well, but for baked normal maps (normal maps generated from a high-poly model applied to a low-poly model) it didn’t give good results because those baked normal maps relied on the engine doing the exact same calculations as the generator did. As a test model, I used a simple cube with smoothed normals (as if it was a sphere essentially) which had a normal map applied to it to make the flat areas, well, flat while keeping some smoothing around the edges of the cube. This was one of the worst cast scenarios, as it relied on that the gradients in the normal map exactly cancelled out the smoothed normals. Even an extremely tiny error there was enough to cause a high-specular surface to look wobbly and uneven.

Here’s the cube without a normal map:

Here’s the cube with a baked normal map using the old tangent-less algorithm:

Here’s the cube with the same normal map using the new correct algorithm:

Ehhhh let’s just call it a slight improvement, shall we?

Speaking of normals. http://blog.selfshadow.com/publications/blending-in-detail/

Got a 3D low-poly character with an armature! Built it in 20 minutes initially, but it took 3 days for the weights to be properly applied.

If you’re using Blender you should check out rigify for humanoid models.

As for what I did today: I finally got around to implementing a entity system and it works with my physics engine!

Also, I changed from my own math lib to JOML. This took FOREVER, and I’m still not completely done.

Got my new renderer working and my god it is so much simpler to use , GUI’s and stuff are still a bit of a challenge requiring a seperate set of buffer storage. It would be great to know how people usually handle modular layering.

I got some good debugging done for something I’m calling an “Allenspace Sound Generator”. It makes a continuous, spacey collection of sine waves, with some controls for the generation rate, the envelopes, the number of tones per cluster and basic pitch spread and pan spread. There is also a weird gizmo called a “flibber” which basically intermixes tracks rather than mixing them. This gizmo was an attempt to recreate a faulty version made unintentionally that had some bizarre multi-threading issues and is very glitchy sounding.

At this point the GUI is totally placeholder, making use of a single slider tool that only shows a label and outputs a normal (0…1). AND IT HAS NOT BEEN GIVEN MUCH TESTING and will crash (turn non-functional) if you just hit “Start” without moving ALL the sliders first. If you want to give it a try, I recommend first putting all the sliders near the middle and working from there. Or wait until I figure out a reasonable GUI.
GUI is now more informative if not particularly friendly. Now has reasonable initial settings so can just hit play and get something. One highly intermittent known bug remains, though.

http://www.java-gaming.org/user-generated-content/members/27722/allenspace.jar

I am a bit fried and will give it the GUI more work as a side priority over the next week or two, probably. It potentially could also be run from the jar via an api, if you have a need for some spacey atmospherics.

Sounds pretty cool: get two running at the same time, and have one “flibber” and the other straight. I want to expose some controls over the “flibber” parameters, and investigate adding various forms of lfo modulation to the sines.

Did some research on freesound.org, for rain and wind-in-trees, for candidates effects to use in Vangard. I think I have found a couple improvements over the first wind-in-trees attempt. In the next while, I’ll be expanding the api to allow ags1 to directly trigger audio events that are part of the sound-scapes. Right now she can only manipulate the volumes, not the trigger events or control the stochastic timing algos. A future api will allow the ability to control the stochastic timings as well. For the first pass (built over the last few weeks), I just wanted to get something that would work, sound decent, and could be a placeholder for a while. (The jar is 1MB and runs solo at about 1% cpu on my PC.)

So what I really wanted to get to today was this:

downloaded LWJGL
set up a project in Eclipse
got the red block “HelloWorld” program to run (with some fussing, trying to figure out what they meant when referring to “your natives” and how to specify launch arguments which I hadn’t done before)

The hello world program didn’t run on my laptop (GLFW_API_UNAVAILABLE error. but it IS running on my desktop. Yay!

Also gathered up locations of documents for study including an example of audio playback via OpenAL. The goal is to be able to output my audio over OpenAL, via LWJGL.

I’ve spent the last couple of lunchtimes building up a little village generator:

Currently it builds a grid, puts down some random trees and one instance of each building type, and then adds random roads. Next steps are add more organized town planning and then connect up the roads.

Are we allowed to talk about modeling shenanigans? I learned to model about three weeks ago, here’s my third model for me and theagentd’s secret project we’ll be unveiling soon (it’s almost finished!). I think it came out cool.

I actually made his aforementioned patented TESTCUBE™ for his normal tests too. Since I learned to model, we’ve been a lot more robust and faster with our developments.

That sounds really neat, I’ve been wanting to get into audio for a little while now. I’ve always wondered, how do you take the audio data you generate and actually use it and output a sound? Is there something in the Java SDK that allows you to create sound from custom data?

Yes. The standard “java way” is to use javax.sound.sampled.Clip or javax.sound.SourceDataLine for output of .wav files. But with SourceDataLine, you don’t have to use a wav as the source, but can feed it your own sound data.

I’m happy to get into specifics or answer questions, but they are probably best put on the Sound/Audio thread. Or feel free to message me.

Ah, I thought it would be something like that. I’ll do a bit of my own research and maybe start a new little project. Thanks! :slight_smile:

Added dithering as an alternative to bilinear texture filtering! Zoom in the picture to see what im talking about :slight_smile:
basil_ introduced me to this by showing me a picture of it in action in Unreal Engine 1 and so I finally got around to implementing it :stuck_out_tongue: