elberry's blog

Platform (1-3): TileMap done TDD.

Hey folks, it's been a while. I've been busy helping to roll out a whole new architecture at work, so I haven't had a lot of time to have fun here.

Regardless, after the last entry, I wanted to create a TileMap object that wasn't really tied to the view. I wanted to be able to test that the visibility function was working correctly wherever the TileMap's location was, and I wanted to be able to test this without creating a JFrame, and visually inspecting it.

Platform (1-2): TileMap quick test.

I was working hard in the last couple of days trying to figure out the best way to layout the components in order to create the UI as described in my last post.

What I've done so far is I've created a JFrame with a single JSGPanel as it's content pane.

At first, I had a separate node for each of the components:

  • Main View
  • Message View
  • Mini Map View
  • Status View

However, as I will explain, this didn't work out so great.

JSR-223 on jEdit.

Hey folks, been a while. I was on vacation for about a week, then I took some time off from the platform game to integrate JSR-223 into jEdit.

The ScriptEnginePlugin allows the use of any of the engines on scripting.dev.java.net to be used inside the jEdit plugin context. It also provides two utility-like methods for executing the buffer or the currently selected text.

Platform (1-1): The Layout.

I want to get better about documenting my process so that (a) my blogs won't be quite as long, and (b) I can go into my thoughts a little deeper.

That being said, I actually finished this a few days ago, but was extremely busy at a friends wedding this weekend.

The main view section will contain a close-up version of the map, showing much smaller region just around the characters position on the entire map.

The mini map view will contain a shrunken version of the map, with some position locater to signify the characters location in relation to the entire map.

A platform for a platform.

In my last entry, I mentioned moving on. It's taken me a while to gather all my thoughts, but here goes nothing. I am not a game developer, in fact I've made a nice living doing web development since I graduated college. However, I've always taken a keen interest in developing games. I bought my first Java gaming book back in college, "Black Art of Java Game Programming". A great book, definitely a good read.

TicTacToe (Part 5 - Final)

In the last Tic Tac Toe entry I tried to make the winner more noticeable and tried to pretty up things some. Honestly, I didn't like the end result. So this time I'm going to work on making the winner stand out even more. Last time I blurred the entire grid with the exception of the winning row, column, or diagonal. I still want to keep the blurring effect because I think it's a great way to remove the losing components from focus. However, blurring the entire grid really made everything look ugly and hard to see.

JavaFX: DesktopPane and InternalFrame components.

I was showing a buddy of mine JavaFX and he asked about the JDesktopPane. I didn't see one created, and I wanted to show him how easy it was to create components so I did it.

I'm sure there is plenty of room for more, but here's my first run at it.

package javafx.ext.swing;
import javax.swing.*;
import java.lang.*;
 * @author eberry
public class DesktopPane extends Component {
    private attribute desktop: JDesktopPane;
    public attribute frames: InternalFrame[] on replace {
        for(frame in frames) {

TicTacToe (Part 4)

Last time I figured out a way to solve our Tic Tac Toe board. Any winning move was printed out to the console. BORING!

This time I'm going to take a look at a couple of new things. First I want to change out the usage of a SGText node to use some images instead. The text node is nice and simple, but it just looks awful. Secondly, I want to signify the winner in a much nicer way.

Switching to Images

TicTacToe (Part 3)

Now that we've got some interaction in the game with our GridCellMouseListener, let's finish it up by figuring out who is the winner.

There are a couple of ways to solve Tic Tac Toe from a programmatical standpoint. For instance, you could use the brute force method of checking each possible scenario. IE, loop through each row first check for a winner, then loop through each column and check for a winner and finally if no winning rows or columns have been found check the two diagonals.

TicTacToe (Part 2)

Ok, now that we've created a simple grid, let's add some action and get our X's and O's going. Let's also take a little time to clean up the code and make things a bit more Object Oriented.