What I did today

Today I worked on getting the walking animation done as well as the idle stuff. Worked on some pixel art and started coding in the inventory system :point:

http://s28.postimg.org/w98us6ofx/javaw_2015_05_27_22_24_17_27.png

The player sprite was made with this really cool online tool! Credit: http://gaurav.munjal.us/Universal-LPC-Spritesheet-Character-Generator/#

Only one hour? So it’s goiing pretty well then!

You haven’t scratched the surface once it works. Especially the MySQL JDBC library is critically bugged and so far off the spec it’s funny.

Well, the issue is that my boss didn’t give me the address to the DB when he gave me the project and then proceeded to disappear for the next two hours. He’s a very hands off guy when it comes to projects, which is actually pretty cool because I feel I learn a lot more when I have to fend for myself. However, I can’t just magically figure out what that DB address is. Oh well, my boss informed me that he’s going to probably have me use some in-house solution to connect to the SQL server anyway, so that will be fun to implement tomorrow.

In the mean time I’ve been learning about ASP.NET which is actually pretty fun and simple. Granted, my UI is just a series of text boxes and labels, but still.

Oh, my uncle also gave me an R9 280x because he had too many GPUs laying around, so I have a new toy to play with! :slight_smile:

Riven: How so? I’ve yet to be able to actually do much with it, so I have no idea what I’m getting in to.

I did some work on the Arena ;D and got a new high score ->

I did this a few weeks ago, but it’s relevant: I added ODBC bindings to a LWJGL 3 fork. Worst-case latency dropped by 10x compared to JDBC (highly optimized app on both ends, with minimal network overhead, so ymmv), there is no unnecessary garbage (query results stored off-heap) and you get actual async queries without spawning extra threads.

JDBC is yet another simplistic Java API that’s good at burning CPU cycles and wasting memory bandwidth for no good reason.

[quote=ā€œRiven,post:2203,topic:49634ā€]
I hate that LWJGL needs to exist, that the JVM does not have a native FFI. Writing bindings is painful and takes a lot of precious time, all for doing… nothing really. But I was motivated after decompiling the JDBC driver we use and seeing the horrors that laid inside. Bad API and bad implementations and everyone’s using this shit.

Do you try JNA http://en.wikipedia.org/wiki/Java_Native_Access ?

no words, only sad :frowning:

Just spent almost the day playing retro-pixel castles. I havent been that attached to a game since Minecraft. This game is yet another java masterpiece. ;D Keep up the good work ray!

On FFI - anyone paying attention to how this is going? http://openjdk.java.net/projects/panama/

I managed to find no bugs in JDBC connecting to MySQL.

Though, my program was not complex, but I had all of JDBC up and running in about 30 mins, though I did have one problem, but I think that was my own mistake in writing the SQL code for creating a user, a created user wasn’t able to see the database I created (I thought i granted all permissions for the database to the user). But it worked fine when I used root instead.

EDIT:

I did notice a flaw with MySQL Command Line, and MySQL Workbench though, as we had to swap implementations with another group.

I used the Command Line, and wrote my SQL scripts in Notepad++, where the other group used MySQL Workbench.

MySQL Command Line will let you go with some errors, where Workbench is really strict.

E.g.

If you use Timestamp as a data type in MySQL, Workbench requires a default date, where the Command line does not require you to specify the default date.

So we had an issue where they didn’t want to use the Command Line to avoid the error, so they edited the SQL script. well, 1 out of the 3 people in there group didn’t want to use the Command Line.

It was really only query the database, as full implementation of our designed system would of taken longer then we had, as well as all the test cases and other various testing we need to do.

It was only a uni assignment, so I left it as root access, because we had to supply the .java files to allow others to modify the username, password and IP of the database if required.

Never had a problem with JDBC per se, just like OpenGL, it’s all down to the quality of the drivers. MySQL is an utter heap anyway so you’d probably just be getting what you deserve for using it :slight_smile: jTDS with MSSQLServer is reasonably good, and the PostgreSQL JDBC drivers have so far proven reliable. CPU cycles are rarely anything anyone needs to be concerned about concerning JDBC as the bottleneck is always somewhere else that you have no control over.

FWIW I use to use ODBC years and years ago in another life and … it’s not really significantly better than JDBC quite often, and of course, it’s Windows only and impossible to debug when it does go wrong…

Cas :slight_smile:

Another small tangent: last year I tried using HSQLDB (as a separate server process in a multi-user environment) pretty extensively. It was blindingly fast and really quite pleasant to use, right up until the point the HSQLDB serverside connection threads would hang forever in what looked very much like a race condition, rendering it useless. The author (Fred Toussi) seems remarkably slippery in acknowledging there’s any problem at all so rather than pester him to fix it I gave up and moved to Postgres, which is just awesome.

Cas :slight_smile:

[quote=ā€œRoquen,post:2209,topic:49634ā€]
They’re working on a Layout Descriptor Language.

[quote=ā€œprincec,post:2211,topic:49634ā€]
The problem is not burning CPU cycles to do useful work. The problem is wasting CPU cycles on cache misses, garbage collections and unnecessary thread synchronization. We’re not in the 00’s anymore; multi-gigabit network connections, in-memory databases, SSDs, everything is now at a microsecond level and you can’t do anything with JDBC without millisecond spikes.

[quote=ā€œprincec,post:2211,topic:49634ā€]
There are ODBC drivers on Linux, even for SQL Server. API-wise, obviously it’s harder to use than JDBC, but can easily be wrapped in a Java-friendly way.

Ah, it’s moved on to Linux in the intervening years then, though I can’t help but think that

[quote]but can easily be wrapped in a Java-friendly way
[/quote]
is slightly at odds with your previous assertion that wrapping is perhaps a tedious effort :slight_smile:

Cas :slight_smile:

Do you mean what I said above about the bindings? That’s tedious indeed. Once the bindings are in place though, wrapping the raw API in something higher level is simple. Then you can use it easily without having to worry about pointers and buffers and low-level details, like we do with OpenGL.

Trying to find a girlfriend apparently:

http://s14.postimg.org/pe01w69pd/image.png

I’m glad I’m not the only ones seeing these things

Hmm, it’s a Google AdSense ad, so I cannot report it to ProjectWonderful, as is. :emo:

The previously reported (by you) ads have been reported (by me) to ProjectWonderful and those advertisers have been banned/punished/murdered in quick succession, as per my request.

I discovered there are online sevices to 3D print in stainless steel, so I did some tutorials on modelling for 3D printing. I am going to print the small high -strain parts of my telecope build, rather than relying on my ropey woodworking skills.

On the game front I conceptualized stuff for my mediaeval fantasy simulator.