Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (808)
Games in Android Showcase (239)
games submitted by our members
Games in WIP (872)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1] 2 3 ... 10
1  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java Build Tool on: 2016-05-19 14:28:16
Nate wrote a Java Build Tool where the build is defined using Java code.

JGO Thread

Scar's GitHub page
2  Game Development / Game Mechanics / Physics simulation with very large units on: 2015-09-05 13:29:00
I am implementing a space simulation game where the action takes place on roughly the scale of a solar system. I started with Box2D because I did not want to roll my own physics library but I have run into a problem of scale. Box2D only works well with objects between 0.1 and 10 meters. It also has a velocity cap of around 120m/s.

I thought about just scaling everything down so that rather than using meters, kg, seconds I was using km, metric tons, and seconds but I am still running into issues. For instance, there is a large discrepancy in size between projectiles like missiles and large capital ships.

Does anyone else have experience with this sort of problem? Is there a different library, like bullet that I should use?
3  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-08-27 15:53:28
I've been scratching my head over the last couple of days why the collision detection in my game wasn't working. Everything is moving and accelerating fine. I verified that it wasn't an interpolation issue where the Projectile was passing completely through the Ship in the course of a frame. I went through my collision detection code and while it is naive, it should work correctly.

And then I notice my update code...

public void update(float dt) {
   for (HasRigidBody hrb : rigidBodies) {
   // detectCollisions();


It's working now.
4  Discussions / Miscellaneous Topics / Re: Rust 1.0 has been released on: 2015-05-19 03:18:27
I have started messing around with Rust and while I am getting a lot out of the experience, I am still getting hung up on the ownership, borrowing, and lifetime models. I feel like I am randomly adding  'as and & until it compiles.
5  Game Development / Newbie & Debugging Questions / Re: Choosing a random object on: 2015-05-01 01:00:33
If you want to randomly choose 1 from a list of power-ups, you can do the following:

// Assume your power ups share a common base class and are all in a list
public List<PowerUp> powerUps;

// Chose a random element from the list
Random rand = new Random();
PowerUp randomPowerUp = powerUps.get(rand.nextInt(powerUps.size()));
6  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-02-16 22:13:07
PM me a slight alteration of your nick and I'll make it happen. Soon. This is a one time offer, because it would make barely any sense to offer it twice.

Heck no, this is the most pseudo-popular I have ever been!

* edit: unclosed quote tag
7  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-02-16 21:27:36
I finally have a solid initial implementation of a Goal planning system. It allows for entities to have goals and subgoals and to replan as circumstances change. A lot of GOAP material available is fiarly complicated from an implementation side, and it took a while for me to get to a simpler system that meets my needs.

On an unrelated note, I now have 1753 mentions on JGO. You all need to stop talking about me and get back to developing games.
8  Game Development / Newbie & Debugging Questions / Re: Using enum, how does this work? on: 2015-01-03 00:49:21
Ok (nothing wrong with experimenting!). I don't think it can work that way. You would have to write a custom comparison method. Note, you cannot override the standard equals method as it is final. You could do something like:

public enum Day {


    public boolean isEqualTo(Day otherDay) {
        return otherDay == this || otherDay == DAY || this == DAY;

// Then later
Day x = Day.MONDAY;

System.out.println(x.isEqualTo(Day.DAY)) // prints true

9  Game Development / Newbie & Debugging Questions / Re: Using enum, how does this work? on: 2015-01-03 00:32:17
What are you trying to accomplish with this special value that equals all other values of the same enum?
10  Game Development / Newbie & Debugging Questions / Re: Using enum, how does this work? on: 2015-01-03 00:25:19
To my knowledge there isn't an enum value that will equal any other value of that enum but you can use instanceof to test if the enum is of that type.
Day x = Day.MONDAY;

System.out.println(x instanceof Day); // prints true

Can you explain a little more about what you are trying to accomplish?
11  Discussions / General Discussions / Re: 2015 Game Development Goals on: 2015-01-01 00:31:24
In 2014, I gained a lot of knowledge but also wasted a lot of time trying to build half-assed frameworks and tools rather than building a game. My main learnings from 2014 are:

  • Abstraction and indirection is something you add only when there is a concrete, tangible reason to do so. I blew way too many cycles trying to understand my own code because it was over-engineered up front.
  • I need to plan better and have time lines for things. Otherwise I just work on a little of this and a little of that and nothing gets done.
  • I really prefer Intellij to eclipse or netbeans. It's code completion and suggestions are awesome
  • All of the big 3 IDEs make dependency and source management overly complicated by hiding things behind menu choices and pop up windows.

So for 2015, I have the following goals:
  • Have my Cribbage game ready to deploy on Android before the end of the year. I have been putting together some milestones for each month, that I am going to try to hold myself to.
  • Make progress on my space fleet sim. This is the big game that has been in my head and in various pieces for a while now. I am thinking of making as small and simplified version as possible so that I can actually have something playable.

12  Game Development / Newbie & Debugging Questions / Re: Which is the "better" practice on: 2014-12-27 01:48:03
Another potential option would be to use an enum that extends an interface. This gives you the convenience of a global static field while at the same time allowing you to add multiple instances if the need arises.

public interface ConfigProperties {
   void setIntegerProperty(String propertyName);
   void setStringProperty(String propertyName);
   int getIntegerProperty(String propertyName);
   String getStringProperty(String propertyName);

public enum GameConfig implements ConfigProperties {


   private Map<String,Integer> intProperties = new HashMap<String,Integer>();

   private Map<String,String> stringProperties = new HashMap<String,String>();

   // Add an int property
   public addIntValue(String propertyName, int value) {

   // Add a string property
   public addStringValue(String propertyName,String value) {
   // Get a string property
   public String getStringProperty(String propertyName) {
      return stringProperties.get(propertyName);

   // Get integer property
   public int getIntProperty(String propertyName) {
      return intProperties.get(propertyName);

Then you can access properties like GameConfig.COLORS.getIntProperty("font_highlight") from any class. If you need new categories of parameters it can be as simple as adding a new value to the enum.
13  Game Development / Newbie & Debugging Questions / Re: Would this be the correct way to make AI? (Idea, no code) on: 2014-11-22 22:19:33

I am also making a similar game and another thing to take into account is how many units from the same team are attacking a given target. You don't want half of a fleet all going after 2 or 3 small ships just because they are closer. You could maintain a global list of who is targeting who, and query it as part of your algorithm.
14  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-11-18 17:27:16

My de-generalization /  de-abstraction work continues. I had an Action framework where all game entity behavior was encapsulated in concrete actions that inherited from an abstract Action base class that contained code for life cycle management and hooks for concrete Actions to extend. While this had some nice properties, it was hurting my brain from a code organization stand point because I had a proliferation of classes and had to have supporting classes (ActionSystem, ActionEntity) to make it work.

I am working through a much simpler model that won't necessarily give me as much flexibility but will give me what I need now, rather than what I think I may need. If it goes as planned it might be worth a write up in the Shared Code area to get feed back and to also serve as a cautionary tale of the pitfalls over premature generalization.
15  Game Development / Newbie & Debugging Questions / Re: Ways of keeping track of classes... on: 2014-11-13 17:30:48
The fewer classes and interfaces you have the easier they are to organize. Do you have interfaces with only one implementation? Are you programming in flexibility you do not yet need? The more you can get rid of, the easier it is to organize what is left.

One thing I have tried recently which has proved useful is to group classes by cardinality. At a high level, my game has a high Game class which then has multiple GameStates. The game then passes execution to the current GameState. So one package has classes that operate at the Game level (Game itself, GameWindow, InputHandler) and another package has classes at a GameState level (GameState interface, EventQueue, etc). This makes it easier for me to see what "goes together".
16  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-11-13 14:48:55
I have been going through a process of "De-abstracting" my code. I was running into trouble where I had too many interfaces and too much indirection to the point where I was having trouble following the control flow. I was able to remove almost a dozen classes and interfaces. I may be pushing against the SRP but it is so much easier to understand my code now that more of it happens in one spot.
17  Game Development / Performance Tuning / Koloboke - High Performance Collections Library on: 2014-11-03 18:24:26
Koloboke is a higher performance collections library that I have not seen around before. It has the usual primitive collections and claims to perform better than some of the other options out there (like Trove or HPPC). The collections implement the basic Set, Map, and Collection interfaces making them easier to integrate into your existing code.
18  Game Development / Newbie & Debugging Questions / Re: How can I optimize my code: multiple boolean checks on: 2014-10-24 19:31:48
If you had more statuses than completed y/n, you could use an enum.
public enum LevelState {

Then you could use an array of these enums to capture more nuanced state.
19  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-10-24 00:16:40
Released Harldland early access to Steam.

Awesome job, the game has a really cool look about it. Just don't threaten to kill Gabe and I'm sure you'll do fine.
20  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-09-30 12:33:05
Today I sighed. Well first I opened my IDE, I looked at my ToDo list, poked around some of my classes, and then I sighed. Every time I work on a project I seem to hit this point where the code becomes this amorphous blob and making changes becomes more and more difficult. This time through I was determined not to let that happen and I have been refactoring and refactoring to (hopefully) so I can keep making progress. I have tried to keep my tasks very small and simple so that I make some amount of progress. I think it is a mental thing more than anything else...

21  Discussions / Miscellaneous Topics / Re: Whays the story behind your name on: 2014-09-21 21:42:38
I use "Actual" from military jargon (see here).

I am making a space fleet sim game where the player is the CO of the fleet, so it seemed appropriate.

22  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-09-19 14:43:39
I am home sick but have managed to largely complete my Action system. All of my game entity behavior are wrapped up as Actions which run every update step. So I have a RailGun game entity that has LoadProjectile, ActivateRailGun, DeactivateRailGun, and FireProjectile actions.  These actions all inherit from a base Action class and there are method hooks for concrete Actions to override ( onInitialize(), onUpdate, onComplete(), and onFail()). Actions can also have child actions.

I am really liking this approach as it provides a nice, simple way to write and coordinate behaviors amongst multiple game entities.

23  Discussions / General Discussions / Re: Aspect Oriented Programming: Has anyone tried it? on: 2014-09-09 13:05:38
A bit long and not the most dynamic speaker but here is a talk attempting dispel some myths about AOP.
24  Discussions / General Discussions / Re: Aspect Oriented Programming: Has anyone tried it? on: 2014-09-08 23:24:18
Points taken. One of the things that piqued my interest in AOP is the ability to possibly consolidate code that might be spread across various classes into a smaller set of aspects. Counter balancing that was the worry about making the same code less comprehensible.
25  Discussions / General Discussions / Aspect Oriented Programming: Has anyone tried it? on: 2014-09-08 16:56:58
I have recently been taking a look at Aspect Oriented Programming. It seems like an interesting compliment to OOP and I can see some potential uses in game development. Looking at AspectJ it looks like the overhead is all (or mostly?) at compile time with little to no run time overhead.

Has anyone tried AOP programming before and if so what were your impressions?
26  Discussions / Miscellaneous Topics / Re: What other programming languages do you use & why? on: 2014-09-03 16:44:02
Scala because it is interesting. Javascript + HTML for the occasional web application at work. I also do a fair bit of SAS programming for work. SAS is a language for statistical computing that is pretty common in the pharmaceutical and financial industries.
27  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-09-03 16:33:56

For my game I am doing some very simple Graphics2D text rendering while I work on the simulation logic. Due to laziness and taking the "simplest thing that works" approach, my main game class has become an unholy mess of that rendering code, along with other game system level fields and methods. I was able to pull out all of the rendering code (~80 lines in the main game class and 4 other classes), make it a bit more generic, and move it into my game utilities library.

Right now I am trying to figure out how I can better structure some of the higher level systems and fields that I stuck in the main game class.

Refactoring feels good!
28  Game Development / Newbie & Debugging Questions / Re: Does anyone create custom annotations in their game code? on: 2014-05-21 14:42:35
I understand the basic mechanics of how annotations are created. I was more interested in the purposes people use custom annotations. Are there issues in game programming that people here use annotations to help solve.
29  Game Development / Newbie & Debugging Questions / Re: Does anyone create custom annotations in their game code? on: 2014-05-21 14:00:59
I think what you are referring to are comments. I am thinking more about Java Annotations which allow you to attach metadata to your code.
30  Game Development / Newbie & Debugging Questions / Does anyone create custom annotations in their game code? on: 2014-05-21 13:53:14
I know basically what annotations are and use ones like @Override. I was curious, do people here create custom annotations for their game code and if so why? I feel like I may be missing something here.
Pages: [1] 2 3 ... 10
Riven (847 views)
2019-09-04 15:33:17

hadezbladez (5795 views)
2018-11-16 13:46:03

hadezbladez (2603 views)
2018-11-16 13:41:33

hadezbladez (6211 views)
2018-11-16 13:35:35

hadezbladez (1499 views)
2018-11-16 13:32:03

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

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

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

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

nelsongames (5501 views)
2018-04-24 18:15:36
A NON-ideal modular configuration for Eclipse with JavaFX
by philfrei
2019-12-19 19:35:12

Java Gaming Resources
by philfrei
2019-05-14 16:15:13

Deployment and Packaging
by philfrei
2019-05-08 15:15:36

Deployment and Packaging
by philfrei
2019-05-08 15:13:34

Deployment and Packaging
by philfrei
2019-02-17 20:25:53

Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08 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‑
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!