Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (623)
Games in Android Showcase (176)
games submitted by our members
Games in WIP (676)
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]
1  Discussions / General Discussions / Re: What's with unorganized code? on: 2014-06-24 17:07:05
How would I improve the readability any more than this?

More generally, your whole attitude tells more about you as a programmer than your code does. I get that this was a light-hearted boasting of some code you're proud of, and that's cool, but good programmers know that there is always more to learn.

The code you posted and the way that you posted it say a lot about you: you're probably still in high school. You probably have never worked on a real team (outside of perhaps homework assignments). You probably haven't finished any non-trivial projects. You probably get decent grades, but you haven't taken any advanced classes yet. You might have one big project that you daydream about finishing, but really you think and talk about it more than you code it. You seem a bit full of yourself and you don't seem to respond to criticism well, which is something that you'll have to get over if you want to be a real programmer.

How far off am I? :p

I am past highschool. I don't think I don't respond to criticism well, but it's funny to see that others think I seem like I'm still in highschool though Tongue

Just wanted a response.
2  Discussions / General Discussions / Re: What's with unorganized code? on: 2014-06-24 08:30:54
Woah Woah what is that 0.o
3  Discussions / General Discussions / Re: What's with unorganized code? on: 2014-06-24 04:09:18
Okay, so expressions then -.-
4  Discussions / General Discussions / Re: What's with unorganized code? on: 2014-06-24 04:05:29
Then what is a formula -___-
5  Discussions / General Discussions / Re: What's with unorganized code? on: 2014-06-24 03:54:33
 g.fillOval(tFill.n*(spacing)+offset, tFill.v*(spacing)+offset-(size*(spacing/2))+((size-tFill.n)*(spacing/2)), (spacing), (spacing));

Sure that may be a function, that's not what I was referring to.


That is what I was referring to as a formula.
6  Discussions / General Discussions / Re: What's with unorganized code? on: 2014-06-24 03:07:26
How would I improve the readability any more than this?

As for the formulas, should I put each parameter for the drawing method on a separate line with comments
for what each object in the formula does?
7  Discussions / General Discussions / Re: What's with unorganized code? on: 2014-06-24 02:58:47
Perhaps this was a bad example as the first snippet was something I was in the middle of debugging...
8  Discussions / General Discussions / Re: What's with unorganized code? on: 2014-06-24 02:51:00
So many serious responses... lol.

I'm not lazy, using the public modifier isn't a bad practice, I just use that for everything. It can be changed later.

I use setters and getters so that I can go back and make changes.
9  Game Development / Artificial Intelligence / Re: A* Multiple paths to goal on: 2014-06-24 01:52:48
Solution, use 2 paths and then combine them.

Split up the 2 points A -> B into A -> B -> C

Pick a point on the grid from random points between 0-width for x and 0-height for y for walkable points.

Then, apply the pathfinding for AB then the pathfinding for BC, and then combine the path points.
10  Discussions / General Discussions / Re: What's with unorganized code? on: 2014-06-23 21:35:47
Also, in your 'troint' class, why is there public member variables but also functions for encapsulation? Isn't the point of encapsulation to make sure that values are only set in a certain way? Maybe I'm wrong.

I don't care for encapsulation if I'm not sharing the code for someone else to work on. I just set everything to public.
11  Discussions / General Discussions / Re: What's with unorganized code? on: 2014-06-23 21:34:03
numKeep was there to determine how my forloop was iterating, I would ++ it in the nested forloop to see how many iterations it would do in code that no longer exists in there.
12  Game Development / Newbie & Debugging Questions / Re: Working with Isometric Maps on: 2014-06-23 11:19:50
Okay, I think I know what is going on...
The map as you explain it is rotating the origin of the map counter clockwise?

If that is the case, I would just save the objects on the map rather than the map itself, and safe the map as just the width and height, so when it comes to initialization you can avoid this altogether, and just place the objects into the level according to entities/objects and go from there.
13  Discussions / General Discussions / What's with unorganized code? on: 2014-06-23 10:57:19
I've never had this problem unless I was running a very deep algorithm. My code looks godly.

package Core;

import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Point;
import java.util.ArrayList;

public class HexGrid {

   int size;
   ArrayList<Point> points = new ArrayList<Point>();
   ArrayList<Troint> troints = new ArrayList<Troint>();
   Point[][] pointA;

