Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (724)
Games in Android Showcase (216)
games submitted by our members
Games in WIP (791)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1] 2 3 ... 13
1  Games Center / Showcase / Nintaco -- NES / Famicom emulator on: 2017-04-18 14:06:56

Nintaco is a cycle-accurate Nintendo Entertainment System (NES) / Famicom emulator and NES Sound Format (NSF) player written in Java, ostensibly making it cross-platform. It supports the vast majority of games including those for the Famicom Disk System (FDS), Dendy and Vs. UniSystem along with a plethora of peripherals. It tracks play history, enabling the player to rewind time to undo mistakes, and to watch, export, edit and resume play at any point in the past. It supports netplay, save states, video and audio recording, video filters, screenshots, cheat codes, a debugger and a TAS editor. It can be controlled programmatically via an API. It provides automatic capturing of sprites and level maps. It even simulates R.O.B., the Robotic Operating Buddy.

Click to Play

Click to Play

Click to Play
2  Java Game APIs & Engines / Java 2D / Re: Drawing a BufferedImage to a BufferStrategy's Graphics object is slow on: 2015-03-15 23:20:20
I suppose you can, it simply takes a little work.

Thanks for the code guys.

How's the performance on that technique?
3  Java Game APIs & Engines / Java 2D / Re: Drawing a BufferedImage to a BufferStrategy's Graphics object is slow on: 2015-03-15 20:55:18
I think that most people who are concerned with performance use OpenGL/LWJGL in some form or another.

I'd be more than happy to if there were a way to manipulate the pixels of images like you can do with a BufferedImage.
4  Java Game APIs & Engines / Java 2D / Drawing a BufferedImage to a BufferStrategy's Graphics object is slow on: 2015-03-15 20:42:17
I am experimenting with full screen exclusive mode and I found that drawing a BufferedImage to a BufferStrategy's Graphics object is slow.  I'm using a BufferedImage as opposed to a VolatileImage because I want to constantly manipulate it on the pixel level.

BufferedImage buffer = new BufferedImage(256, 256, BufferedImage.TYPE_INT_RGB);
int[] pixels = ((DataBufferInt)buffer.getRaster().getDataBuffer()).getData();

Here's how I'm drawing it:

