Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
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
1  Discussions / General Discussions / Re: Hey guys, check out XMind on: 2012-05-24 19:22:11
I'm back after some time off so I haven't had time to respond to this.  Cheesy

I think XMind gives you a  lot of advantages over paper and pencil or an outline on a computer. For example:

Ease of editing
Ease of tracking multiple paths
Ease of marking completion percentages
Ease of re-arranging chunks of ideas.  You can drag and drop whole chunks of ideas and place them in different areas.

Yeah, it's not for everyone, but I've found it to be really useful and easy to use.  I tend to make lots of list to help me stay focused.  This tool helps me visualize my list better.
2  Game Development / Game Mechanics / Re: Level creator on: 2012-05-24 19:16:13
I have used Tiled and I strongly recommend it for tile-based games. It also supports polygons, but it is not as well developed in that area (yet?).

Tiled can save levels in both XML and JSON.

Good luck!

Also, if you use the Slick2D library (as I do) then there's a class that automatically loads a tiled map from the Tiled program. There's a very useful Camera class that's on the Slick2D forum which really needs to be in the core Slick2D code.  That camera class scrolls around the Tiled map object.

As far as saving data here's one way:
Create a level configuration class which holds all the level data.  It has nothing to do with how the level works, it's only a list of objects on the level and the tiled background which the level should use.  Create and fill that class and then marshal it to XML using Jaxb. Inside your game just get the XML filename and marshal it back form XML to Java and it will automatically create and fill your level configuration class.

There are many ways to do this.  You could also use Java Serialization.  With Serialization every time you change the format of the class you're saving the old serialized file will no longer work.  So be aware of that.  It's easier than Jaxb, but as things change serialization can be frustrating because you have to re-save your level to get the new serialization file.
3  Game Development / Newbie & Debugging Questions / Re: Starting off on: 2012-05-24 18:38:01
Squidnig:

Even though there are some problems with the book, "Killer Java Game Programming" is pretty decent.  Also, the author has a great website here:
http://fivedots.coe.psu.ac.th/~ad/jg/

That site has all the source code for the book.  In particular I liked his chapters on loop timing.

Since you're starting out I suggest doing something really easy (although you'll quickly find out how difficult "easy" can be).  Try making a background image appear in a frame.

Then make a square bounce around the window.  Start small.  But I'll tell ya, you will learn so much.

1. Whats the difference of Drawing on a JPanel, Canvas, and JFrame? Why do i sometimes need all 3?

I like Canvas because it has a buffer strategy (See #3)


2. What is the concept of deltaTime?

Your game loop will have essentially 2 methods which repeat: the update and the render  methods.  Update usually has an int which is the number of milliseconds since update was last called.  This helps you figure out how far to move things or how fast to animate things.  For example.  Let's say you have a box which moves to the right at 100 pixels per second.  Your update method will pass in milliseconds like this:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
public void doUpdate(int delta) {
    // I always like to convert milliseconds into a percent of a second.
   float slicePercent = ((float)delta)/1000;

   // I use the word "slice" because I think of each update as a slice of time. If there was 100 milliseconds since the last update
  // this slice of time would be 10% of a second or slice = 0.10

  // dx is "delta x" or "the change in the x direction"  In this case dx is 100 (pixels per second) and we want to
 // move 10% of that during this slice.
 x = x + (slicePercent * dx);

  // and here we do all our other updates

}


3. What the heck is a bufferStrategy!? (Seriously, cant find anything on it.)

bufferStrategy is essentially having a place to draw your graphics which don't show up on the screen.  When the drawing is done you can flip the offscreen buffer with the screen buffer so now the screen shows what you've drawn.

5. Why is it that whenever people say to use threads to keep games running smoothly; then i use threads, and its sleeps the entire program?
See the "Killer Java Game Programming" link above.  There are good examples there.

6. Why is that people have a lot of different ways for setting up a gaming class? Are others not considered correct?

Oh my gosh now we're treading on religion.   Wink   There will always be as many ways of doing things as there are programmers.  The more I code (and I've been doing it a LONG time) the more I learn and the more my style changes.  Since you're learning just get something in code and get it to work.  Quite a few times I've written something, learned a lot from it, and then threw it all away because now that I understand the problem I realize I should have approached it completely differently.

