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

Only 24 hours in the day - High School Student stress tips.

Icon 5 Comments
Well, as a student, things are really beginning to take a toll. Right now, high-schooler's everywhere are preparing for the ever-looming AP tests and for end-of-course exams. I have a few tips on how to manage it all, but first let me tell you a little bit about myself. I am a sophomore in high school (yes...I'm young)... and am in all...
- - - - -

Transparent Swing Components

Icon 1 Comments
Transparent Components in Swing are not normally thought of, which leads to issues when adding components unsuspectingly to a component that already has a background and you don't see...
* * * * *

paint() vs. paintComponent(): A Resolution

Icon 7 Comments
Well, time to wrap up this "feud" (edit:not a feud, just a stance) that pbl and I have had regarding paint() vs. paintComponent(). I have been a little "childish" about this whole affair, but I have decided to redeem myself. This article is organized to show my old argument, pbl...
- - - - -

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,...

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

May 2020

2425262728 29 30

Recent Entries

Search My Blog

Recent Comments

1 user(s) viewing

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