g = bufferStrategy.getDrawGraphics();
if (g != null) {
  if (!bufferStrategy.contentsLost()) {        
    g.drawImage(buffer, imageX, imageY, imageWidth, imageHeight, null);;        

The code certainly works, but I timed g.drawImage() and I found that it can take up to 10 milliseconds.  If I render directly to a Canvas within a JFrame, it takes a fraction of a millisecond. 

In full screen exclusive mode, it might be forced to convert the BufferedImage for compatibility reasons before rendering, which might be eating up all that time.  Or, it might be waiting for VSync or something.

Has anyone else noticed these performance problems?
5  Java Game APIs & Engines / Java 2D / Re: VSync on: 2015-02-18 21:03:47
In java2d it isn't.

In openGL (LWJGL and JOGL) you can set vsync on and off using their API's.

From the docs, it sounds like vsync is only possible in full screen mode.  Also, using those APIs, can I procedurally create bitmaps on the fly?  Each frame in my game is generated via direct pixel manipulation.  Currently, I'm doing this using a BufferedImage backed by an int array. 
6  Java Game APIs & Engines / Java 2D / VSync on: 2015-02-17 21:34:27
Is it possible to vsync animated graphics in Java in windowed or full-screen mode?
7  Games Center / Contests / Re: Java4K Competition 2015 on: 2014-12-07 01:06:49
I know that J4K sources often weigh in at > 35Kb, but then again they weren't golfed, so...

Code golf at that scale is evil. And Java isn't that great at it, considering the boilerplate. Wound be interesting to see though.

As an experiment, someone should take one of those large source files, remove all the white space from it, remove all the code comments and rename all the variables to single letter names to find out how small the source can potentially get.
8  Games Center / Contests / Re: Java4K Competition 2015 on: 2014-12-05 16:12:06
J44K Contest: you submit 1 Java source file no larger than 16K.
9  Games Center / Contests / Re: End of 4K. Thanks all! on: 2014-12-04 16:19:39
One of the downsides of Java4K became that you needed this insane toolchain to compress your classfile. The better your tools the better the odds of an advanced game. Your hacking skills became gradually less impotant. With my compile-n-shrink, I tried to level the playingfield, but it was really disheartning that when I tried to bring it up again the next year, I couldn't get the same compression ratios, as I overwrote the binaries with their latest versions.

If there were to be a new contest, I'd limit the sourcecode, as compressing that is somewhat within your own control, as opposed to the blackbox that Java4K tools became.

Agreed.  One year, Notch posted a version of your Compile-N-Shrink that could be executed offline.  I used it ever since, never fully understanding how it worked it's compression magic.  And, I always wondered how many people were disadvantaged by not having access to it.

J4K should be transformed into a contest where you just submit one source code file with some size restrictions on it.  Perhaps something like 16K of source. 
10  Games Center / 4K Game Competition - 2014 / Re: AgeOfCivilizations on: 2014-03-03 23:02:57
Fix the sorting order on those house sprites please.   Grin
11  Games Center / 4K Game Competition - 2014 / Re: Community voting on: 2014-03-02 17:50:58
Bloody Java plugin won't keep my security settings. I am running Windows 7 64bit. Whenever I change the Java security to low to try and run an applet, I go into any web browser(IE, Firefox, Chrome). As soon as go to the Java4k site and launch an applet it resets the security to high. Anyone else run into this? I am trying to look at the 4K games but I can't.
12  Games Center / 4K Game Competition - 2014 / Re: Java4k Launcher (v1.1) on: 2014-01-22 23:32:04
My Chrome browser just updated to the latest JRE.  Now, I get this error whenever I attempt to launch a 4K applet:

I'm sure I can tune the security settings, but I guess this is how most people will see the site from Chrome now.


Through the Control Panel, I was able to turn off the check.  Now, I get this:

13  Games Center / 4K Game Competition - 2014 / Re: 4K Game Competition - 2014 on: 2013-12-12 15:04:10
14  Games Center / Contests / Re: Discuss the future of 4k contest on: 2013-12-01 18:06:57
(New rule will be added, no more than 5 games per developer).
This would only affect zeroone... which makes me wonder... why?

Time is a limited resource and there are plenty of things to explore out there.  A cap on the number of entries is fine with me Smiley
15  Games Center / Contests / Re: Discuss the future of 4k contest on: 2013-11-26 16:27:34
Well, the launcher is more like infrastructure, it's not part of the contest.  It's like a helper for the website (which is PHP by the way), not a 4K entry.  And it doesn't supply any extra libraries or anything like that to the contest entries.  Think of it like a custom web browser, that only points to the games.  So you can turn off applets in your browsers, but if you want to browse and run the Java4K games, you still can.

The challenge is to code to an existing infrastructure.  A loader really is pointless for the following reason: Anyone can prove that they wrote a 4K entry by generating a pack200 jar no bigger than 4096 bytes.  Once that proof is submitted, you can run it directly from an uncompressed jar.  No loader is needed to play the game. 

If we move to a deployment model where the player launches the game from the command-line, then we probably have to drop pack200 unless someone discovers a way through existing options to get it to run.
16  Games Center / Contests / Re: Discuss the future of 4k contest on: 2013-11-26 14:54:34
Any extra component that does not come with an out of the box JRE breaks the spirit of the Java 4K Contest.  I'm all for downloading a binary and running it locally, but it must be executable through some command-line option.  If that is not possible with pack200, then I'd rather drop the pack200 compression than introduce some extra, special 4K lib that must be downloaded also.  Such a "loader" would contain bootstrap code necessary to get the binary to run.  That's cheating.  
17  Games Center / Contests / Re: Discuss the future of 4k contest on: 2013-11-25 22:10:41
Is it possible to run a pack200 jar from the command-line without extracting it assuming that the game runs in a standalone window?
18  Games Center / Contests / Re: Discuss the future of 4k contest on: 2013-11-18 21:31:42
Or, sign the applets for deployment and claim that we have a compression tool that proves it is 4K in principle.  Ugh.
19  Games Center / Contests / Re: Discuss the future of 4k contest on: 2013-11-18 20:08:12
That's the end of J4K.
20  Games Center / Contests / Re: Discuss the future of 4k contest on: 2013-11-18 16:18:44
I'm completely opposed to using source file size limitations, as it demands the creation of illegible code.

I am actually very interested in seeing what coders could accomplish with a 4096 octet source code file size limitation.  But, not for this contest.  Maybe we could spawn off a mini side competition or just a skills exposition.  The winners of IOCCC 22 were just announced and my entry is among them.  That contest has very strict size constraints and it is well known what hackers have been able to accomplish with so little space.  I also appreciate the anonymous entries and the collaborative judging process that they use.

I think HTML5 might be an interesting change, although browser support is a bit patchy.  I'm not sure what performance to expect at the moment, although there have been some interesting demos.  Not really relevant to a java gaming site though.

An android competition might be interesting and much more 'now' than applets.  I have a tablet which I could use.  There's a big range of android versions, screen sizes and processor performance, which might prove awkward when judging.  Specifying that it must run on (say) a Samsung Galaxy S4 (or whatever) would help, but would require outlay.  I could do with replacing my phone though, so would consider it.  I haven't looked at distribution, would we need to put entries into the android market?  Overall I think this holds the most promise for a lasting and relevant solution.

Since we don't seem to be heading towards a common agreement, perhaps it would be best to hold java4k as normal this year and accept that the games will be obsolete whenever oracle removes support for unsigned applets.  The risk is that the update that removes the functionality could come within the timeframe of the competition, which would be awkward.

Unsigned Applets are going to stop working completely?!!!  Where did you get that from?

For HTML 5, JS1K and the5k are already well known competitions.  A tiny Android competition sounds interesting as well.  But, again those are too distinct from what we have been doing here.

Needless to say, it's fun to code under an artificial constraint.  There's also retro-coding for all the obsolete game machines and computers of eras past.  E.g. why create another Atari 2600 clone for J4K when I could actually code up an actual game that runs on Stella.
21  Games Center / Contests / Re: Discuss the future of 4k contest on: 2013-11-14 20:59:23
Oracle don't have any disregard for the safety of applets - they're patching them like crazy. The problem is that major holes still keep turning up and the very idea of having this thin membrane of security between your computer and the entire internet is of dubious wisdom. I've turned applets off - permanently.

Cas Smiley

I am told the same by anyone to whom I send the link.  Maybe I should spend the time learning about HTML 5 games.
22  Games Center / Contests / Re: Discuss the future of 4k contest on: 2013-10-16 22:31:58
Could we obtain one digital certificate owned by for all the entries?  The entrants could submit pack200 jars that satisfy the size requirement.  Then, the submissions could be repackaged into larger jars that are signed for distribution.  And, browsers that have trouble with pack200 won't have to deal with it.
23  Games Center / Contests / Re: Discuss the future of 4k contest on: 2013-10-07 19:25:57
Considering my commented source usually comes in at 16k or even more, I suspect that even obfuscating it would result in getting significantly less code under the 4k limit.

Agreed.  But, it presents a new coding challenge.  Games under a 4K source code constraint would contain fewer features than a pack200 game.  It could be thought of as an entirely differently category of games within the contest or a completely different contest altogether.  I would go as far as limiting the source files to ASCII encoding (all byte values of the file less than 128).
24  Games Center / Contests / Re: Discuss the future of 4k contest on: 2013-10-07 17:58:40
It is really unfortunate that applets and webstart have fallen out of favor.  The security warnings these days scare away most.  And, if you are not using Windows, chances of a successful run diminish further.

The idea of a loader is interesting, but it also raises some problems.  If a pack200 jar is no longer considered as an executable deployment unit, then its only purpose is to prove that the game is compressible down to 4K.  The loader could just run a bunch of uncompressed class files directly.  From a similar vantage, some hypothetical, super compressed, proprietary pack4K format could be created just for the loader.

Someone compared J4K to the demo scene and I personally view it similarly.  For instance, their 256 byte assembly demos usually require VMs like DOSBox to run.  But, you could always fire up a real (old) PC to prove that it works.  They never introduced the idea of a loader.  If the spirit of the contest is to live within the constraints of Java, then we should not invent a new platform.  

All that said, I would like to see J4K take a completely new direction by removing the compressor and the platform/loader out of the equation entirely.  Instead of measuring the size of the deployment unit, measure the size of the source.  We could have some process strip out white space and comments and declare that as the size.  In addition, only distribute the source code.  Let anyone interesting in playing/voting compile it themselves.
25  Games Center / Showcase / Re: Jackal on: 2013-09-12 22:48:50
Nice game! It would be great if you add an independent control for the gun cause you would have a lot of tactical options.

Unfortunately, that feature was not in the original game and it would make the game way too easy.
26  Games Center / 4K Game Competition - 2013 / Re: Judging panel results. on: 2013-03-24 03:25:01
@appel, ra4king, ReBirth

Thanks for playing and writing up reviews for so many games.

I really like the games created by zeroone, and what is really great is that he always publish its source code so we can try to learn from it. Although the code is optimized for 4k games but he definitely has a style.

When I get chance, I'll write up a blog about the algorithms that I used throughout the years.  I'm always impressed with what people come up with and what can be learned from them.  For instance, the technique behind Alan Waddington's Die Z and Gef's Sorcerer4K appear similar and it's something that I never explored. 

I also had hard time in picking Dord or Rainbow Road (along with Flywrench, Fuego, M4nkala, Meltdown). Dord came to 1st spot for a moment but after played Rainbow Road I was confused.

I picked Rainbow Road over Dord. Reason is simple, I think I may be able to make something like Dord with some brain circuit fried but not RR. Not.

If I ever write up that blog, I'll explain the details of the driving game algorithms used in Out Run 4K and that game.
27  Games Center / 4K Game Competition - 2013 / Re: Dord on: 2013-03-11 18:53:06
I have played this game before.

I liked the gameplay. But I think I have played a similar game long time ago, just can't remember the name or plataform...

@zeroone did you take the idea from what games? You said this is an original one but I'm almost sure I played a game where the player code traverse the screen like Dord.

I borrowed ideas from many platformers.  The wraparound world is really an old video game convention.  It's present in Bubble Bobble, Super Bomberman 2 (and others in the series), Mario Brothers (the original arcade game), Super Mario Brothers 2 (see Fryguy's Boss Battle for instance), Super Mario Brothers 3 (World 7-1 for instance), Pac-Man (tunnels), Asteriods, and many others.  I wanted to create something portal-like that would not eat up a lot of bytes.

The spikes and appearing block sequences were inspired by Mega Man 2 (Heat Man's stage for instance).  In an early version, the player collected strawberries (Ms. Pac-Man inspired), but they morphed into strawberry-shaped diamonds after trying to come up with something more appealing to acquire.  The reverse gravity was inspired by Strider.  The enemy sprites are based on Space Invaders.  Originally, I had different enemy sprites.  But, I actually like the look better with all the same sprite, just different color variations.  The large eyes on the player and the enemies were inspired by anime and it's appearance in games like the Mega Man series.  The rotating orange enemy chains were inspired by the fire rods in the castles of Super Mario Brothers.  The rotating yellow enemies were inspired by the Zingers (the bees) in Donkey Kong Country.

The look of the player is actually a mix of 3 different things.  IBM released a Lode Runner ripoff called Freddy's Rescue Roundup in 1984 and I (as a little kid) used to play it on the IBM PCjr.  I borrowed the idea of a head with 2 feet from that game.  I already mentioned the anime eyes.  The third element also came from the IBM PCjr.  The PCjr was a PC with cartridge slots that IBM attempted to market as a game machine.  You could hook it up to either a PC monitor or a television set.  When used with a TV set, you had to switch it to a large font mode to compensate for the lack of resolution.  They provided a 40x25 text mode.  To give you a sense of how large those characters were, they are each roughly equal to 32x32 pixel tiles on a typical resolution today.  Somehow I taught myself Cartridge BASIC on that machine and I quickly discovered that (extended) ASCII characters 1 and 2 were happy faces.  I created a little platformer using character 1, even using the asterisks character as spikes.

And one more thing, I wanted a one word title that had no meaning.  Look up the word dord.       
28  Games Center / 4K Game Competition - 2013 / Re: Rainbow Road on: 2013-03-03 21:48:54
Hey zeroone trying to compile the source code provided in site but getting this at run time:

Exception in thread "Thread-1" java.lang.ArrayIndexOutOfBoundsException: 707

The page appears to be stripping out backslashes.  You can find a zip of the source at this mirror:
29  Games Center / 4K Game Competition - 2013 / Re: Fuego! on: 2013-02-27 19:58:04
Thanks for your replies!

What a luck, that my business-appointment tonight was canceled, so i could add further things to Fuego!  Grin

I added a slightly visible curved path from the player-ship to the mouse-position, which visualizes the skippers wish, where the vessel shall travel to. (So its not an accurate prediction of the path the ship will go, just a visual hint)
This should be a perfect tradeoff between the last two suggestions...

Further i've fixed a bug in the game-state-handling, when crashing into a sunk enemy-ship in "press-mousebutton-for-next-stage"-state. Now you can not be destroyed after you won a stage.  Wink

That helps a lot.  It feels like I'm dragging a toy ship with a string. I finally beat the first stage.  Since it's difficult to aim, can you make the enemy ships take fewer hits before they are destroyed? 
30  Games Center / 4K Game Competition - 2013 / Re: Fuego! on: 2013-02-26 19:43:40
Can you draw a target indicating where the ship is being directed?  I know it's following the mouse cursor, but the game does not provide a visual indication of that.
Pages: [1] 2 3 ... 13
buddyBro (229 views)
2017-04-05 03:38:00

CopyableCougar4 (657 views)
2017-03-24 15:39:42

theagentd (651 views)
2017-03-24 15:32:08

Rule (704 views)
2017-03-19 12:43:22

Rule (678 views)
2017-03-19 12:42:17

Rule (680 views)
2017-03-19 12:36:21

theagentd (694 views)
2017-03-16 05:07:07

theagentd (625 views)
2017-03-15 22:37:06

theagentd (465 views)
2017-03-15 22:32:18

theagentd (393 views)
2017-03-15 22:31:11
List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51 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‑
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!