Message Board
Message Board > Java > Using Java these days |
February 29, 2020, 13:19 | |
Rincewind
programmer 1548 posts |
Hello. I wish to share some info on Java. I have learned this language (Java SE6) in university, and have received good marks for these programming classes. At the time I was still using Fenix. I took a break from studying to try finishing a Fenix project (an isometric RTS). This did not work out. It was not finished after half a year off university. The code was getting really large and I was in trouble with the speed and memory use of a tile map. Because of this, I was cutting down on map size to keep the game running. In the end, the max possible map tile dimension had gotten small (60x60 tiles). There was no tile animation. Java I had not used much, I had an IRC bot programmed as a first project, but did not have much interest further. Then I got a place at a daycare programming school. Here I have learned to use Java Swing (UI library) and a UI-builder (part of the NetBeans IDE). With this I could clearly create good applications with a UI. There is absolutely nothing wrong with it, it has well useable user interface elements. I started several large projects, I was creating my own diagram software and an IRC client. They are not done yet. Then I took up Java LibGDX, which is a library for game development (one of the few available). With this I can use OpenGL to create games. It also holds UI commands. Basically I felt this is much better than Fenix. The drawing speed of tile maps is much higher. In Java LibGDX, I can have two massive 160x160 tile map layers with animated tiles and fringe (rounding bordered) tiles. Everything is organized in classes (and object oriented). It all looks organized with its class separation and class variables. Java has serializability of objects to store and load them into and from a file. I am using that to save game maps. Memory usage is ok-ish for my current Map Editer project, but it needs to be kept an eye on. I am not drawing one large image but am constantly drawing all tiles within the screen. With this my memory usage for the called size is 124 MB. Saved game maps are 3 MB in size only. There were some problems in my way with LibGDX too. I had to create pixel perfect collision detection myself, and some DIV-like commands like the advance() command in Fenix for moving into a direction with an amount of pixels (but in Java with commands in a static class). A lot of people around me have picked up "Android studio" for Java and are programming for their telephone and tablet. This does not particularly have my interest but they are enjoying it still. Basically at my daycare there is a large load of people programming Java. It is a fine language! Now everyone has their own direction of learning programming languages. I am not sure whether this is better than anything but it might be worth trying. ____________ Personal website: http://www.loijson.com |
# |
February 29, 2020, 19:37 | |
PB
Defender of the faith 630 posts |
DIV, Fenix, Fuze, and others like that are in my opinion recreational/educational programming languages only. If your business depends on it, I wouldn't pick those languages to write the software in. I would qualify Java as a professional programming language. There are plenty of business who have their core processes depend on software written in Java. Java wouldn't be my first choice personally, but I don't program games professionally. In stead I build web applications (.NET / .NET Core / Azure / Angular / Etc.) However, if you're serious about your coding, I agree that Java would be an OK choice. Of course Java is interpreted, and there are also languages that compile to machine code. But I'm guessing that the performance penalty on modern hardware isn't as big anymore... ____________ |
# |
March 1, 2020, 11:56 | |
Rincewind
programmer 1548 posts |
Well indeed it is very fast. I had made a speed test application and Java was 100-1000 times as fast as Fenix (in drawing a type of fractal). Also game programming wise (drawing tiles) it is more quick. This might also have to do with the high OpenGL version (3.2). Some other functionalities listed OpenGL Shader language can be used. OpenGL 3.2 or 2 can be used. Tools (for LibGDX or Java) 2D particles (can generate shaders with flames and particles) Texture packer (can create atlas files and sprite sheets) Hiero (font editer like FNT Edit for fenix) 3D particles VisualVM (Debugger) Some books available on LibGDX LibGDX cross platform game development Cook Book Learning LibGDX game development second edition LibGDX cross platform development blueprints LibGDX game development by example Mastering LibGDX game development Building a 3D Game with LibGDX The cook book is particularly good. Every chapter is full of appliable methods to use right away. It covers almost entire LibGDX. ____________ Personal website: http://www.loijson.com |
# |
April 8, 2020, 17:09 | |
Rincewind
programmer 1548 posts |
I'd like to share some more good book titles for Java SE (in general): English general Java books Core Java 2 Fundamentals Java - How to program, Early objects (Deitel) Dutch general Java books Java - De basis (Andree Hollander) Object georienteerd programmeren en Java: Voorbij de basis (Beurghs) The dutch books are mostly about Java Swing, the main UI library for Java. "Java - de basis" really teaches this well. ____________ Personal website: http://www.loijson.com |
# |
Message Board > Java > Using Java these days