Good luck and have fun coding something.
4  Game Development / Game Play & Game Design / Re: The base of an entity system on: 2012-05-11 16:32:49
My Entity class has x & y locations, an image, an enum of EntityType which tells me if it's a player object, opponent object, player projectile, opponent projectile etc.  My entity class also has hit points so I know how much damage it can take.  Entity does not move.  About the only time I use this base class by itself is if I want to place an object on the background.  That object doesn't move and usually has no collision properties.  Entity has getImage() doUpdate(container, game, delta) and doRender(Graphics g) which all other entities inherent.  It also has some booleans such as isCollidable and isVisible so I can turn collisions on and off and make them visible or not.

The Entity class also has my collision rectangles. Normally it's just the rectangle of the image but I also have a list of rectangles which I use for oddly shaped sprites.  Rectangle collision detection is fast and easy.  Java's Rectangle2D.Float extends RectangularShape which has the method public boolean intersects(Rectangle2D r) which is fast and precise enough for my needs.

Then I have a MovableEntity object which extends Entity.  That has dx/dy speed,  acceleration rate , deceleration rate and max speed.

I have a Startable entity which extends MoveableEntity.  This is a class where I can set my dx/dy but not have the entity move until I give it the start command.  This way I can set up objects offscreen and start them moving into the screen when I want to.

I also have ControllableEntity which extends MoveableEntity.  This entity can be bound to keyboard or game controller events and can change the dx/dy, speed, and acceleration of the entity.

I recently added AnimatedEntity which will go between Entity and MoveableEntity.  This way I can animate any of my entities as I do other things as well.

I created a Projectile class which extends MovableEntity.  The Projectile knows if it has moved offscreen and if so places itself back into the bullet pool.  Things which extend Projectile overload the image in the base class Entity with a static image so all the projectiles of a single type are using the same image in memory.

I place different entities in different Arraylist.  My GameLevel class has these list:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
   private ArrayList<Entity> backgroundEntityList = new ArrayList<Entity>();
   private ArrayList<Entity> midLevelEntityList = new ArrayList<Entity>();
   private ArrayList<Entity> opponentEntityList = new ArrayList<Entity>();
   private ArrayList<Entity> postOpponentEntityList = new ArrayList<Entity>();
   private ArrayList<Entity> playerEntityList = new ArrayList<Entity>();
   private ArrayList<Entity> postPlayerEntityList = new ArrayList<Entity>();
   private ArrayList<Entity> hudEntityList = new ArrayList<Entity>();
   private ArrayList<Entity> messageEntityList = new ArrayList<Entity>();

   private ArrayList<Entity> playerProjectileEntityList = new ArrayList<Entity>();
   private ArrayList<Entity> opponentProjectileEntityList = new ArrayList<Entity>();


These list allow me , for example, to draw all the background images, player images, opponent images, etc all in correct Z order.  The 2 projectile list in particular make it easier to pool bullets.  The postPlayer and postOpponent list allow opponent images to come out of caves which the player can fly over, or for the player to fly under a bridge.

The HUD list always paints next to last so the HUD (Heads Up Display) is on top of everything.

The Message list paints last.  I use this for menu items and messages which need to paint on top of everything.

In my game loop I walk through every list in order and call the doUpdate of every entity.  Then I do the same thing with doRender and it all works by itself.

5  Discussions / General Discussions / Hey guys, check out XMind on: 2012-05-11 15:43:08
I've been using XMind http://www.xmind.net/ to try to keep my ideas and task organized.  The free version is fine for a single developer but apparently you can link in other people and brain storm together.

I've just found that it's really useful for laying out my task and marking which ones rely on which others. I can then tag them with icons to show how far done each task is.  It's also quite useful for brainstorming.  Just type an idea and then as your mind branches off into various ideas you can easily build those branches while tracking your ideas.

I have no relationship with the company, I just think it's a really useful tool.
6  Discussions / General Discussions / Re: Go on, ask me anything. on: 2012-05-11 15:22:39
Quote
It does use a bunch of reasonably well understood tricks to get people hooked and to buy it, which I will have no qualms about using one day

