Subscribe to Dogstopper's Code Mania        RSS Feed
- - - - -

Full Screen Java Applications

Icon 2 Comments
Have you ever wanted to create full-screen games in Java? Well, you're about to find out. Just a note that the code that I will show you today does NOT work in Applets. If you want to make a full-screen application to be accessible on the web, make it a Java Web Start.

Today, we will encounter 3 classes you probably have not used before:
...
- - - - -

Font Madness

Icon 1 Comments
So, while programming my most recent game, I encountered several issues which just absolutely drove me insane - I wanted to use a custom font in my game. This is one that is not natively found on any machine, so I had a little predicament. Well, after doing some searching through the API, I stumbled upon the createFont()...
- - - - -

State Machines

Icon 6 Comments
Often, in games, a single screen needs to do many things, from having a title screen to actually playing the game, to having a game over screen, or a pause screen. Well, unlike all the other games that I have showed you thus far have only had one state: the game state. The Game State, up to this point, has been hardcoded into the host JPanel, but...
* * * * *

An Input Manager Class

Icon 11 Comments
Input in Games is handled through a series of events that trigger either mouse, keyboard, etc. input. Often, trying to have multiple states of the game as well as hundreds of sprites all trying to grab input at the same time through meager event handling can be difficult. And how about when more than one key is held down? And how can you make this...
- - - - -

Basic Bounding Boxes

Icon 2 Comments
In games, it is a very common operation to check whether or not two or more "sprites" (objects with an image) are colliding and if so, then they take action. I will now demonstrate this idea with a program that moves 2 balls closer toward each other until they meet, at which time, they will stop moving. I do this by testing a collision...
- - - - -

Loading Images for Gaming

Icon Leave Comment
This will be a relatively short blog entry. On many occasions, I have been asked how to load an image in Java that can be easily used for gaming purposes. Well, the answer? Many ways. The way I will show you in this entry is not the usually suggested method, but personally I have found it much easier to use than other classes like ImageIcon. The...
* * * * *

Structure Of A Game

Icon Leave Comment
Following the posting of my previous entry, I realized I had not talked about the simple things. My bad. Let me try this again. This tutorial explains the general structure that a Java Game *should* have. On the far outside, there is a JFrame that contains a JPanel. The JFrame manages things like size, location on screen, what happens on close,...
* * * * *

Frame Rate in Java

Icon Leave Comment
Well, as this is my first entry in the Game Programming section, I think I should link my introductory tutorial. http://www.dreaminco...topic143744.htm...

Page 1 of 1

September 2014

S M T W T F S
 123456
78910111213
141516171819 20
21222324252627
282930    

Recent Entries

Search My Blog

Recent Comments

0 user(s) viewing

0 Guests
0 member(s)
0 anonymous member(s)