Java-Gaming.org Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (762)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (847)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  JUMG - Java Utilities for Making Games  (Read 7827 times)
0 Members and 1 Guest are viewing this topic.
Offline TheBrenny
« Posted 2015-03-11 02:31:55 »

Ladies and Gentlemen,

May I introduce you to my latest piece of work, JUMG:

What is JUMG? (https://github.com/TheBrenny/JUMG/#what-is-jumg)
JUMG (pronounced 'Jum-Gee', acronymed 'Java Utilities for Making Games') is a library that contains multiple utilities to make Java Games the most efficient way. JUMG utilises the concepts of separating certain portions of code from the rest, to allow one main class to bring them altogether.

As JUMG is in development, it is necessary for a checklist to be made of what needs to be added, and what is added. This can be found over on the JUMG GitHub page: https://github.com/TheBrenny/JUMG/.

Who is BrennyTizer? (https://github.com/TheBrenny/JUMG/#who-is-brennytizer)
BrennyTizer is not a person, it is merely a blog/portfolio of one's work. That person who's work is being collected is Jarod Brennfleck. He is the guy who is constantly working hard to develop programs while achieving good grades at school. Currently a Year 11 student, Jarod has completed a few programs for some classes which he will be releasing soon online! For all the news and updates, check out his website at: http://brennytizer.com.au/

Why do I need JUMG? (https://github.com/TheBrenny/JUMG/#why-do-i-need-jumg)
You don't * NEED * JUMG, it's simply a tool to speed up the process of creating games with Java. JUMG just simplifies the process by extinguishing the boring bits of code from your main class. Consider the following:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
// Without JUMG
public static void main(String[] args) {
  Dimension size = new Dimension(600, 500);
  JFrame jf = new JFrame("Title");
  jf.setPreferredSize(size);
  jf.setMinimumSize(size);
  jf.setMaximumSize(size);
  jf.setSize(size);
  jf.setLocationRelativeTo(null);
  jf.setFocusTraversalKeysEnabled(false);
  jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  jf.setLayout(new BorderLayout());
  jf.add(new OverridenPanelWithAwesomeRender(), BorderLayout.CENTER);
  jf.pack();
  jf.setVisible(true);
}


This clump of code (plus extra, woo!) can be condensed down into just a few lines such as the following:

1  
2  
3  
4  
5  
6  
7  
// Using JUMG
public static void main(String[] args) {
  Dimension size = new Dimension(600, 500);
  Frame f = new Frame("Title", size);
  f.addDisplay(new Display(size, new MyRenderer(), null));
  f.show(true);
}


Now how much of a clamp-down is that?! JUMG just removes the boring code that we all dread to write repeatedly, and plonks it in nice little classes that allow you to have full control of. Yes, that's right. Nothing in JUMG has a private modifier - although it's bad practice - but as far as this library is concerned, there is no need to privatize anything. That frame that just got created in the JUMG example has a public JFrame in it's class. If you don't like it how you can't resize the frame, you can call the JFrame.setMinimumSize(Dimension) and JFrame.setMaximumSize(Dimension) by using Frame.frame.set*Size. Or you can set it to your own customized frame - provided it extends JFrame in some way!

How to use JUMG (https://github.com/TheBrenny/JUMG/#how-to-use-jumg)
Due to JUMG's unique style of a multi-library mode, you can select which libraries you want to implement. This allows for a slim development of your game - if that's what you're after. There a not many necessities that come when it's time to implement, but one of these is the utils package is a must, no matter what package you're after. The utils package is an all round package which implements the most important tools into the library. The utils package contains methods such as logging, images, and certain units of measurement (which are annoying to implement with java - cough angles). But then again, that's what JUMG aims to do. Cut down your boring code so you can work faster.

So if the previous paragraph was a tl;dr for you, you can find the instructions over on GitHub: https://github.com/TheBrenny/JUMG/#how-to-use-jumg

Do note that editing these packages are NOT against the license that is held on JUMG. IT's encouraged that you edit the library, but also don't forget to send a pull request to the main GitHub repo! You work will be credited, so help out!

Get it now from GitHub: https://github.com/TheBrenny/JUMG

---------------------------

Now that that is out of the way, I can get down to more of a 1-1 developer style. I look forward to working with many of you game creators on developing this library to get it up to a very high standard of work!

A really good way to help out is to email me at my email which you can find on my profile (I don't want to express it here because robots and crawlers can nab it...). On top of that, get yourself a copy of Saros for Eclipse and install it. That will allow us to work collaboratively.

I understand that this library doesn't compare to LWGJL, jMonkey, or any other Game engine, but this library is to provide support for the guys who don't like all the aesthetic carp such as frame building when all they really want to do is code a wildly great engine.

Here's a screenshot of all the packages:

~TheBrenny

"What?.. But how?.." - Every programmer ever
Offline orange451

JGO Kernel


Medals: 418
Projects: 7
Exp: 7 years


Your face? Your ass? What's the difference?


« Reply #1 - Posted 2015-03-11 14:14:23 »

What does your engine do that these engines don't?
http://www.java-gaming.org/topics/sjgl-simple-java-game-library/34723/view.html
http://www.java-gaming.org/topics/red-game-2d-engine-unfinished/34367/view.html
http://www.java-gaming.org/topics/introducing-mercury-a-simple-2d-game-library/30862/view.html
http://www.java-gaming.org/topics/silenceengine-a-2d-3d-game-engine/34907/view.html
http://www.java-gaming.org/topics/yage-yet-another-game-engine/34766/view.html
http://www.java-gaming.org/topics/awtengine2d-wip-a-2d-engine-using-only-awt-canvas/33763/view.html

I wouldn't say that lwjgl is just "aesthetics"; it is one of the best ways to get openGL in Java, and because it is hardware accelerated it's always going to be miles faster than AWT.

First Recon. A java made online first person shooter!
Offline MrPizzaCake

Senior Devvie


Medals: 8
Exp: 3 years


Hello, another wonderful human being :)


« Reply #2 - Posted 2015-03-11 14:55:23 »

I wouldn't say that lwjgl is just "aesthetics"; it is one of the best ways to get openGL in Java

...and OpenAL, and OpenCL, and newly GLFW.

How am I? Tough question, since emotions are confusing as heck Tongue
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline MrPizzaCake

Senior Devvie


Medals: 8
Exp: 3 years


Hello, another wonderful human being :)


« Reply #3 - Posted 2015-03-11 15:05:52 »

Oh my, another engine/library/framework... Are you sure there's not enough already? Like, don't get me wrong, you can make it, but I don't think sharing it will do anything. LibGDX is still going to be used much more (no offense). And most engines/libraries/whatever--you-get-it aren't even finished. And no-one wants more dead threads here.

How am I? Tough question, since emotions are confusing as heck Tongue
Offline TheBrenny
« Reply #4 - Posted 2015-03-11 22:39:03 »

Orange451, my library contains extra methods and functions, such as events and message routing, already implemented level design, straight up path finding, and other utilities that will evolve into enhanced packages. My library also has no cross package referencing, excluding the utils package. One does not need every package, only the utils package and the ones they want. As far as I can Dee, each library will just increase the size of someone's game. Sure, I admit, my sound manager is a little bit undercooked; it doesn't support a lot. But it's still better than nothing, right? In the end, the user can just nab their own library, and in the case of a Dev, they can add to JUMG.

MrPizzaCake, I agree, LibGDX, Open*, and other well known libraries will be used MUCH more often. But those libraries carry weight, (including LWJGL despite its name). This library, doesn't include outside dependencies. And the developer can choose what they want to include. This allows for smooth and fluid control over what gets implemented.

"What?.. But how?.." - Every programmer ever
Offline HeroesGraveDev

JGO Kernel


Medals: 382
Projects: 11
Exp: 4 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #5 - Posted 2015-03-11 22:50:35 »

MrPizzaCake, I agree, LibGDX, Open*, and other well known libraries will be used MUCH more often. But those libraries carry weight, (including LWJGL despite its name). This library, doesn't include outside dependencies. And the developer can choose what they want to include. This allows for smooth and fluid control over what gets implemented.

Just because LWJGL isn't in the standard library doesn't mean it's not lightweight.

The standard library rendering pipeline (Java2D) uses OpenGL underneath (not by default on some platforms), but in a convoluted and unpredictable way that gives you very little control over how you want something rendered.

LWJGL is more lightweight and allows far more control of rendering than the bloated black box that is Java2D.

(That's not to say nobody should use Java2D. It certainly has some uses, but it isn't good for high-performance games)

Offline TheBrenny
« Reply #6 - Posted 2015-03-11 23:26:18 »

HeroesGraveDev, interesting point. I will take this into account, as I move closer the the release. Grin

"What?.. But how?.." - Every programmer ever
Offline CopyableCougar4
« Reply #7 - Posted 2015-03-11 23:44:18 »

I just have a little constructive criticism after skimming over the source.

I notice that the engine uses Java2D for rendering. This is generally not a good rendering backend to use for games. Your tiling system is also based off a BufferedImage, which could slow the game down if you attempted to load multiple maps. I also don't like the practice of doing things like extending Buffered Image or Rectangle2D "to make it easier". I also feel like the classes in utils should generally be small standalone classes, and I don't like one-class packages

I know that some of these are personal qualms, and I also think that creating an engine can be good for learning. However, don't expect people to just pick it up and use it.

My advice is to learn some OpenGL, and have fun making games, not making libraries that simply don't do as much as the highly popular competitors.

Either wandering the forum or programming. Most likely the latter Smiley

Github: http://github.com/CopyableCougar4
Offline TheBrenny
« Reply #8 - Posted 2015-03-12 00:35:37 »

CopyableCougar4, cheers! After the previous posts relating to the use of OpenGL and such, I've realised that it is ideal to use it. As for tiling with a BufferedImage, when creating maps, I generally load the maps needed at startup, leading to an expensive start, but then draw all the tiles to one big BufferedImage, so I'm only rendering one image, instead of many. I understand, this could be optimised if OpenGL was implemented, so I'll see what I get up to.

I don't quite understand what you mean by "Standalone Classes"... But they're in the utils because they're used library wide.

And the one-class packages? The updating package is it's own package - for the reason that it is a singular component of th library. It doesn't need much more. And the compression package is its own project. It's going onto GitHub soon. Smiley

"What?.. But how?.." - Every programmer ever
Offline Gibbo3771

JGO Kernel


Medals: 128
Projects: 5
Exp: 1 year


Currently inactive on forums :(


« Reply #9 - Posted 2015-03-12 09:01:00 »

I had a little skim over the source as well and wanted to raise some issues.

So you have the Frame class that covers up the horrible initialisation methods that any Java2D project is littered with, however all your doing is hiding functionality and adding extra class.

For example:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
// Without JUMG
public static void main(String[] args) {
  Dimension size = new Dimension(600, 500);
  JFrame jf = new JFrame("Title");
  jf.setPreferredSize(size);
  jf.setMinimumSize(size);
  jf.setMaximumSize(size);
  jf.setSize(size);
  jf.setLocationRelativeTo(null);
  jf.setFocusTraversalKeysEnabled(false);
  jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  jf.setLayout(new BorderLayout());
  jf.add(new OverridenPanelWithAwesomeRender(), BorderLayout.CENTER);
  jf.pack();
  jf.setVisible(true);
}


This here is the typical init code most Java2D projects start with, as you have stated it looks like shit, really it does. However, you could easily just slap all that in a method and call it, cleaning up the constructor or whatever and hiding it anyway. So your way is actually just hiding preferences behind a class and making it a little more hassle to get access to one of these preferences.

Like so:

1  
2  
3  
4  
// This is your way
Frame f = new Frame("someTitle", size);
// Now what if I want to change the minimum size? (for whatever reason)
f.frame.SetMinimumSize(smallerSize);


It just seems like most of the library hides code from you (which is fine) but does not extend on the functionality of the already existing code.

Why don't you just have Frame extend JFrame? Literally solves that problem anyway lol.

Also is it an Engine or a Framework? At the moment it's like a hybrid, either do one or the other. Or expect project implosion.


"This code works flawlessly first time and exactly how I wanted it"
Said no programmer ever
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline 65K
« Reply #10 - Posted 2015-03-12 17:23:33 »

Nothing in JUMG has a private modifier - although it's bad practice - but as far as this library is concerned, there is no need to privatize anything.
A good way to incur users hate on you...
... as soon as you change implementation details - what will happen sooner or later.
Exposing each and every member means extending the public interface that a library offers its user base.
And changing internal details will break people's code quite probably.

A special problem occurs when on the one hand synchronizing stuff for thread safety but at the same time making locked members public.

Lethal Running - a RPG about a deadly game show held in a futuristic dystopian society.
Offline Elsealabs
« Reply #11 - Posted 2015-03-13 18:53:44 »

Reading through this on Github, and the code is odd. Public members that still have mutator methods, which are intended to provide encapsulate of private members... That doesn't quite make sense!

Pages: [1]
  ignore  |  Print  
 
 

 
EgonOlsen (367 views)
2018-06-10 19:43:48

EgonOlsen (374 views)
2018-06-10 19:43:44

EgonOlsen (305 views)
2018-06-10 19:43:20

DesertCoockie (549 views)
2018-05-13 18:23:11

nelsongames (874 views)
2018-04-24 18:15:36

nelsongames (857 views)
2018-04-24 18:14:32

ivj94 (1318 views)
2018-03-24 14:47:39

ivj94 (437 views)
2018-03-24 14:46:31

ivj94 (1100 views)
2018-03-24 14:43:53

Solater (449 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!