I would love to use the trick of having Penny Arcade write 2 comics in a row which showed the game in a positive light.  In September of 2010 Penny Arcade ran those 2 comics and Notch had so many registrations that it took his servers down for almost a week.  In the end, when the servers came back up he went from roughly 65,000 alpha users to over 300,000 alpha users (I was one of them).

I think that was the single point which really launched Minecraft.

I use to be utter addicted to MC.  But I haven't played it for months. I find that more and more I only do my gaming in 10 to 20 minute chunks.  I think there are a lot of people in that position and this may be a reason that mobile games and the "casual gaming" revolution are happening.
7  Game Development / Newbie & Debugging Questions / Re: Help with Keylistener on: 2012-05-08 05:36:18
What I often do is have booleans such as
boolean upKeyIsPressed = false;
boolean downKeyIsPressed = false;

Then on the keyPressed event I catch the key in the key event and set the appropriate boolean to true.
In keyReleased I set the appropriate boolean to false.  That way the repeating keys have no effect.

Now, what I actually do is have a Singleton class called KeyAssignments.  In that class I map any key which I want to watch to the object which must listen to it.  So if I want this object to listen to the f4 key (for example) to show a debug screen I set it up like this.

KeyAssignments.getInstance().addKeyAssignment(KeyEvent.VK_F4, this);

KeyAssignments is actually mapping a KeyEvent to a list of objects so I can make many things turn on a single key stroke if I want.

Then, every object which must response to a key event must implement KeyAssignable

1  
2  
3  
4  
5  
public interface KeyAssignable {

   public void doKeyAction(int keyCode, boolean keyDown);
   
}


My main panel which catches the key events does something like this:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
      addKeyListener( new KeyAdapter(){
         public void keyPressed(KeyEvent e){
            int keyCode = e.getKeyCode();
            boolean keyDown = true;
            KeyAssignments.getInstance().doActionsForKey(keyCode, keyDown);
         }
         
         public void keyReleased(KeyEvent e){
            int keyCode = e.getKeyCode();
            boolean keyDown = false;
            KeyAssignments.getInstance().doActionsForKey(keyCode, keyDown);
           
         }
      });


If I have a controlable entity which must respond to ASWD keys to move up down right and left then mapping those keys is as easy as:

1  
2  
3  
4  
      KeyAssignments.getInstance().addKeyAssignment(KeyEvent.VK_A, this);
      KeyAssignments.getInstance().addKeyAssignment(KeyEvent.VK_S, this);
      KeyAssignments.getInstance().addKeyAssignment(KeyEvent.VK_W, this);
      KeyAssignments.getInstance().addKeyAssignment(KeyEvent.VK_D, this);


That may very well be overkill at this point.  I think that the boolean values may fix your immediate problem of repeating key strokes.  But this may be something to think about once you move forward.
8  Game Development / Newbie & Debugging Questions / Re: Angle of slope for mouse movement. on: 2012-05-08 05:23:16
You shouldn't be using degrees at all here. Everything works with radians.

I understand that.  But the rotate method in SLick2D which I'm using requires degrees.

1  
2  
3  
4  
5  
rotate

public void rotate(float angle)

    Add the angle provided to the current rotation. The angle will be normalized to be 0 <= angle < 360. The image will be rotated around its center.


That's why I'm not using radians.

Also, while it says we're actually adding an angle to the existing angle it appears to work by simply feeding it the angle we calculated.  Although when I was coding the rotation of my tank turret I did have to get the current angle and subtract it from the calculated angle.  I'm reviewing my code now to see why it worked one way in one part of my code and another in a different part of my code.

I'm not asking for help, I'm just pointing out that it's interesting.  Wink

9  Game Development / Newbie & Debugging Questions / Re: Angle of slope for mouse movement. on: 2012-05-08 04:44:04
Quote
FTFY: atan2 takes care of all that.

Math.toDegrees(Math.atan2(diffX,diffY)) gives positive degrees if the target is to the right of the source and negative degrees if you're to the left.

