Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (603)
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
1  Discussions / Miscellaneous Topics / Banned? on: 2005-01-18 08:02:37
Hey, why are IP's from National University of Singapore ( banned? I like to browse this forum once in a while, but now I have to use a VPN client for my home uni :-( I certainly never wrote anything here that would gain me a ban..
2  Game Development / Performance Tuning / Re: fubarNES NES emulator on: 2004-06-23 09:14:13
The code is written from scratch, not based on anything other than the documentation from
The webstart version won't work with games that use saveram unless a save directory can be created on the desktop (uses default directory). You could try creating that folder manually.

I've noticed it runs markably slower on some machines. The 1.2 GHz AMD Athlon family PC gives about the same performance as a 750 MHz PC at university (~55 FPS without sound and scaling), so I'll have to compare the specs some time. My own 2.0 GHz system performs a lot better, ~140 FPS. Maybe it's the cache size that's the problem, the CPU emulation code is quite big, and it also does a horrible amount of method calls (the picture processing unit and the sound unit is being clocked for every CPU instruction that's executed).
3  Game Development / Performance Tuning / Re: fubarNES NES emulator on: 2004-06-11 15:18:39
I know, but I've been modifying the code a bit, so it's not line 814 any longer..
4  Game Development / Performance Tuning / Re: fubarNES NES emulator on: 2004-06-11 08:49:06
Weird, I can't understand what can wrong there..

The code looks like this:

public void loadRom(){
            if(filechooser==null)filechooser=new JFileChooser();
            filechooser.setDialogTitle("Load ROM File..");
            MyRomFileFilter romFilter = new MyRomFileFilter();
            if(lastDirectory != null){
            int retVal = filechooser.showOpenDialog(this);
            if(retVal == JFileChooser.APPROVE_OPTION){
                  lastDirectory = filechooser.getCurrentDirectory();
                  String romFile = filechooser.getSelectedFile().getAbsolutePath();
                  boolean running = nes.getCpu().isRunning();
                        JOptionPane.showMessageDialog(this, "Invalid ROM file!");
                  windowCaption = "fubarNES - "+filechooser.getSelectedFile().getName();

Do you see anything that could go wrong there? (I've changed the code a bit, so the line numbers don't match) I have no problems running it on any windows machine..

BTW, I checked off 'Notify of Replies', but it doesn't seem to work..
5  Game Development / Performance Tuning / Re: fubarNES NES emulator on: 2004-06-10 12:53:24
Hi again,

I've done some changes to the rendering and sound code of the emulator, and now it seems to run a lot faster, at least on my computer. In fullscreen (without scaling) I get ~140 FPS with sound disabled (now, if only it wouldn't crash horribly on entering fullscreen mode the second time :-/) I'd appreciate feedback on whether you get it to run any faster now than before :-)

I've also made it webstartable:

There's still some trouble with syncing the sound, though Embarrassed
If the sound seems to be ok while the graphics stutter, it's probably because it runs too fast, causing the sound line to block.
6  Game Development / Performance Tuning / Re: fubarNES NES emulator on: 2004-03-17 11:20:47
(sorry for not posting in this thread for a while, but I've been busy..)

It seems like the performance problem is in the timing code. When the app needs to pause for a specified number of microsecs, this code is run:

public void sleep(long timeMicros){
           t1 = currentMicros();
           t2 = t1;
           while(t2-t1 < timeMicros){
                 if((t1+timeMicros)-t2 > 500){
                       }catch(Exception e){}
                 t2 = currentMicros();

currentMicros() uses the sun.misc.Perf counter.

Earlier, this ran very smoothly, but after some optimization of the cpu emulation, I got the same problems as I mentioned in the posts above. The speed drops by factor of at least 4. It seems like the looping is the problem, when I use this code instead:

           }catch(Exception e){}

it runs at normal speed (but not as smooth).
I tried combining the two, having it always sleep at least once, and adjusting the sleeping time, but it didn't help any. As long as it loops at the end of the interval, the speed drop occurs. Do you know of any solutions to this problem?

BTW, an applet version is now available here:
7  Game Development / Performance Tuning / Re: fubarNES NES emulator on: 2003-12-19 10:07:05
I don't get this.. I'm testing the emu on a system with 1.2 GHz AMD Athlon CPU, and it's slow as hell.. Why does it run faster on a 750 MHz machine?? What's up with java? (BTW I'm using 1.4.2_03).

I tried profiling the app, but it gave the exact same results as on the systems it works with. There's some garbage collecting going on, but not on that scale.. Any ideas?  Huh
8  Game Development / Performance Tuning / Re: fubarNES NES emulator on: 2003-12-03 13:54:28
It could be either a problem with the timing (I'm using the perftimer), or the sound code..
I've tested it on some 700 MHz pc's at university, and it seems to run at almost full speed with sound disabled, so I expect you should get more than 2-5 FPS if the code was correct..

I'll probably take a look at it after christmas, right now there are some horrible exams I have to study full time for  Huh
9  Game Development / Performance Tuning / fubarNES NES emulator on: 2003-12-02 20:46:55

I'm currently coding an NES emulator, and need some feedback on whether it will run/how fast on different systems..

Edit: Webstart version now available:

I've tried underclocking my own system, trying out different cpu speeds, but that's not likely to resemble the performance on a system with slower memory, etc. I want to know what is the lowest specs it will run on.
There is no FPS counter, but if the sound is ok, it should be locked on 60FPS.

The emulation is far from perfect yet, but a lot of games do actually work (like the Super Mario and Adventure Island games, Journey To Silius, Ducktales, etc). You'll have to get ROMs to test it with yourself, though   Tongue
10  Java Game APIs & Engines / Java Sound & OpenAL / Re: MIDI volume control problems on: 2003-11-30 15:42:44
I tried using the same code in my game, and had identical problems. It also made the applet version crash now and then, too (not in applet viewer though).
11  Java Game APIs & Engines / Java Sound & OpenAL / Re: Sound syncing in emulator on: 2003-10-29 09:35:37
The sound chip emulation and the sampling is clocked by the CPU emulation,  so I can't put it in a separate thread. If I don't sample at the correct time, the produced sound won't be accurate, especially at high frequencies. I've tried getting a smaller sound buffer, but it stays at 65536, which is way too big (is this device-dependent?).
12  Java Game APIs & Engines / Java Sound & OpenAL / Sound syncing in emulator on: 2003-10-25 11:19:32
I'm working on an NES emulator, and having problems with syncing the sound.. I'm using the Perf-timer to time the framerate, but it seems I'm still producing the audio too fast.
The sourcedataline buffer will very quickly fill up, and introduce considerable lag from when an event takes place in the game until it's eventually reflected in the music/sound fx.

The amount of samples produced each frame is constant, so it seems I'm producing a little bit too much. The problem now is writing the produced samples to the line without the buffer emptying, and also without writing too much.

What would be the best way to sync this? I've tried adjusting the sleep time between frames, and also sleep some extra when too many frames are produced, but it seems that no matter how I do it, I either get lots of buffer underflows, or a horrible lag.. Cry

I guess the real problem is, I don't know how much data is in the buffer at any given moment. The method for getting the available bytes before blocking doesn't seem to be updated frequently enough, so I can't rely on it. Is there any solution to this? Any sound package I can use that is better at this?
Any help will be appreciated :-)
13  Java Game APIs & Engines / Java 2D / Fullscreen Exclusive mode Access Violation on: 2003-10-19 11:54:33

I'm having problems with fullscreen exclusive mode, when changing display mode. I'm using two windows, one that is windowed all the time, the other is used in fullscreen mode.
The problem is, every time I switch back from fullscreen mode to windowed mode, I get this exception:

"An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x0

NOTE: We are unable to locate the function name symbol for the error
     just occurred. Please refer to release documentation for possible
     reason and solutions.

Current Java thread:
     at sun.java2d.DefaultDisposerRecord.invokeNativeDispose(Native Method)
     at sun.java2d.DefaultDisposerRecord.dispose(

Dynamic libraries:
0x00400000 - 0x00406000       C:\j2sdk1.4.2_01\bin\java.exe
0x77F50000 - 0x77FF7000       C:\WINDOWS\System32\ntdll.dll
0x77E60000 - 0x77F46000       C:\WINDOWS\system32\kernel32.dll
0x77DD0000 - 0x77E5D000       C:\WINDOWS\system32\ADVAPI32.dll
0x78000000 - 0x78086000       C:\WINDOWS\system32\RPCRT4.dll
0x77C10000 - 0x77C63000       C:\WINDOWS\system32\MSVCRT.dll
0x08000000 - 0x08136000       C:\j2sdk1.4.2_01\jre\bin\client\jvm.dll
0x77D40000 - 0x77DCC000       C:\WINDOWS\system32\USER32.dll
0x77C70000 - 0x77CB0000       C:\WINDOWS\system32\GDI32.dll
0x76B40000 - 0x76B6C000       C:\WINDOWS\system32\WINMM.dll
0x10000000 - 0x10007000       C:\j2sdk1.4.2_01\jre\bin\hpi.dll
0x003E0000 - 0x003EE000       C:\j2sdk1.4.2_01\jre\bin\verify.dll
0x008A0000 - 0x008B8000       C:\j2sdk1.4.2_01\jre\bin\java.dll
0x003F0000 - 0x003FD000       C:\j2sdk1.4.2_01\jre\bin\zip.dll
0x02CA0000 - 0x02DAF000       C:\j2sdk1.4.2_01\jre\bin\awt.dll
0x73000000 - 0x73023000       C:\WINDOWS\System32\WINSPOOL.DRV
0x76390000 - 0x763AC000       C:\WINDOWS\system32\IMM32.dll
0x771B0000 - 0x772D1000       C:\WINDOWS\system32\ole32.dll
0x5AD70000 - 0x5ADA4000       C:\WINDOWS\System32\uxtheme.dll
0x03010000 - 0x03060000       C:\j2sdk1.4.2_01\jre\bin\fontmanager.dll
0x51000000 - 0x51047000       C:\WINDOWS\System32\ddraw.dll
0x73BC0000 - 0x73BC6000       C:\WINDOWS\System32\DCIMAN32.dll
0x5C000000 - 0x5C0C8000       C:\WINDOWS\System32\D3DIM700.DLL
0x030F0000 - 0x030FD000       C:\WINDOWS\system32\PGPhk.dll
0x03110000 - 0x03119000       C:\Program Files\Samsung\Highlight Zone II\Highlight.dll
0x73DD0000 - 0x73EC2000       C:\WINDOWS\System32\MFC42.DLL
0x74720000 - 0x74764000       C:\WINDOWS\System32\MSCTF.dll
0x03170000 - 0x03193000       C:\j2sdk1.4.2_01\jre\bin\jsound.dll
0x72D20000 - 0x72D29000       C:\WINDOWS\System32\wdmaud.drv
0x72D10000 - 0x72D18000       C:\WINDOWS\System32\msacm32.drv
0x77BE0000 - 0x77BF4000       C:\WINDOWS\System32\MSACM32.dll
0x77BD0000 - 0x77BD7000       C:\WINDOWS\System32\midimap.dll
0x6FA00000 - 0x6FA07000       C:\Program Files\Gaim\idletrack.dll
0x76C90000 - 0x76CB2000       C:\WINDOWS\system32\imagehlp.dll
0x6D510000 - 0x6D58D000       C:\WINDOWS\system32\DBGHELP.dll
0x77C00000 - 0x77C07000       C:\WINDOWS\system32\VERSION.dll
0x76BF0000 - 0x76BFB000       C:\WINDOWS\System32\PSAPI.DLL

Heap at VM Abort:
def new generation   total 1088K, used 0K [0x10010000, 0x10130000, 0x104f0000)
 eden space 1024K,   0% used [0x10010000, 0x10010360, 0x10110000)
 from space 64K,   0% used [0x10110000, 0x10110000, 0x10120000)
 to   space 64K,   0% used [0x10120000, 0x10120000, 0x10130000)
tenured generation   total 12880K, used 8831K [0x104f0000, 0x11184000, 0x14010000)
  the space 12880K,  68% used [0x104f0000, 0x10d8fe10, 0x10d90000, 0x11184000)
compacting perm gen  total 5120K, used 5056K [0x14010000, 0x14510000, 0x18010000)
  the space 5120K,  98% used [0x14010000, 0x145003f0, 0x14500400, 0x14510000)

Local Time = Sun Oct 19 15:38:27 2003
Elapsed Time = 21
# The exception above was detected in native code outside the VM
# Java VM: Java HotSpot(TM) Client VM (1.4.2_01-b06 mixed mode)
# An error report file has been saved as hs_err_pid3200.log.
# Please refer to the file for further information.

I'm using 1.4.2_01 on WinXP, with ATI Radeon 9000 Pro, but my code doesn't work on other systems either.

Sometimes, the exception doesn't come until the windowed JFrame gets focus, other times it may wait for display change #2, but most of the time it comes right when the display mode is changed back.

Is there a workaround for this, or do I just have to wait for 1.5?
14  Games Center / Archived Projects / Re: Frogma Update (Platform game) on: 2003-10-01 09:52:46
I've used the html converter to require the java plugin when you enable the 'autodetect'. It's just that it only works with IE and Navigator (the latter not tested) -  when I tried having it support more browsers/platforms, it didn't even work in IE.

I'll update the page to be a little more informative..

BTW, I tried adjusting the control of the frog (speed, jumping height), but it made all the levels unplayable :-/
Seems I'll have to stick with it for now.
15  Games Center / Archived Projects / Re: Frogma Update (Platform game) on: 2003-09-28 15:20:49
I've planned having the shot as a power up, just haven't gotten around to it yet.. Same thing with the eggs.

Slowing the player down, however, would make it necessary to redesign all the levels   Tongue
It may be required, though, as most people who've tried the game have complained about the controls, I'll have to consider it.

You'll eventually get used to the speed, and that's mainly why I haven't changed it - after a year of testing, I'm obviously not a good judge of how difficult it is..
16  Games Center / Archived Projects / Frogma Update (Platform game) on: 2003-09-28 12:56:33
I've updated my platform game, Frogma, quite a bit now. You should have a look at it, here:

Be warned, though, the jar file is big (1.71MB  :-/), so you should have at least a DSL connection..

Move: left/right
Jump: up
Shoot: down/space

Collect frog eggs (ok, they probably don't look like frog eggs, but anyway..) and power ups, while avoiding hitting the enemies.
Find the princess to complete the level.

I'd really appreciate some feedback on the gameplay/playability  Smiley

PS: enabling the sound enhances the experience a lot!
17  Java Game APIs & Engines / Java 2D / Re: Really weird bug on: 2003-03-10 10:17:00
The easier code didn't work as expected.. I get the same slowdown on the second level in the game, perhaps it's because the alpha values are rounded differently? Also, when I do this in fullscreen mode, it gets 10 times slower than before.. Seems like I'll have to use LWJGL for the fullscreen version.
18  Java Game APIs & Engines / Java 2D / Re: Really weird bug on: 2003-03-07 23:32:56
Thanx!!!  Cheesy Grin
19  Java Game APIs & Engines / Java 2D / Re: Really weird bug on: 2003-03-07 07:03:47
But how do I copy the whole image w/alpha channel onto it? I'm a n00b in this, so could anyone tell me how I would do that? If I use the normal drawImage methods, the alpha channel wouldn't be copied, it would be used to modify the rgb channels as usual? The alpha channel in the destination image wouldn't be modified?
20  Java Game APIs & Engines / Java 2D / Re: Bugfix in 1.4.1_02 on: 2003-03-02 15:05:54
Do you have a link? I can't find it mentioned in the release notes..
21  Java Game APIs & Engines / Java Sound & OpenAL / Re: MOD Player in applet on: 2003-02-25 18:31:46
Thanks, I'll have a look at it..
22  Java Game APIs & Engines / Java Sound & OpenAL / Re: MOD Player in applet on: 2003-02-25 16:16:37
"Formats to be implemented:

No MOD support yet, it seems.. And there also are no releases of it, I'd have to get it from cvs :-/
23  Java Game APIs & Engines / Java Sound & OpenAL / MOD Player in applet on: 2003-02-25 12:11:53
I'm in need of a Java MOD player that will work in an applet. I've tried MicroMod, but I'm having problems with it. It works nice for playback of MOD files, but when I need it to stop playing, there's a delay of a few seconds. I need to switch between the background music pretty fast.
Since this is to be used in an applet, I can't use Audiere or openAL either. The applet uses J2SE1.4.0, so I can't use any MOD player written for 1.1.

I contacted the author of MicroMod, but didn't get any solution to my problem. The problem with MicroMod is that the sound buffer is too big, and javaSound apparently works badly with small buffers..

I'm really stuck here, hope someone here has a solution that will work  Tongue
24  Games Center / Archived Projects / Re: Platform game (not finished) on: 2003-02-25 04:45:50
I know how to JAR it.. I'm just too lazy  Grin
The next version will be in a jar file  :-/
25  Games Center / Archived Projects / Re: mortal kombat clone.. Would like feedback plea on: 2003-02-24 10:59:49
I'm unable to download it.. Says something to the effect of 'Remote loading' not allowed on Tripod.
26  Games Center / Archived Projects / Re: Platform game (not finished) on: 2003-02-24 06:56:35
The glitch you found was supposed to be a feature, although it's a little weird. The player was supposed to be able to jump a couple of loop cycles after falling, so it wouldn't be as difficult jumping from downhills.

There are more glitches, though:

- You can sometimes jump out of a hole after falling in, without touching the contents (the lava, spikes, etc.), because the player stops 1 pixel above the ground when you also steer him towards the wall (he's stopped because the collision logic in the player object is bad..).

- Try standing on the pipe in the little pond (in the first level), without jumping on the enemys. Now, let them hit the player. Sometimes, if you move the player the same moment they hit, he'll fall through the pipe object. This is because the collision detection doesn't handle objects that intersect at the _starting point_ of their movements very well.. I'll have to fix that some time.

- There is a platform object that moves up and down, found in the Castle level (#8, I think). If you jump into the bottom of it when it's moving down, you'll get stuck in the vertical direction, but you can move away from it horizontally.
27  Games Center / Archived Projects / Re: Platform game (not finished) on: 2003-02-24 06:39:26
Level 4 is the first level that was made.. But it is a _real level_, I don't really understand what you mean.. Didn't you find the goal?
There are 10 levels total now (although the last one shouldn't count, it's not very finished). There is no real ending though.

As for the Mario graphics, I used ZSNES to grab screenshots (press F1 during emulation, use menu to grab shots/advance one frame at a time), then photoshop 5 to cut out the parts I needed + creating the alpha mask for them.
BTW, I don't know how to create png alpha channels in photoshop 6 & 7.. When I save the images with those apps, the alpha channel gets lost, I don't know why..
Anyone who knows??
28  Games Center / Archived Projects / Re: Platform game (not finished) on: 2003-02-24 06:26:44
I didn't know you could just blit the images to compatible ones? Wouldn't the alpha channel be left out then? Or is it really possible to have it just _copy_ the image data (that is, _all_ channels - RGBA), without any alpha processing? I've tried this before, but then the alpha got lost.

29  Games Center / Archived Projects / Re: Platform game (not finished) on: 2003-02-21 21:27:09
Virum: Thanks  Grin I'm the level designer (most of the levels anyway).

Menus and passwords are coming, but at the moment I'm focusing more on removing bugs related to collision detection (the whole thing is a great hack.. nearly impossible to find the bugs  Cry)
I've implemented projectiles into it though, the frog can now shoot if you click Space. Should make it easier. If that's not enough, there _are_ cheat codes.. But I won't reveal them  Grin

mbishop78: thanks man! Cheesy I'm using the sleep timer now, and it seems to work pretty good. I haven't learned about synchronization and that stuff yet.. That's why I didn't understand how to use it.

SpongeBob: I'll try to fix this when I get the time.


I'm having problems using the applet with IE, it hangs when I close the applet window. I haven't got any trouble with the applet viewer, so I think the code is OK. Anyone else having the same problem  Huh
30  Java Game APIs & Engines / Java 2D / Re: Really weird bug on: 2003-02-19 17:29:02
I fixed the problem!
The problem was that I was using images with an 8 bit alpha channel (loaded directly from png files). I found some code I wrote earlier to make 1 bit alpha images from 8 bit ones, and used it. The problem went away! It's really fast now :-)

I'm sure this code could be a lot better (and of course lots more optimized), but if anyone wants to have a look, here it is:

public Image create1bitAlpha(Image src){
            PixelGrabber pg;
            MemoryImageSource memSrc;
            Image retImg;
            ColorModel colModel;
            int[] pix;
            int w=src.getWidth(null);
            int h=src.getHeight(null);
            int rgb,alpha;
            pix = new int[w*h];
            pg = new PixelGrabber(src,0,0,w,h,pix,0,w);
            }catch(InterruptedException e){
                  System.out.println("Unable to create 1bit alpha: couldn't grab pixels from image.");
                  return null;
            // Fix alpha channel:
            for(int i=0;i<pix.length;i++){
                  rgb = pix[i];
                  alpha = (rgb>>24)&0xFF;
                        alpha = 1;
                        alpha = 0;
                  pix[i] = (rgb&0x00FFFFFF)|(alpha<<24);
            // Create an image out of it:
            colModel = new DirectColorModel(,32,0x00FF0000,0x0000FF00,0x0000FF,0x01000000,true,DataBuffer.TYPE_INT);
            memSrc = new MemoryImageSource(w,h,colModel,pix,0,w);
            retImg = createImage(memSrc);
            return retImg;

(I dont' know how to format the code nicely here, or even if it can be done.. may not look nice)
Pages: [1] 2

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

The first screenshot will be displayed as a thumbnail.

rwatson462 (30 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (42 views)
2014-12-09 22:41:13

BurntPizza (76 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (51 views)
2014-12-03 16:27:13

CopyableCougar4 (49 views)
2014-11-29 21:32:03

toopeicgaming1999 (115 views)
2014-11-26 15:22:04

toopeicgaming1999 (103 views)
2014-11-26 15:20:36

toopeicgaming1999 (31 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50 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!