Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (576)
games submitted by our members
Games in WIP (497)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Square II  (Read 13369 times)
0 Members and 1 Guest are viewing this topic.
Offline Grunnt

JGO Wizard


Medals: 54
Projects: 9
Exp: 5 years


Complex != complicated


« Posted 2011-11-26 23:14:46 »

Hey all, I've just finished version 2 of the first game I've ever made. It's inspired by the popular Tetris, but with some small twists. The new version has much better graphics, an improved gui system, a settings menu, nice transitions, multiple level sizes, and more... Oh, and it's 100% free.

I built this in Java using Slick 2D (http://slick.cokeandcode.com/), and working with this library had been a breeze so far. I've built my own gui library, error handling, and other support code which I hope to reuse.

Feel free to play! I'd appreciate any feedback, especially on problems / exceptions you may encounter, even though I've tested this reasonably well. I've made a standalone installer for Windows (no Java required), which should making installing and getting started a breeze.

Features:
- Inspired by the legendary game of Tetris
- Complete a line of blocks of a single color and get triple points!
- Five different modes available: from baby (extremely easy with huge blocks) to Rain of Blocks (very difficult, with tiny blocks)
- High scores for each mode
- Available for Windows

You can download the game from the Square2 download page.

Please let me know if you encounter any problems! In case of problems, there should be an file named error.log in the game directory where you can find more details. My next project will be a bit more challenging and a bit more original, and will involve conquering the galaxy and pew pew lasers  Grin

Screenshots:


Offline ra4king

JGO Kernel


Medals: 322
Projects: 2
Exp: 4 years


I'm the King!


« Reply #1 - Posted 2011-11-27 02:36:18 »

Doesn't work on Windows. Apparently, it seems Square2.exe was originally Square2.jar and you renamed it. Sorry but it doesn't work that way. Also you extracted the lwjgl and slick jars into your jar when it would be best to leave them in their respective jars. You also included the natives inside your jar, however that doesn't work. You have to either leave the natives in the folder of the game or in a subfolder. Either way, you have 3 options to be able to run this game:
1. If you want us to run the game by double-clicking on the jar file, you will have to leave the natives in the root folder and modify the manifest to include the lwjgl and slick jars in the classpath like so:
1  
2  
3  
Manifest-Version: 1.0
Main-Class: full.name.of.MainClass
Class-Path: lwjgl.jar slick.jar

(don't forget to leave an empty line at the end)

2. If you want to put the natives in a subfolder, you will have to create a bat file for windows or a shell script for Unix that will look like so:
1  
java -Djava.library.path="natives/" -jar MyJar.jar

You will still have to setup the classpath like in option 1.

3. Use a third-party application that creates an exe for Windows or the appropriate distribution format for Unix. A really good one is launch4j. You can also use our own kappa's JarSplice which creates a jar file that has all the other jars and natives packed in there and it automatically extracts these resources to a temporary directory and deletes them once not needed Smiley

EDIT: Also, don't forget us 64-bit folks, you only packaged the 32-bit dlls Wink

Offline sproingie
« Reply #2 - Posted 2011-11-27 05:41:50 »

(don't forget to leave 2 empty lines at the end

As crappy as the manifest format is, what gives you the impression that the trailing blank lines are required?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ra4king

JGO Kernel


Medals: 322
Projects: 2
Exp: 4 years


I'm the King!


« Reply #3 - Posted 2011-11-27 06:15:20 »

They just are, I don't know why but if you don't include them you'll get a "Java Exception" when running the jar Wink

Offline Grunnt

JGO Wizard


Medals: 54
Projects: 9
Exp: 5 years


Complex != complicated


« Reply #4 - Posted 2011-11-27 10:06:53 »

Thank you for trying! I don't get what you tried to do though, since I used Launch4J to wrap the executable .JAR in a windows executable. I am very well aware that simply renaming a .jar to an .exe file does not work, how did you come to the conclusion that I did?

Thanks on the advice on including jars / excluding natives, I'll see if I can improve the packaging. And ofcourse the 64-bit ones :-)

Please note that there are two versions: one for windows (with a wrapped .exe file) and one for linux/mac. Which one did you try? I downloaded and extracted the game myself, and it works fine here.

Offline Grunnt

JGO Wizard


Medals: 54
Projects: 9
Exp: 5 years


Complex != complicated


« Reply #5 - Posted 2011-11-27 10:56:19 »

Oh, I just noticed that I posted this topic in "Featured Games" instead of "Showcase" by accident.  Undecided Shall I open a new topic in Showcase or can an admin move it? Sorry!

Offline ra4king

JGO Kernel


Medals: 322
Projects: 2
Exp: 4 years


I'm the King!


« Reply #6 - Posted 2011-11-27 11:31:14 »

I came to that conclusion because when I unzipped the EXE I saw a META-INF folder with a MANIFEST.MF inside Wink

An admin will most likely move it Smiley

Offline Grunnt

JGO Wizard


Medals: 54
Projects: 9
Exp: 5 years


Complex != complicated


« Reply #7 - Posted 2011-11-27 11:33:07 »

(don't forget to leave 2 empty lines at the end

As crappy as the manifest format is, what gives you the impression that the trailing blank lines are required?


I started reading up on manifest files, and noticed the follwing on the Sun site:
Quote
The text file from which you are creating the manifest must end with a new line or carriage return. The last line will not be parsed properly if it does not end with a new line or carriage return.
(http://docs.oracle.com/javase/tutorial/deployment/jar/modman.html)

So, not exactly two blank lines, but it does need a final newline (and hence one blank line).

Offline Grunnt

JGO Wizard


Medals: 54
Projects: 9
Exp: 5 years


Complex != complicated


« Reply #8 - Posted 2011-11-27 11:33:48 »

Ah heh, I'm kind of a newbie when it comes to jars and manifests, I'm reading up on it now.

Offline ra4king

JGO Kernel


Medals: 322
Projects: 2
Exp: 4 years


I'm the King!


« Reply #9 - Posted 2011-11-27 11:34:17 »

Oh so only 1 line? I must have been mistaken then :S

Try making a new EXE and include the 64-bit dlls plz Smiley

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Grunnt

JGO Wizard


Medals: 54
Projects: 9
Exp: 5 years


Complex != complicated


« Reply #10 - Posted 2011-11-27 12:46:58 »

I will, but I got to go for Sinterklaas-party with my family now first :-)

Offline sproingie
« Reply #11 - Posted 2011-11-29 06:10:46 »

Quote
The text file from which you are creating the manifest must end with a new line or carriage return. The last line will not be parsed properly if it does not end with a new line or carriage return.

All that means is that the last line has to be properly terminated.  Nothing about an extra CR/LF/CRLF required on its own line at the end.  I've written lots of manifests before (it's what OSGi uses for bundle metadata), and god is it ever an awful format, but I've not seen it require any blank lines at the end.

Doesn't hurt tho and it does ensure you terminate the last line properly, so it's not actually bad advice.
Offline Grunnt

JGO Wizard


Medals: 54
Projects: 9
Exp: 5 years


Complex != complicated


« Reply #12 - Posted 2011-11-29 13:02:53 »

I came to that conclusion because when I unzipped the EXE I saw a META-INF folder with a MANIFEST.MF inside Wink

Funny, I didn't know it was possible to unzip wrapped exe files. There is a manifest in the wrapped exe, though, because the exe is wrapped around the runnable jar. This runnable jar requires a manifest to point to the starting class. This is normal, right, that a wrapped exe includes a manifest file?

Anyway, I've been working on an Ant script to automate the build process a bit, and to improve the deployment package. The current runnable jar was generated using the Eclipse export function, but this gives very little control about what is included etc.

p.s. I see some attentive admin moved this thread, thanks.

edit: fixed typo

Offline kappa
« League of Dukes »

JGO Kernel


Medals: 70
Projects: 15


★★★★★


« Reply #13 - Posted 2011-11-29 13:31:47 »

Very nice and polished game. Would say though in terms of gameplay I find that the board is a bit too wide, so might be a bit more fun to make it less wide as you can clear lines quicker. The gui is very nice and smooth though.

Good job on actually completing something.

It do think its something that belongs in the featured section Smiley

btw your description says its available for both windows, mac and linux.
Offline Grunnt

JGO Wizard


Medals: 54
Projects: 9
Exp: 5 years


Complex != complicated


« Reply #14 - Posted 2011-11-29 23:03:33 »

Wow, thanks for the compliment!  Grin

And yes, the larger levels are a tad boring. I left them in for the possibility that someone would actually be bored enough to play through them..

My main goal for this game was indeed to make a game that was actually finished, and it feels really good to have one done now. I'm still struggling to get the deployment polished up a bit. I've been reading up on using Ant, One-Jar and ProGuard to automate and improve things a bit. These turned out to all be great and easy to learn tools, and now the game jar is much cleaner, optimized and includes the native DLLs that are extracted at runtime. And even better, I can now consistently make a nice deployment package. For the gameplay experience, not much should have changed.

One more thing: I'm working on a nice new mac and linux version that works (generated through my fancy new build.xml file), but that still needs a little time.

Offline ra4king

JGO Kernel


Medals: 322
Projects: 2
Exp: 4 years


I'm the King!


« Reply #15 - Posted 2011-11-29 23:43:38 »

Still no 64-bit dlls Cry

Offline Grunnt

JGO Wizard


Medals: 54
Projects: 9
Exp: 5 years


Complex != complicated


« Reply #16 - Posted 2011-11-30 00:21:51 »

Yup, sorry about the delay. However, I just uploaded new ZIP files for win, mac and linux. The windows and linux versions now also include the newest LWJGL DLLs in both 32bit and 64bit. (http://www.grunnt.nl/?page_id=21)

I hope it works on your computer now!

Offline ra4king

JGO Kernel


Medals: 322
Projects: 2
Exp: 4 years


I'm the King!


« Reply #17 - Posted 2011-11-30 05:07:51 »

Yay, it works now Smiley

Yep I agree with kappa, very polished and smooth, great job Smiley

Offline Grunnt

JGO Wizard


Medals: 54
Projects: 9
Exp: 5 years


Complex != complicated


« Reply #18 - Posted 2011-11-30 08:47:24 »

Thanks  Grin Glad it works now, and thanks for the advice.

Offline Grunnt

JGO Wizard


Medals: 54
Projects: 9
Exp: 5 years


Complex != complicated


« Reply #19 - Posted 2011-12-29 14:15:03 »

I’ve just put a new version of Square II online for each of the 3 platforms.

After observing some Square II gameplay sessions, I noticed that the game balance was a bit off. The baby mode wasn’t really easy, and the “huge” level size was a bit boring. In addition, the level size names turned out to confuse people (“huge” has got tiny blocks?).

In short, the changes are:
- The level size selection has been replaced by a selection of five game “modes”, ranging from “Baby”, which is very easy, to “Rain of Blocks”, which is very hard.
- Initial & max fall speed, and the rate in which fall speed increases has been tuned for each of the five game modes, so that in each mode the maximum falling speed is reached after 10 minutes.

Happy 2012!

Offline asphaltgalaxy

Junior Member


Medals: 1
Projects: 1



« Reply #20 - Posted 2012-01-02 21:08:10 »

Good one. Played on virtual machine full screen and everything went smooth. Liked your fonts. And think it is good to have executables for different platforms, probably you got some headache with that...

And gameplay was like bit too slow on normal board at the beginning... and too fast at the end Smiley

Happy 2012 too!
Offline Grunnt

JGO Wizard


Medals: 54
Projects: 9
Exp: 5 years


Complex != complicated


« Reply #21 - Posted 2012-01-02 22:49:00 »

Haha, glad you liked it, and good to hear that everything went smooth.

Actually, making versions for different platforms is not very difficult once you have a build script (for example using Apache Ant (http://ant.apache.org/). Though I havent got a mac, so I did not manage to test that version. Also, I'd like to make a nice wrapper for linux and mac versions, so that the linux one can be started as a shell script and the mac one as a normal mac app, hiding the java stuff a bit. Anyways, that's something for later.

Offline Grunnt

JGO Wizard


Medals: 54
Projects: 9
Exp: 5 years


Complex != complicated


« Reply #22 - Posted 2013-01-25 16:13:42 »

A small update: I've recompiled the Square2 game using Excelsior JET, which means that it is now a standalone application that does not require you to have Java installed. Also, it's got a nice installer, which makes the whole installation experience a lot more professional-looking.

You can download the new installer from the Square2 download page.

Pages: [1]
  ignore  |  Print  
 
 

 

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

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (12 views)
2014-04-15 18:08:23

BurntPizza (10 views)
2014-04-15 03:46:01

UprightPath (23 views)
2014-04-14 17:39:50

UprightPath (10 views)
2014-04-14 17:35:47

Porlus (27 views)
2014-04-14 15:48:38

tom_mai78101 (49 views)
2014-04-10 04:04:31

BurntPizza (107 views)
2014-04-08 23:06:04

tom_mai78101 (207 views)
2014-04-05 13:34:39

trollwarrior1 (176 views)
2014-04-04 12:06:45

CJLetsGame (182 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
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!