But it turns out that the Slick2D rotate command understands that so now the code is:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
   public void doUpdate(int delta){
      Entity playerEntity = gameLevel.getPlayer();
      float px = playerEntity.getX();
      float py = playerEntity.getY();
     
      float diffX = px - getX();
      float diffY = getY() - py;

      turretGun.setRotation((float) Math.toDegrees(Math.atan2(diffX,diffY)));
   }
10  Game Development / Newbie & Debugging Questions / Re: Angle of slope for mouse movement. on: 2012-05-07 17:18:13
I just wrote very similar code for a game I'm working on.  In this code example I have a gun turret in a stationary object which I want to point at my tank.  My tank is the playerEntity.  The getX and getY are returning the X and Y of THIS object (My gun turret).

Notice that the atan and atan2 return a positive or negative number depending on which quadrant you're in so you have to adjust for that.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
   public void doUpdate(int delta){
      Entity playerEntity = gameLevel.getPlayer();
      float px = playerEntity.getX();
      float py = playerEntity.getY();
     
      float diffX = px - getX();
      float diffY = getY() - py;
      float angle = 0;
     
      // Protect against a divide by zero error
     if(diffY != 0){
         angle = (float) Math.toDegrees(Math.atan(diffX/diffY));
      }

      if(diffX >0 && diffY >0){
         // do nothing
     }
      if(diffX <0 && diffY <0){
         angle = 180 + angle;
      }
      if(diffX >0 && diffY <0){
         // Note, angle is negative so I'm actually subtracting from 180
        angle = 180 + angle;
      }
      if(diffX <0 && diffY >0){
         // Note, angle is negative so I'm actually subtracting from 360
        angle = 360 + angle;
      }

      turretGun.setRotation((float) angle );
   }


At turretGun.setRotation((float) angle ); my angle is the proper angle in degrees.  So now my turret's gun is pointing at my tank.
11  Game Development / Game Play & Game Design / Re: Proof of concept video. Slick2D tank game on: 2012-05-05 04:54:05
I have a new video here

I have mines which spew bullets.  Tank projectiles which have particle emitter smoke trails behind them, and a block of 5 mines at the top of the page which spew about 1000 bullets from off screen. Oh, and check out the explosions!  I'm using an explosion generator I found here which was written by Cliff Harris, the guy who wrote  Gratuitous Space Battles.

As a proof of concept project I think it's starting to come together.

And I have to say, after all the stress of building REST based stateless interfaces for legal matter management systems all day at work, this is vastly more fun.
12  Discussions / General Discussions / Re: Starting out here! on: 2012-05-04 21:36:32
Hello and welcome. 

I've found a lot of good ideas in the Slick2D library which wraps lwjgl and gives you some really interesting functionality quite quickly.
It also gives you all the ground work for game loops and the update/render loop.

Give it a try.
13  Game Development / Game Play & Game Design / Re: How can I make this unique? on: 2012-05-04 17:19:36
What is the story of your game?

What happened to your character before the game happened?

What must the player overcome in order to succeed?

Does the player/character have personal issues (mental, physical, emotional) which block his ability to accomplish his goal?

Is the character the only one who can solve this problem?  If so, why? How did the world get into this state in the first place?

14  Game Development / Newbie & Debugging Questions / Re: From where best learn Java? on: 2012-05-02 19:46:42
Bruce Eckel's book "Thinking In Java" is an excellent book which is available for free online here.


15  Game Development / Game Play & Game Design / Re: Proof of concept video. Slick2D tank game on: 2012-05-01 16:39:17
That's pretty cool. How are you handling the angle of fire (trajectory)?

I just found a much easier way to do this

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
   private void fireTurret() {
      double currentAngle = turret.getRotation();
      float bulletSpeed = 700;
//      float bulletSpeed = 0; // used for testing
     
      Bullet2 bullet = new Bullet2((int)0, (int)0, 0f, 0f);
     
      int halfBulletWidth = bullet.getImage().getWidth()/2;
      float theSine  = (float) (Math.sin(Math.toRadians(currentAngle)));
      float theCosine = (float) (Math.cos(Math.toRadians(currentAngle)));

      bullet.setDx(theSine * bulletSpeed);
      bullet.setDy(theCosine * bulletSpeed *-1);
      bullet.setXY(((int)getTankCenterX() -halfBulletWidth), ((int)getY() - bullet.getHeight()));
      bullet.getImage().setCenterOfRotation(halfBulletWidth,bullet.getHeight() + (getHeight()/2) );
      bullet.getImage().rotate((float)currentAngle);
     
      gameLevel.getPlayerProjectilesToAddList().add(bullet);
      lastFire= 0;
   }


