Saturday, September 14, 2013

MazeGen v1.0

   

     I recently worked on a small program I like to call MazeGen. It is a random maze generator with not much use other than to challenge your friends. However, I decided to release it because it is interesting to see what it comes up with (and to see how fast you can solve the mazes). The download link plus instructions is below:



Download version 1.0: Click Here

Instructions: while this software is not very difficult to use, I thought that it would be nice to include some instructions.
1. You will find that a zip file named "MazeGen v1.0" is located in your downloads.
2. Take this file and extract the files to a folder elsewhere.
3. Open this folder and you will find two files: launch.bat and MazeGenCode.jar.
4. Double click on the batch file and a command prompt window should open. If you have any problems up to this step e-mail me donsprogramming@gmail.com

Usage:
1. Once the program is open, you should see a prompt to enter the name of the finished problem, type in a name and hit enter. EX: mazetest1
2. Next it will ask you what size you would like your maze, note the estimated generation time (EGT) and type in tiny, small, medium, large, or gigantic. Then press enter.
3. You will now notice that it will print "placed section in coordinates X: (some integer) Y: (some integer)" in rapid succession.
4. When the command prompt window closes, open up the folder that you extracted the files to, it should contain a .png file now.
5. Open up this file, this should be your maze.

Solving: The mazes are intended to be solved starting at the blue dot in the middle and working your way toward the edge (note that you are following the white lines, not the black). Once you exit the maze (there should only be one exit), you have officially solved it!

     Lastly, I hope that everyone likes this software; but if you think something should be changed, leave a comment below. Happy solving!

Gigantic not hard enough? Try this maze, it's 16 times bigger! Download: Ultimate Challenge

*NOTE*: If you believe that a maze is not solvable under any circumstances, please email me at donsprogramming@gmail.com

Wednesday, June 5, 2013

Graphics Test "Creosote" is Coming Along

Just an update on the graphics test, it is now called Creosote and is starting to take shape. The player movement and collisions should hopefully be finished by tomorrow. Not only that, but now there are more people that are helping. Since this is going to be a puzzle game, I needed someone to make levels. This position was happily filled by "Ppaxson". Another contributor is "xXSniperCoverXx" who will be doing all of the artwork.

Here is a picture to show what the game looks like as of now (I know that it doesn't look like much):
While it's not very much, it is a start; and it will continue to be worked on.

Tuesday, May 7, 2013

Java Keybinding Tutorial

While making the graphics test, I ran into the problem of key listening. I tried the Java key listening API to no avail. Later on, a programmer that I know showed me how to do what I was trying to achieve with Java key binding. I went online and found that many other people were having the very same problem, so I decided to make a quick tutorial of what he showed me.

First you are going to need a main class that extends the JPanel class. Inside the main function (which you should place in this class) put the following code.

JFrame frame = new JFrame("Title of JFrame");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setLocationRelativeTo(null);
frame.setVisible(true);
ClassName classInstance = new ClassName();
frame.getContentPane().add(classInstance);

That code will just provide you with a basic frame so that you can add your panel to it, and an instance of your class. This code does nothing for the actual key binding, and that is why you need the next section of code.

classInstance.getInputMap().put(KeyStroke.getKeyStroke('a'), "doSomething");
Action pressedAction = new AbstractAction(){

    @Override
    public void actionPerformed(ActionEvent arg0) {

//Here you put the code that is run when you press the key

}
       
};
classInstance.getActionMap().put("doSomething", pressedAction);

The above code is for the actual key binding mechanics. You can fit this to your needs by replacing a with whatever keystroke you are detecting.

I hope that everyone liked that tutorial, and the graphics test will be released soon!



Monday, March 4, 2013

New background!

I made a new background for the blog, since the plain white seemed too bland. I made it by taking code from the server test (as mentioned below). and removed all spaces and tabs. Then I used some photo editing software to change the colors. Want me to change something about the background? Leave a comment and I will consider your opinion.

Sunday, March 3, 2013

I have decided to postpone work on DOTphysics. I just leaned html and Javascript, but yet do not have any use for them (as of now). Currently I am doing two tests, one is a graphics test, while the other is a server-side software test. Once these are both done I will make a program that includes both (most likely a game). Don't worry, I will release both of the tests and the finished product just in case anyone would like to try them.

Saturday, February 9, 2013

I'm working on a new program, called dotphysics. It simulates real physics using pixel-sized 2D balls. I know how to do the physics calculations, but I am still unsure about the graphics side of the program.