   public HexGrid(int size){
      this.size = size;
   public void update() {

   public void draw(Graphics2D g) {
      int offset = size*24;
      int spacing = 20;
      for(int c = 0; c < points.size(); c++){
         Point pFill = points.get(c);
         Troint tFill = troints.get(c);
         if(tFill.n == 0 && tFill.v == 0){
         if(tFill.n > 0){
            g.fillOval(tFill.n*(spacing)+offset, tFill.v*(spacing)+offset-(size*(spacing/2))+((size-tFill.n)*(spacing/2)), (spacing), (spacing));
         if(tFill.n <= 0){
         g.fillOval(tFill.n*(spacing)+offset, tFill.v*(spacing)+offset+((tFill.n)*(spacing/2)), (spacing), (spacing));
   int numKeep = 0;
   public void setupGrid(int size){
      pointA = new Point[size*2+1][size*2+1];

      int count = 1;
      for(int o = 0; o < size; o++){
         for(int i = 0; i <  size+1+o; i++){
            points.add(new Point(o-size,i-o));
            troints.add(new Troint(o-size,Math.abs(o-size)-(i-o),i-o));
      for(int o = 0; o < size*2+1; o++){
         points.add(new Point(0,o-size));
         troints.add(new Troint(0,-(o-size),o-size));
      for(int o = 0; o < size; o++){
         for(int i = 0; i <  Math.abs(o-size*2); i++){
            System.out.println((o+1)+":"+(i-o-1)+":n, "+(-(o+1)+Math.abs(i-o-1)));
            points.add(new Point(o+1,i+o-size+1));
            troints.add(new Troint(o+1,-((o+1)+Math.abs(i-o-1)),i+o-size+1));

And you may be asking yourself, wtf is a TROINT? It's just a Point with 3 coordinates instead of 2 like a normal point. Dealing with Hexagons that is....

package Core;

public class Troint {

   //n = negative line coordinate;
   //p = positive line coordinate;
   //v = vertical line coordinate;
   public int n;
   public int p;
   public int v;
   public Troint(int n, int p, int v){      
      this.n = n;
      this.p = p;
      this.v = v;      
   public int getN(){
      return n;
   public int getP(){
      return p;
   public int getV(){
      return v;
14  Discussions / General Discussions / Re: I need ideas! Brainstorming session! on: 2014-06-23 10:28:48
A turn based strategy virtual board game similar to chess, but players get to move pieces a number of times per turn on the board.

You can make the game as advanced as you want, add in some HP, what the pieces are/do, maybe go very in depth.

And the goal is to either do damage to other pieces, or capture something the oppoenent controls or destroy a key item, etc.
15  Discussions / General Discussions / Re: dealing with partially occupied tiles in path finding on: 2014-06-23 10:25:59
This is why I don't use tiles for path finding. I reference the tiles as points (the center of the tile is where the points lay over) and then apply the pathfinding with the points that touch the object are the starting points.
16  Discussions / Business and Project Management Discussions / Re: Command & Conquer AARPG project on: 2013-10-28 06:08:17
Right I understand that much, but as far as frameworks go, I'd love more to start from scratch and what other people I'm working with are putting in on, than using something that other people are using and may have to take time looking at.

I can draw something up, and tweak it how I like it, than install a new library, look at the docs, go back, test it out, go back to the docs again, make a post on the forums of said library, etc.

I have no need for the Tile Map library or w/e is used in slick2D that people are always referring to in the help section.

The only exception to that would be sound. Sure, a sound library would definitely be nice. If I knew how to deal with audio already, I wouldn't need to refer to anything unless I felt it had some sort of benefit.

I feel, the genre of the game that I am working on has way too many unrelated things slick uses that it would just be a pain to implement and do what I'm already doing.

The exception to that would be the LWJGL rendering methods and capability. This is what I meant, sorry.
17  Discussions / Business and Project Management Discussions / Re: Command & Conquer AARPG project on: 2013-10-28 05:13:43
It means, the way I run my game is by using rectangles as reference to objects, and dots as reference to units. I use 2d point arrays and add offsets to emulate actual tiles.

For instance, an object at location 4,7 of the grid array can be used to test statements of containing the mouse pointer to match the rectangles drawn by the render method.

x*size of the rectangles + offset. I can match objects in the array by subtracting the offset and dividing the mouse coordinate by the size of the rectangles for the game to see that the mouse is on the tile at (4,7).

If I do it this way, I can use any 2d render method which could be in LWJGL, or SLICK2D whichever is decided upon.

18  Discussions / Business and Project Management Discussions / Re: Command & Conquer AARPG project on: 2013-10-28 04:18:14
That being said
19  Discussions / Business and Project Management Discussions / Re: Command & Conquer AARPG project on: 2013-10-28 04:17:45
nope. I was not using java 2d. I'm using a placeholder which uses java 2d.
20  Discussions / Business and Project Management Discussions / Re: Command & Conquer AARPG project on: 2013-10-28 04:13:02
Sorry, I forgot about the 6th rule.

21  Discussions / Business and Project Management Discussions / Re: Command & Conquer AARPG project on: 2013-10-28 04:01:31
Do not post in this board if you are a newbie to Java or Game Development.
Consider the practicality of your project and then post.

Either of those rules I'm assuming you've assumed I've broken?

I'm streaming because I want to. I don't care if it's pointless to anyone. I have regulars who have followed me to check in every now and then when I'm online.

Post what libraries, engines, and languages you are familiar with.

If it is this one, then no, I am not familiar with any that are built off of java expecting to be more efficient than to provide a general api for those who would not know what they were to do in the first place.

I work with the default library/api. The library of which libraries are based off of.

What bugs you about my post?

22  Discussions / Business and Project Management Discussions / Re: Command & Conquer AARPG project on: 2013-10-28 03:51:48

The game's going to be made regardless of who else is working on it.
23  Discussions / Business and Project Management Discussions / Re: Command & Conquer AARPG project on: 2013-10-28 03:49:10
You can't bum me, I'm working on this while we speak. I have a twitch stream I run when I have a huge block of time for anyone interested in watching someone type code for a future game.

This is something I put my time into. It's just me until someone interested wants to communicate on skype or ts while we program. I prefer to discuss methods of doing things rather than doing it myself with a "biased" code. If I have no-one who can call me on something I've done ineffectively, then I can improve my programming ability for future instances.

I guess I'll have to look into using github for that purpose then as well.
24  Discussions / Business and Project Management Discussions / Re: Command & Conquer AARPG project on: 2013-10-28 03:30:29
An AARPG is an Auto-Adjusting role playing game.

The difficulty of the game encounters is adjusted according to the success rate of the player and stats of units the player controls.

What can I provide:

Anything code-wise. I can program any part of the game, it just requires alot of trial and error, and me adjusting the way things are handled so that the game feels like a game, and everything seems natural to the players. (Tweaking.)

I can also provide ideas to add to the game that are viable.

I also have naturally organized code.

25  Discussions / Business and Project Management Discussions / Command & Conquer AARPG project on: 2013-10-27 08:10:58
Hey, I am Mice.

Here's what the game is, and about:

I'm currently in the works of putting together a Command and Conquer 2D top down AARPG-ish Turn Based game.
[Can be tile based, could be irregular point to point based (randomized tile location than just a grid.)

75 years in the future, and a decade after disasters of sorts. You name it. Nuclear war, fallout, aliens, who knows.... The world is now pretty much a vast exotic wasteland.

The player is in charge of a group of Soldier-turned-civilians of survivors who haven't been killed by the extremes of the environment and savage society of modern post-apocalyptic times.

The player controls these units in areas adjacent to the previous starting from the Capitol Base where the player can trade resources for credits and other resources, recruit new units for credits etc.

When the player enters an area, they must progress through to the next one in order to find more innocent survivors willing to join your cause of rebuilding the land which was destroyed.

The main enemy would be the hostiles in each area that are doing the same thing you are; obtaining resources, upgrading their objects (Crafting) and also fighting off mutants and monsters as well.

Another thing I would like to mention is how I plan on creating the Units in the game. For actions completed, or enemies slain, they gain points that can be used in a skill point web that the player can customize their abilities, and efficiency in their abilities.

For instance, if the player feels they want to turn a Unit into a scout and scavenger, they would put points in the skill web that allow the unit to do so.

Or, the player could make a defensive unit that can carry lots of resources, and a few other units that can intercept hostiles attempting to kill the "mule" of resources.

For the time being, I'm able to test out the progress I make in my game (because I don't have graphics or assets to go with the game) by referencing the game grid offsets to the mouse, and it works A-OK until I can find someone capable of providing sufficient placeholders, or implementing the end result of graphics that work well.

I am streaming the creation of the game on as well.

That's all I can think of for the synopsis and game development I've come up with, there's a bit more scattered information I left out, but if anyone would be interested in it and would like to take part in the game's creation, please PM me.

I would like more people to work along with. I feel this game would really be something the way I imagine it. I am totally capable of making it happen myself, but there's so much time I have to invest and I'm doing it alone as well.

If anyone feels confident in their ability to program in java, or provide good graphics, ideas, it would be nice to have that.

I don't have money to pay for anybody contributing, however. But in the case that this game does become crisp and clean enough to be released to the public, I would gladly split the earnings equally.

So I'm looking for those who can code for now, and if someone would like to provide graphics this early on after we discuss what I see the game to be like, I would be happy to maneuver some code around to test the game with.

I have Skype, and team speak.
PM me if interested.

26  Discussions / Community & Volunteer Projects / Putting together a game and a team. on: 2013-04-11 10:46:34
Hey guys, I thought I'd post here to say that I'm working on a game I have in mind.

The type of game is above Text Based, and below 2D, a step below Mario, or Pokemon.

     Currently, it is being developed on java2D, no libraries, as it's such a simplistic game in theory, that you don't need a dedicated graphics unit to run the game.

If the majority of people who work on the game with me want to port it to a game library, I'd be more than happy to.

     I call it interface based, I'm unsure of that sort of classification but oh well. By Interface Based I mean that you interact with the game by clicking on menu's and choose options most of the time.

     Some parts of the game will use dynamic 2D graphics, but that's only when the game requires the player to interact in real time with a certain object, or participate in a specific activity.

     It's an RPG, where the player starts out in a small town in the midst of 6 factions at war (or neutrality) and your goal is to pick which of the 6 you are against, and defeat them, as well as fighting monsters in the wild areas of the game, the game can be continued past that point, but that's about it.

     Gather the best resources, craft the best items, Complete missions, and slay the mightiest beasts of each Attribute Wild.

     I have discussed the game's storyline and mechanics to friends and some say that they think of Desktop Dungeons, or Dwarf Fortress when I talk about it.

     I have most of the skills, combat, Quests/Missions, and other developments thought out, but I don't want to go at it alone.

     The game world can be extensive depending on how many areas we are willing to compose by hand. Even more by generating them randomly after we've had enough manual initialization...

     This is mainly a project I work on a little at a time as I'm in no rush. I know most of what I'm doing.

     For graphics, I'd like some help, but I could do it myself if no-one else is up for it.

If you want to show off your artistic abilities, you are welcome to considering the parameters of the game.
If you want to implement awesome quests and other storylines, you can!
If you want to come up with game ideas go ahead.  Grin

     If you're interested, please PM me, reply in the bottom, or add me on skype: HolodoboloH.

     I may put the game out to the public for profit it people are interested, and the people who helped work on it also agree to, and they will have a fair share of all future profits.
Pages: [1]
KaiHH (12 views)
2015-10-06 20:22:20

KaiHH (11 views)
2015-10-06 19:41:59

BurntPizza (21 views)
2015-10-06 19:04:48

basil_ (44 views)
2015-09-30 17:04:40

shadowstryker (22 views)
2015-09-29 15:55:06

TheSpaceHedgehog (28 views)
2015-09-29 01:58:48

GamerC4 (54 views)
2015-09-24 21:10:38

GamerC4 (71 views)
2015-09-24 21:09:48

htuy (28 views)
2015-09-24 04:57:24

htuy (38 views)
2015-09-24 04:56:35
Math: Inequality properties
by Roquen
2015-10-01 13:30:46

Math: Inequality properties
by Roquen
2015-09-30 16:06:05

HotSpot Options
by Roquen
2015-08-29 11:33:11

Rendering resources
by Roquen
2015-08-17 12:42:29

Rendering resources
by Roquen
2015-08-17 09:36:56

Rendering resources
by Roquen
2015-08-13 07:40:51

Networking Resources
by Roquen
2015-08-13 07:40:43

List of Learning Resources
by gouessej
2015-07-09 11:29:36 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!