setCenterOfRotation takes an x and y location relative to the image's current position. So it's not an absolute X/Y position, it's the number of pixels from the current x/y position.  So, I just draw the image in the proper location as if the turret is pointing straight up, then I find the relative center, then I rotate the bullet to whatever angle the turret is currently rotated at.  Also, I don't have to deal with sines and cosines in different quadrants since I'm no longer doing a double rotation which used arctan.  Now I just set the dx and dy (change in x and change in y) and let the bullet fly.

The bullet speed, by the way, as well as the Dx and Dy is in pixels per second.  So when I do that bullet's update I get the number of milliseconds since the last update and convert it to a percentage of a second.
1  
2  
3  
4  
   @Override
   public void doUpdate(int delta) {

      float slicePercent = ((float) delta) / 1000;


Then I just get the current x/y position, multiply dx by slicePercent and dy by slicePercent and add those numbers to X and Y and the bullet goes in the proper direction at the proper speed regardless of Frames Per Second.

All those rotate methods are part of the Slick2D library which call OpenGL via LWJGL so it's very fast. I'm still getting about 400 to 425 FPS.
16  Discussions / Miscellaneous Topics / Re: Who would you consider a programmer? on: 2012-04-30 21:07:17
Is this about to become a "You may be a programmer if . . ." thread  Grin

You may be a programmer if . . .

While playing a game you find yourself thinking "This would be a fun program to write."
When someone says "Push" you think stacks instead of shopping carts.
When someone says "Pop" you're not thinking about soda.
17  Game Development / Game Play & Game Design / Re: Proof of concept video. Slick2D tank game on: 2012-04-30 17:40:25
That's pretty cool. How are you handling the angle of fire (trajectory)?

It's just catching the sine and cosine of the difference in X and Y locations between the center point of the turret and the mouse position.

However, there was a glitch because the tank and turret have an x/y location within the world, and the mouse's x/y is within the view.  Since the camera class is scrolling around the tiled map I could place the mouse directly on the tank and the mouse would say x=500, y=500 but the tank would say x=500, y=3000 because we're near the bottom of the tiled map.  So I had to get the current camera position and subtract that from the tank's x/y position.

The other difficulty was that I could get the perfect starting position of the bullet such that it would appear at the tip of the cannon. It worked perfectly if the bullet was pointed straight up.  But once I rotated the bullet to match the rotation of the turret the graphic of the bullet would move.  So I had to calculate where the tip of the cannon is at it's rotation, then calculate how far off the tip of the bullet would be once I rotated it by that many degrees, and then shift the bullet so it would move back to the tip of the tank turret.  It's not exactly perfect but it's damn close.  

If I make the movement rate of the bullet 0 and fire a bunch of them while turning the turret I should see a perfect circle of stationary bullets.  What I get is an almost, but not perfect, circle.  I'll keep working on that.

I also had to remember that the sine and cosine of an angle return different positive or negative numbers depending on which quadrant you're in so you have to adjust for that.  But sending the bullets out properly rotated really adds a nice touch when firing non-round bullets.
18  Discussions / Miscellaneous Topics / Re: Where to get feedback on a Java App, not game? on: 2012-04-29 18:23:59
The Java Ranch forums might be able to help you.
19  Game Development / Game Play & Game Design / Re: Proof of concept video. Slick2D tank game on: 2012-04-29 00:38:57
Wicked nice! I so much want to get into Slick2D. Are you already familiar with the Java2D API? Just wondering what you think about Slick2D in comparison (so far).

I wrote this game entirely in Java2D and the tank game is in Slick.  I'm getting much better Frames per second in Slick2D.

Slick has some oddness to it, they overloaded the Image class so any time you used a BufferedImage you now use their Image class.  However, you load a class simply by handing it the file name and you're done.

Slick handles the game loop for you.
Slick handles transitions.  You'll notice in the video that the first scene fades out and the new scene fades in.  That entire transition is done with one line of code.
1  
game.enterState(Level1.ID, new FadeOutTransition(Color.black, 300), new FadeInTransition(Color.black, 300));


Slick2D already has particle emmiters so you can do fire, smoke, and waterfall effects.  It's also quite easy to rotate individual images without having to deal with affine transforms manually.

It also can handle a tiled background made from The Tiled Editor.  The code to load is is simply:

1  
TiledMap tiledMap = new TiledMap("assets/common/images/Map2.tmx");

What it doesn't have is a camera class to scroll around that map.  There's a class in the SLick2D forums which I used.  I think it should be part of the core SLick2D API.

Apparently, everything in Slick2D is wrapping lwjgl so all the graphics calls are being done in OpenGL.  This should mean that if I needed to use some sort of special OpenGL call I could do so.  I don't know enough about OpenGL yet to know if I can write shaders yet but that would be pretty darn cool.  Imagine a tank game in the dark where you can only see what's in the headlights.

The Tiled map creator which Slick2D uses so easily has some limitations though.  I'd like to have buildings which can show different levels of damage.  There isn't, as far as I can tell, a way to turn individual tiles on or off for a tiled layer.  I'd probably have to modify the Slick2D source code to do that.  Also, each level must be loaded up front so they take up memory for the entire game.  I'd rather see the level (or GameState class) take a string of the class name and as that level is requested it can lazy load it via Java Reflection.  I'd also like to see a boolean for a GameState class where I can say it's volatile.  That way, when we move away from that level we can tell the engine that it's ok to free up it's memory usage.


20  Game Development / Game Play & Game Design / Re: Proof of concept video. Slick2D tank game on: 2012-04-28 23:37:12
Try it now.

That's odd, usually, a private video can be seen if I supply the URL.  Private just means it won't show up in a search.
21  Game Development / Game Play & Game Design / Proof of concept video. Slick2D tank game on: 2012-04-28 20:42:22
This is some proof of concept code for a tank game I'm writing in Java using Slick2D and lwjgl libraries.

Fraps is making this much jerkier than it actually is. I'm actually getting about 550 Frames per second and the animation is really smooth.  

The first screen just shows a scrolling menu object I wrote.  Not only does the text scroll but the selected text fades in as selected and out when unselected.

I'm running a two image tank over a tiled map.  The bullets are coming out of the tank turret at the proper angle.  Also, I'm cleaning up memory properly so when a bullet goes beyond the edge of the screen it is released and garbage collected.  The debug text at the bottom shows the number of projectiles in memory at any point.

So far, it's been pretty fun learning the Slick2D library.

http://youtu.be/2iM_dBmKYKg



22  Discussions / Miscellaneous Topics / Re: 0x10c on: 2012-04-24 19:16:35
I love Minecraft and I really like many of the things Notch does to support the Indie Game community.  But the game 0x10c just doesn't strike me as fun.  Mojang has made so much money on Minecraft that Notch can build whatever he wants.  More power to him for doing what makes him happy and for trying something really different and weird.  But I just don't understand the vision for 0x10c and probably won't buy it.
23  Discussions / General Discussions / Re: Go on, ask me anything. on: 2012-04-23 22:20:33
The general gist of it is described here on the Puppyblog. The technical part is a simple use of some straightforward Java APIS:

That is an interesting solution.  I think you've found a great middle ground which both protects your property and allows easy access to your game for the player.

Once again, thank you for sharing so much of what you've learned.
24  Discussions / General Discussions / Re: How Long Have You Been Coding? on: 2012-04-21 20:09:54
My first coding was done on a teletype machine in my 8th grade science class.  Our teacher Mr Miller (I still remember him) had a connection to an IBM 360 main frame with a phone modem.  Our programs were saved on paper punch tape.  There was a line of holes down the middle of the tape for the feed sprocket. On either side of the tape there were up to 4 holes. Those 4 holes on each side (8 total) represented one byte.  You could literally see the bytes of your program visually represented on the paper tape.

That was in 1971.  41 years ago.  Now I really feel old.

In 1977 we had a computer lab at high school.  It was also attached to an IBM 360 mainframe.  That mainframe cost $250,000 at the time and right now, your iPad is more powerful.  We also had the first Apple computers come out at that time.  The Apple 1 was a kit.  The Apple ][ was a complete system with 8k of RAM.  That's right, not 8 Meg, but 8K.  If you wanted another 8k you needed to buy a $200 circuit board with about 40 chips on it.  We programmed in BASIC and saved our code to cassette tapes.

Then I got a TI 994A with a whopping 16k of RAM.  By the time you plugged in the extended BASIC cartridge you only had a bit over 13k left.  Back then in the golden age of computer programming as a hobby there were magazines and books you could buy which had the source code for very basic games.  You would type in the code and save it on a cassette and you'd have a game.  I learned a lot about how to write code, use subroutines, branching and looping by copying that source code.  Of course, you'd rarely type every single character in properly so you'd have to debug it.  It was a fun way to learn to write code.  I miss those kinds of books today.  I think a lot of people would enjoy them.

Then I went through a series of dead end jobs.  I decided to go back to school in my 20's to get my college degree at night school.  I had to work full time during the day to pay for my car and rent and food so I could only go to night school.  That limited me to only 2 or 3 classes per semester.  After far too many years I completed an Associate of Science degree in Applied Mathematics and a Bachelors Degree in Computer Science.   I started working in the QA department of Software Products International and eventually ended up running the QA department with a team of 4 QA testers under me.

I then moved to Software Sorcery where I was promised a job as a programmer but instead was put into phone support.  SS made games like Jutland; Aegis, Guardian of the Fleet, Conqueror 1086, and Party at Crawdad Creek.  It was my first exposure to a real game company.

I then moved into business computing where I worked originally in QA and eventually as a programmer for National Decision Systems (Now Equifax) and then for a series of small software companies.  I eventually moved to Union Bank of California where I helped build a major part of their online banking system in a team of about 40 people.  They still use the interest rate code I wrote over 10 years ago.

I then moved to Northern California to take a break from the stress of software development.  For about a year I taught music and had over 40 private music students.  I teach jazz and rock guitar, fingerstyle guitar, mandolin and banjo.  But the economy collapsed and I couldn't make enough money to pay my mortgage so I went back to software.

My first job back was at Vision Service Plan (VSP) where we wrote software where optometrist could bill VSP (which is an insurance company).  I then moved to Lexis Nexis where I've been ever since.  At LN we write the software which clients and law firms use to track their legal matters and bill invoices.   Our client list in confidential.  But we are allowed to say "I can't tell you who our clients are, but you've seen many of their commercials on the Super Bowl."  A lot of them are major insurance companies and food product companies.

I've been coding in Java since version 1.1.3 which would put it at about 1997.  Even though I use to code in C++ and MFC for Windows Applications I've never gone back once I started using Java.  For large scale web applications like Amazon, Ebay, and ours, Java is the way to go.  The "Write once run anywhere" ability lets us code on our desktops on Windows 7, transfer the code to Linux boxes for testing, Then to IBM AIX boxes for server use or Sun boxes for the servers.  Most of the time, it just works as long as you have all the right database drivers.

So that's the long answer to "how long have you been coding?'   A long freakin time  Grin
25  Discussions / General Discussions / Re: "goto" could be added to JDK8 on: 2012-04-21 19:04:59
I love the comment about GOTO in the book "Code Complete"

"Nine times out of ten when you want to use a GOTO, Don't!  In the remaining 10% nine times out of ten you don't really need it.  In the remaining 1% of cases think VERY carefully before you use a GOTO."

26  Discussions / General Discussions / Re: Ludum Dare on: 2012-04-21 19:02:30
I have been trying to register for LD for weeks.  I've tried 3 different emails and log in IDs and I never get the confirmation email.  I've been on their irc channel to ask if anyone knew how to fix it and other than "check your spam folder" and "did you type it in correctly" there were no responses.

I can't find and actual email address for anyone at LD.  I'd love to email them to see if they can find any of my registrations.
27  Discussions / General Discussions / Re: Go on, ask me anything. on: 2012-04-21 18:57:04
PrinceC:  First of all, thank you for this thread.  I've been coding as a job for over 15 years and as a hobby since the Apple ][ days (which probably makes me one of the oldest guys on this board) and I'm still learning a lot from this thread.

You talked a bit about the public/private key encryption which you used.  Could you discuss the actual data flow of how you use that encryption.  For example:

1) Somebody buys your game via PayPal.  What exactly happens to make their game work only for them?  How is this key generated and given to them?  How are you protected from somebody copying their key and handing it to somebody else?

