What I did today

Sticking to 2 for now until LWJGL3 moves at least to beta. I can’t keep on shifting the goalposts or I’ll never get this bloody game done.
I’ve fixed all the horribly static-ridden code in the libgdx vecmath package with ThreadLocals but I have no idea how to submit a patch or anything. Or even why it was done with statics in the first place (don’t you guys use threads!?)

Cas :slight_smile:

ThreadLocals have quite an impact on performance. Whether that is relevant to your use is another matter :slight_smile:

For LibStruct I wrote this hacky, yet super fast workaround:


(see .get() / .set(…))

It certainly is relevant… I need to transform about 30,000 sprites’ vertices by each sprite’s matrix and write the results out to VBOs - I spend a lot of time doing Matrix4.mul() via various routes. I’ll see if that helps.

Cas :slight_smile:

@Riven
Would inflate memory usage a little bit, but multiplying/dividing by some factor (>= 8) to index into the threadid2value array might improve performance under contention by eliminating false sharing. I would expect it to be faster anyway.

EDIT: if/when writes are occuring

@BurntPizza: In LibStruct I mainly use .initialValue() and .get(), so it’s pretty much read-only, which means contention is not an issue. Feel free to benchmark / optimize for your use case.

@Cas: FastThreadLocal instances are rather memory hungry, so I’d advice you to make only 1 FastThreadLocal with a pointer to some class that holds all your (previously static) references to ‘scratch’ objects.


myFastTL.get().vec3tmp.x += 4.1f;
myFastTL.get().mat4tmp.m33 += 4.2f;

A good plan.

Cas :slight_smile:

Found out Tom Forsyth agrees with me about the value of unit-tests:

I’m glad that I’m not the only one who thinks TDD is a hilariously poor methodology.

Cas :slight_smile:

You’re not the only one

ME <-----

Kev

Of course TDD is rubbish, but it is less rubbish than the alternative. My tests regularly catch errors and regressions, and writing the tests improves the initial code too.

Now, what would you say the alternative was? (I notice you used the singular)

Cas :slight_smile:

Either you test, or you don’t. It’s a boolean! (I know there are many different ways of not testing, but all of those are compatible with testing too).

This will rapidly devolve into an “exciting thread” so I shall make a new one! :point:

Cas :slight_smile:

Kopied the kinda popular game “Dont touch the Spikes!”.

Implemented in haskell using my libs and a tiny little bit of FRP.
(Code: https://github.com/matheus23/DontTouchTheSpikesHaskell)

Got my new SSD in, and installed ubuntu. I can’t play space engineers, but I’m learning allot about linux. :smiley:

Also got a Rosewill THOR chassis too… Thing’s huge…

I finally got this on my hackintosh:

A CPU Panic!! Seeing it for the first time in my life! Problem is due to the wrong kernel extension for CPUPowerManagement.

EDIT: As a bonus, I also got my 1 TB HDD completely broken. I can’t see any partitions in it now.

It’s a good bit of fun, isn’t it? (learning Linux). I did similar a few months ago, and haven’t looked back. I was a bit reluctant to take the plunge, but glad I did.

I applied to a volunteer organisation that helps young, disabled and elderly people with little to no IT skills learn how to use computers for everyday use. I will be teaching classes starting next Thursday. Really looking forward to it!

It is though a 7.5 mile cycle from my home to there, then another 7 mile to college afterwards then 8 mile home from college. Yay! Fitness \o/.

I’ve always had bad luck with ubuntu. Mint and centos seems to work better for me.

Finished off upgrading one of the tile sets for a guys roguelike game.