I'm not quite sure why it took me this long to create this option. People have been requesting it since I first started Flack. After many silly hours spent on creating and optimizing this feature, I present to you: Full Screen Mode.
This part of the article will deal a little more heavily with the programming aspect. If you're not familiar with programming or Java's libraries, this might be a rough read.
First of all, I would like to mention that Flack uses the JFrame windowed features which is not really designed to aid game developers. In fact, I don't know any professional programs that implement this simple frame system. I would have saved a great amount of time if it had a method that said something like: Frame.setFullScreen(true);
Yet that method exists nowhere. You guys are probably conjuring tons of ways in your head right now of ways you would make the game full screen right now, but if you've never actually tried it, you're in for a boat load of similar problems I had; problems such as performance, buffered images, and resolution.
It was 3 in the morning and I was just about to go to bed. I had random thoughts such as: What should I do tomorrow? Why is my room cold? Why am I still awake? Yet the most random thought came to mind - What's a good way to make Flack full screen compatible? It hit me like a brick, I needed to simply use a buffered image to achieve full screen! I then hopped out of bed and began tapping away at the code.
In shortened form, a buffered image takes a container of painted images or items and makes them into a usable image. By usable, I mean that you can literally do anything with this image such as stretch or shrink, which is exactly what I did with it.
After the buffered image has been made, it is then positioned according to the screen size. For example, if the screen is not stretched it will place the buffered image directly in the center. Otherwise, the image will be placed at exactly 0x and 0y.
Sounds easy! But what about if the game is windowed? How will that work out if 0x and 0y are different locations with the screen? There solution is similar yet needs just a bit more code to work fluently.
The neat thing about this current build is that it can also be shrunken down properly. If for some reason you want to play Flack in a place you're not suppose to *cough class* then you can make it the size of a post-it note and play it at the same ratio.
In conclusion, I would not recommend using JFrame for your games. If I had to be honest, I would have used the Java Slick library that is available out there. I say this because it uses the lwjgl and it's curved to aid developers with features like this. If I chose to use Slick from the start, I'm pretty sure this game would have been completed long ago. haha!
Flack v1.2.1 changelog:
- Updated Flack's skin to enable a talk animation. Simply press the 'ctrl' button and he'll open his mouth. This was designed for video recording purposes...pretty random
- Updated the Keepers hitbox
- Removed the blinking purchase button within the shop...that was really annoying
- Decreased the time it takes for the Keepers trail to show up
- Decreased the time it takes for the Keepers audio to sound off
Flack v1.3 changelog:
- Added a full screen option
- Added a stretched screen option
- Removed mouse icon when playing
If this game could have one more feature, it would be Controller Compatibility. I think it would be pretty cool to play Flack with and Xbox360 controller. This also has been recommended by people on many occasion. Unfortunately, the number of players who would use this option are far less than you would expect. My only reason for not pursuing this feature now is work load vs. pay-off/time. After all, I am a full time student and that alone is time consuming
As always, thanks for reading and I hope you enjoy playing and listening about Flack!