2) Is there a login check when they start the game?  If so do you have a server which checks their key and authenticates it?

Thank you

Greg
28  Games Center / Contests / Re: Ludum Dare Question on: 2012-03-23 14:54:16
Hmm ludum dare has its own place to discuss things like this, but okay.

LD site has wordpress as backend. Sometimes in 5 years my experience in wordpress, it never happens. On your case, you're already registered but the mail bot is deactive so it couldn't reset your password. How long have you been experience this?

I didn't see a forum over at LD, but if it did I'd still be in this chicken and egg problem where I can't log in until I register and can't register until it can send me the email confirmation.   The problem has been happening for a couple of months.  I've never been able to log in.

I've checked my spam filter box and there's nothing from LD there. However, several emails seem to think that I need herbal V1agrA.  I wonder what they've heard?

[Later that day]

I started browsing the support forum at wordpress.  It looks like LD will have to make some changes to their setup.
29  Game Development / Newbie & Debugging Questions / Re: Custom JPanel Faster then Custom Canvas on: 2012-03-22 14:54:52
I know that Cavas supports public void createBufferStrategy(int numBuffers) while JPanel does not.  I just changed the code in a game project of mine from JPanel to Canvas.  I was using the image style double buffering as taught in the book "Killer Java Game Programming" inside a JPanel.  I was getting shaky graphics at 30 FPS once my large background images became more complex.  With a double buffered Canvas I set my max FPS to 150 (which is faster than my monitor's refresh rate) and it still ran smoothly

In the Canvas I use createBufferStrategy(2) to create 2 buffers.  Then in my paintScreen() method I get the Graphics this way:

Graphics2D g = (Graphics2D) getBufferStrategy().getDrawGraphics();

I draw to g and then call getBufferStrategy().show(); and g.dispose();

My guess is that the setDoubleBuffered and isDoubleBuffered in JPanel is saying that the JPanel is double buffered, but it's still painting when the OS tells the panel to repaint.  It's just telling you that behind the scenes the OS is using double buffering to draw the JPanel.

An interesting test would be to call setIgnoreRepaint(true) in your JPanel constructor and then call Toolkit.getDefaultToolkit().sync(); right before the g.dispose() in your JPanel code.  That should cause the JPanel to repaint when you want it to, not when the OS wants it to. 

My experience was that using createBufferStrategy and getDrawGraphics on the Canvas was vastly faster than using the JPanel.  But I was also using a clunky Imaged based double buffering technique which was suggested in that book and that may have been slowing me down quite a bit as well.  I wouldn't recommend his technique at all.  He's creating and throwing away a BufferedImage object for every frame.  Think of the memory usage of tossing away a megabyte image 60 times a second!
30  Games Center / Contests / Ludum Dare Question on: 2012-03-22 14:31:07
I have tried multiple times to create a Ludum Dare login.  If I try to register again I get the message: "ERROR: This email is already registered, please choose another one."  However, if I then enter that email in the reset password page it never sends me anything.

Is anyone else having these difficulties?  If so have you been able to solve them?
Pages: [1] 2
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

CogWheelz (15 views)
2014-07-30 21:08:39

Riven (22 views)
2014-07-29 18:09:19

Riven (14 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (32 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (42 views)
2014-07-24 01:59:36

Riven (42 views)
2014-07-23 21:16:32

Riven (30 views)
2014-07-23 21:07:15

Riven (31 views)
2014-07-23 20:56:16
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!