What I did today

When the masterpiece is done! In good time :slight_smile:

I think Enums are literally singleton objects so we’d have the same virtual method call overhead. I already tried using the command ID to index into a static list of commands, but it was a tiny bit slower than just storing a command singleton, which makes sense (read object --> call virtual function VS read command ID —> index into array to find object —> call virtual function).

I tried out encoding data to a piece of native memory using MemoryUtil of LWJGL (which uses Unsafe), and got a solid 15% performance boost over using an int[] for the data. That should solve the encoding issue. The only problem now is writing 50+ command encoders and decoders. I’m gonna look into generating those.

Don’t underestimate the power of the JVM when it comes to virtual method dispatch. Or indeed the actual speed of such dispatch. I think you’re worrying about nothing. Design it right for ease of use first and foremost, and worry about whether it’s actually fast enough later. Let’s face it, if you were really, really worried about absolute speed you’d be doing everything in C++ anyway. We use Java coz it’s easy.

Cas :slight_smile:

Enum.ordinal() has got to have absolutely no call overhead at runtime. It is very likely not a virtual/multimorphic call, because you cannot extend enum classes and you statically need to know the enum class you call .ordinal() at at runtime (unless you do it reflectively, of course).
So the JVM knows everything statically at compile time to convert it to a static call or likely just to a single load of a constant when JIT’ting.

I FIXED MY ERRORS!
(floading point math with infinity and such is hard, if you’re doing it for the first time)

Here is the looking down version how it should look like:

And i tried to shoot some rays in such ways that the scene looks perspective, here it is:

I’m happy with these outcomes. The day is still young. I’ll try myself at some shadows next :slight_smile:

(maybe i need some subpixel sampling too?)

I'm really starting to not like floating point errors...

What’s your band called? Do you have a website?

Getting our social media in order, then I’ll share out a link and the name of the band! Want everything to be perfect before I advertise anything. Thanks for the interest :slight_smile:

Nice! Excited to hear it! Here’s my band if you wanna take a listen: www.hardkissband.com

Implemented some cool looking lighting and shadows. They are mapped onto what I call “Polygon Specific Textures” (PST) which are essentially textures that are large enough to be perfectly mapped onto a polygon. (The cool thing is, you can write out all these PSTs into image files and edit them and load them back into the engine to make your own custom per-polygon texture). The lighting is all precalculated so moving shadows are not possible (also not practical because this is a software engine).

The red cubes are the light sources.

The scene, demonstrating the lighting and shadows without textures.

The same scene with textures (the textures are not mine)

i apologize if these images are too large haha

Cool screenshots, but 41fps seems kind of low, considering the amount of geometry and aa missing

which gpu do you have?

Looks nice @Archive ! sources?

41fps is what my engine caps the fps to because that is the best framerate I can get while keeping the CPU load at the minimum.

this isn’t a hardware renderer :wink:

Then it’s great :slight_smile:

Why did you go software?

Added mouse over events to the Vangard GUI, and simplified my code to identify clicked elements from 150 lines of fragile code to 10 lines of robust code. The UI feels much more polished with some element highlighting and mouseOver texts.

Also, I (re)invented triple buffering :slight_smile:

I like working on the math behind rasterization, lighting, etc haha

Nothing so fancy as software renderers, but I made teeny tiny steps and connected mouse clicks to entities in Vangard. Interactivity has arrived!

`

clicked a Hovel

clicked a Human

clicked a Human

clicked a Human

clicked a Apple

clicked a Hovel

clicked a Hovel

clicked a Hovel

clicked a Hovel

`

Also, as the first bit of prime time genuine player mechanic, players can now go to a market and buy items!

Decided to run my game for a while. Hadn’t made any changes at all.

Pictured: Nothing intended to happen whatsoever.

Found out my Vangard thread is blocked because I have several consecutive posts from me. Can someone post a comment on that thread so I can post a link to a new demo JAR tomorrow?

I have got buying, selling, storage working for the player character! And the user interface is overhauled with minimaps, smart lists, sliders, carousels and much much more. New social rankings have been added (Most Wise and Most Despicable).

Made another game mockup this weekend, sorta based off hyper light drifters style (great game). I also gave in and made a twitter account, where ill probably post various other pixel art and game dev stuff.

This was sorta a warm up for Ludum dare next week too.
edit: image seems to have darkened ?
edit edit: fixed :slight_smile:

Tried updating my libgdx projects to lwjgl3, found out they hid all my fun hacky methods such as overriding how runnables are executed to alter music pitch so I reverted.

I didn’t need multi-window support thaaaat badly… Although stock music pitch support would be excellent.