Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (778)
Games in Android Showcase (231)
games submitted by our members
Games in WIP (856)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  Castle Trouble  (Read 9617 times)
0 Members and 1 Guest are viewing this topic.
Offline Max Pesce

Junior Devvie




Nil tam arduum quod non ingenio vincas


« Posted 2003-08-06 16:13:36 »

Hi

I'm proud to present you the first "real" game of Fishbros, its name is "Castle Trouble".

It has been created with our 2d library (Pyro2D) and it's pure 100% Java.

It's only an alpha versione but I hope you'll enjoy it.

Any comment, suggestion or bug report is well accepted Smiley


It can be found on our home page in the games section...

http://www.fish-bros.it



----------------------------------------------------------------

Tested on Mozilla 1.3, Explorer 6 and Opera 7.10.

Tested successfully on:

P4 (1.7Ghz,512Mb RAM, GeForce4MX)
P4 (1.8Ghz,384Mb RAM, Intel Extreme)
Acer Laptop (Celeron 650Mhz, 192Mb RAM, ATI Rage mobility)
Celeron (900Mhz, 256Mb RAM, GeForce2MX)
K7 (800Mhz, 256Mb RAM, GeForce2MX)

... sadly only with WinXP.


Here are some features:

- 12 test levels
- Two players on the same computer
- 640x480 screen size
- Less than 100 colors in in-game sections, and runtime calculated tile shadows to reduce download time
- Pure 100% Java (including the timer =) )
- Online playable
- So far only 185Kb


To do:

- More levels
- Harry up mode
- More and better sounds
- Intro and ingame music
- Customizable controls
- Server side highscore list
- Calibrate levels' difficulty
- Loading text during level change


To fix:

- On Opera 7.10 key events are not catch (strange!)
- When cpu load is high (at game startup) the timer is inizialized wrong.
- Audio libray sometimes gives very high latency (JavaSound isn't solid as it should be)


Suggestions:

- Controls appear in the bottom of select screen
- Please wait when level changes!

Offline Markus_Persson

JGO Wizard


Medals: 19
Projects: 19


Mojang Specifications


« Reply #1 - Posted 2003-08-06 16:39:40 »

That is really good!

The levels are a bit too easy, but for an alpha it's very good. =)

The graphics are perfect.

Play Minecraft!
Offline princec

« JGO Spiffy Duke »


Medals: 1060
Projects: 3
Exp: 20 years


Eh? Who? What? ... Me?


« Reply #2 - Posted 2003-08-06 17:07:57 »

Looks excellent (haven't played it yet coz I use Opera). Your website is really crisp as well. Top job.

Cas Smiley

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

Junior Devvie




no guts no glory


« Reply #3 - Posted 2003-08-06 17:32:51 »

1) Tested on Suse 8.2 with Java 1.4.2 works great Smiley
2) What are you using as timer?

(http://www.wannawork.de) - Will work for food
(http://tvbrowser.org) - Java EPG
Offline DrBizzar0

Junior Devvie




Raj raj!


« Reply #4 - Posted 2003-08-06 18:51:14 »

Nice looking game!

It runs fine with one exception, the game freezes for half a second when a sound effect is played.

Ran it on an athlon 2.0ghz , winxp, jdk1.4.2 and with a motherboard soundchip (abit motherboard)
Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #5 - Posted 2003-08-06 18:58:18 »

runs *extremely* slow on my box Sad

p4 @ 2.7 & Radeon 9700 np (!)

getting ~ 9 FPS

Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #6 - Posted 2003-08-06 19:04:53 »

Broken on Mac OS X.

Transparent areas of sprites - aren't.  I see a cyan background on everything that was supposed to have transparent areas.

Then it crashed Safari when I tried to move the critter.

I have seen the transparency problem on OS X in fullscreen mode.. but usually applets work fine.

Be sure to preserve the alpha channel in your sprites when you load them if you are moving them to managed images.
It seems that the default alpha channel for a new image may be 0 for Windows and 0xff for Mac?  Is this specified by the Java spec? (i.e. is it a Mac bug?)

Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #7 - Posted 2003-08-06 19:08:10 »

Quote
Your website is really crisp as well. Top job.


The website layout is broken on Safari.  There are gaps between images where there should not be any.
Mozilla Firebird has the same problem.
Sad

Offline Max Pesce

Junior Devvie




Nil tam arduum quod non ingenio vincas


« Reply #8 - Posted 2003-08-06 19:36:04 »

Yeah...

The site has not been tested with Mozilla. Sorry!
We are working on it.

We are working also on the bugs...

Matzon, can you give me more infos about your PC?
You should press F10 during game, it will show some
tech info. They could be useful to fix that bug.
Another useful thing could be the game log taken from the Java console.

For transparency I don't know what to say...
I simply load images using this routine:

1  
2  
3  
4  
URLClassLoader urlLoader = (URLClassLoader)getClass().getClassLoader();
URL fileLoc = urlLoader.findResource(basePath + name + EXT);
                 
img = tk.createImage(fileLoc);


As you can see I don't alter the images in any way.
I've already eard about different default transparency attribute on Windows and Mac OS, but I really don't know much about it.

Maybe I've a solution for the sound problem...

The timer adapts itself to the OS timer resolution, and use it as a "beat". All the game logic use that resolution to regulate its speed.

Many thanks for the help




Offline gregorypierce

Senior Devvie




I come upon thee like the blue screen of death....


« Reply #9 - Posted 2003-08-06 19:39:41 »

'splodes mightily on the latest version of OSX Panther. I've sent a report to Apple about it.

http://www.gregorypierce.com

She builds, she builds oh man
When she links, she links I go crazy
Cause she looks like good code but she's really a hack
I think I'll run upstairs and grab a snack!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #10 - Posted 2003-08-06 20:38:54 »

What format are the images? GIF or PNG?
What is the pixel format of your back buffer?

Offline SpuTTer

Senior Devvie


Medals: 1
Exp: 14 years


Lazy Middle Class Intellectual


« Reply #11 - Posted 2003-08-06 21:00:24 »

works great on my athlon 1800, Windows XP.

Great game, very professional !

Sacramento Volleyball
"Whitty phrase goes here."
Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #12 - Posted 2003-08-06 21:00:48 »

F10:
fps: 6
tmer res: 32
speed: 1.2
entities: 8

Quote
[] -- Debug Level = 1

[] App: Initialized

[] Loader : Loading classes

[] App: Input handler initialized

[] App.init() Running online

[] Game.constructor() Game created

[] App.start() started

[] App.start() buffer[0] is true Volatile!

[] App.start() buffer[0] is true Accelerated!

[] App.start() buffer[1] is true Volatile!

[] App.start() buffer[1] is true Accelerated!

[] App.start() buffer[2] is true Volatile!

[] App.start() buffer[2] is true Accelerated!

[] Game.init() Game initialized

[] Game.init() Loading DATA...
.
.
.
[] App.run() Main loop started.

[] App.run()   real Timer res : 16

[] App.run()    real Game fps : 31

[] App.run()  fixed Timer res : 32

[] App.run()         Game fps : 25
.
.
.
[] -> FPS: 1

[] -> FPS: 5

[] -> FPS: 6

[] -> FPS: 6

[] -> FPS: 6

[] RealFPS: 6       speed: 0.8064516
.
.
.

Offline Max Pesce

Junior Devvie




Nil tam arduum quod non ingenio vincas


« Reply #13 - Posted 2003-08-07 04:47:24 »

Hi

Thank you for site comments, now it WORKS as it should also on Mozilla 1.3, incredible the problem was caused only by the first line of HTML code! The doc-type, this is the fix:

1  
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">


Now I'm working on the game...

Soon I'll upload alpha 2 (and I'll reply all questions!).

Offline krypto

Junior Devvie




while(true) { self.caffeinate (); }


« Reply #14 - Posted 2003-08-07 12:30:47 »

java.lang.NoSuchFieldError: BLACK
     at fishbros.pyro.Loader.init(fishbros/pyro/Loader)
     at sun.applet.AppletPanel.run(AppletPanel.java:339)
     at sun.plugin.navig.motif.MotifAppletViewer.maf_run(MotifAppletViewer.java:119)
     at sun.plugin.navig.motif.MotifAppletViewer.run(MotifAppletViewer.java:115)
     at java.lang.Thread.run(Thread.java:479) Sad

JRPG Users -  General Users Site
JRPG Developers -  The JRPG Project's Home
Offline Max Pesce

Junior Devvie




Nil tam arduum quod non ingenio vincas


« Reply #15 - Posted 2003-08-07 12:38:40 »

Hi

I've tried to solve audio problem (Maybe DrBizzar0 will tell its OK), eliminating suspended sounds queque.

Eliminated a stupid third back buffer.

To swpalmer: That's the way I create backBuffers, I don't know what's their format because they respect the desktop format:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice gs=ge.getDefaultScreenDevice();
gc=gs.getDefaultConfiguration();
           
int i=0;
           
while(i<numBackBuffers){
      backBuffer[i] = gc.createCompatibleVolatileImage(width,height);
      ImageCapabilities iCap=backBuffer[i].getCapabilities();
                 
      if(iCap.isTrueVolatile()) Debug.print("App.start() buffer[" + i + "] is true Volatile!",1);
      if(iCap.isAccelerated()) Debug.print("App.start() buffer[" + i + "] is true Accelerated!",1);
                 
      if(backBuffer[i]==null){
            Debug.err("! App.start() cannot create backBuffer as VolatileImage!");
            return;
      }
      i++;
}


The graphics are all in 8bit PNG with one bit transparency. Maybe the "mask/transparency" problem on Mac happens only with 8bit pics and not with 24 or 32bit ones?
Can you give me a screenshot (not necessarily full size) of the game in action?


The problem posted by Matzon is probably related with the timer (it detects the right resolution, and the FPS but cannot run the game smooth).
I've tried to fix it by selecting at runtime another timer function. Maybe it's a hopeless try.

Inserted loading text between levels.

I've created my timer starting from the ORIGINAL idea of jbanes, that's the topic:
http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=share;action=display;num=1048008212

My timer also select the number of ticks per second to make the game run for example at 50FPS instead of 100 on a computer with 10ms of timer resolution, or at 32FPS instead of 64. This to prevent CPU overload.





Offline Max Pesce

Junior Devvie




Nil tam arduum quod non ingenio vincas


« Reply #16 - Posted 2003-08-07 12:41:44 »

Quote
java.lang.NoSuchFieldError: BLACK
     at fishbros.pyro.Loader.init(fishbros/pyro/Loader)
     at sun.applet.AppletPanel.run(AppletPanel.java:339)
     at sun.plugin.navig.motif.MotifAppletViewer.maf_run(MotifAppletViewer.java:119)
     at sun.plugin.navig.motif.MotifAppletViewer.run(MotifAppletViewer.java:115)
     at java.lang.Thread.run(Thread.java:479) Sad


I've patched it...
It should work now.

Thanks.

Offline jbanes

JGO Coder


Projects: 1


"Java Games? Incredible! Mr. Incredible, that is!"


« Reply #17 - Posted 2003-08-07 14:57:55 »

Quote
I've created my timer starting from the ORIGINAL idea of jbanes, that's the topic:
http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=share;action=display;num=1048008212


I should probably clarify something. The timer concept did not change when it became GAGETimer. The only thing that has changed is the addition of a hi-res timer for Windows. This was added because games require that sort of precision, not because it was a "cool idea". Using GAGETimer without the DLL will revert it back into its pre-GAGE state, but your game will not be able to time more than 20FPS on Windows 9x machines.

Quote
My timer also select the number of ticks per second to make the game run for example at 50FPS instead of 100 on a computer with 10ms of timer resolution, or at 32FPS instead of 64. This to prevent CPU overload.


Can you explain what you mean by this? Keeping time is a hardware task and should never strain the CPU. There has been some discussion on the use of AdvancedTimer.sleepUntil() since it uses Thread.yield() for as acurate of timing as possible. It won't actually overload the CPU tho, as the call simply tells other programs to do something while we're waiting.

BTW, the game looks nice. When do I get to play it on my new iBook? Wink  Grin

Java Game Console Project
Last Journal Entry: 12/17/04
Offline Max Pesce

Junior Devvie




Nil tam arduum quod non ingenio vincas


« Reply #18 - Posted 2003-08-07 15:59:18 »

Quote

I should probably clarify something. The timer concept did not change when it became GAGETimer. The only thing that has changed is the addition of a hi-res timer for Windows. This was added because games require that sort of precision, not because it was a "cool idea". Using GAGETimer without the DLL will revert it back into its pre-GAGE state, but your game will not be able to time more than 20FPS on Windows 9x machines.


I've only taken the "timer idea" (explained in your first post on that topic), because I'm not really interested in native solutions.
I know that a native timer is more accurate and that it don't gives problems on different Window versions, but my library is "online oriented" and so I cannot use any DLL.

I don't understand why Sun has not yet added a real timer (like the one packaged with Java3D) to Java2D.
In teory THEY could make a native timer for every platform!  :-/

Quote
Can you explain what you mean by this? Keeping time is a hardware task and should never strain the CPU. There has been some discussion on the use of AdvancedTimer.sleepUntil() since it uses Thread.yield() for as acurate of timing as possible. It won't actually overload the CPU tho, as the call simply tells other programs to do something while we're waiting.


I was not so clear.
The problem I've tried to solve happens when a computer has an "accurate" timer and its resolution (for example 15ms) forces the game to run above 50fps.
In that case I simply wait two beats in order to make the game run at half the framerate possible.
This to prevent the game from running at 100FPS (maybe too many for some computers) when it only needs 25FPS.

Nothing special  Roll Eyes


Quote

BTW, the game looks nice. When do I get to play it on my new iBook? Wink  Grin


Doesn't it run on iBook?


Offline troggan

Junior Devvie




no guts no glory


« Reply #19 - Posted 2003-08-07 16:08:13 »

Sun has added a new Timer at sun.misc.Perf with 1.4.2, but that is not the postition it will stay, it is hidden there because officially the .2 is only allowed to have bug fixes, new features only in 1.5 ...

(http://www.wannawork.de) - Will work for food
(http://tvbrowser.org) - Java EPG
Offline jbanes

JGO Coder


Projects: 1


"Java Games? Incredible! Mr. Incredible, that is!"


« Reply #20 - Posted 2003-08-07 16:19:24 »

Quote
I've only taken the "timer idea" (explained in your first post on that topic), because I'm not really interested in native solutions.

I know that a native timer is more accurate and that it don't gives problems on different Window versions, but my library is "online oriented" and so I cannot use any DLL.

I think you missed what I was saying. You can drop the DLL from existance and the timer will run just fine, albeit a little slow on windows. The worst that will happen is a nice exception printed in the Java log. The exception *is* trapped and will not impact your program in any way. Sorry you had to do all that work. Shocked


Quote
I was not so clear.
The problem I've tried to solve happens when a computer has an "accurate" timer and its resolution (for example 15ms) forces the game to run above 50fps.
In that case I simply wait two beats in order to make the game run at half the framerate possible.
This to prevent the game from running at 100FPS (maybe too many for some computers) when it only needs 25FPS.


Umm... huh? Beats are not tied to any framerate. It simply a matter of trying to keep your animation as smooth as possible. If the timer generates 1000 beats per second, for 10fps you only want to render once every 100 milliseconds. Usually you'll sleep in any left over time.

Quote

Doesn't it run on iBook?


Sadly, no.  Sad The loading screen comes up, the load bar fills, then the screen goes black. I'm using Safari 1.0 and OS X 10.2.

Java Game Console Project
Last Journal Entry: 12/17/04
Offline Max Pesce

Junior Devvie




Nil tam arduum quod non ingenio vincas


« Reply #21 - Posted 2003-08-07 17:18:58 »

Quote
Sun has added a new Timer at sun.misc.Perf with 1.4.2, but that is not the postition it will stay, it is hidden there because officially the .2 is only allowed to have bug fixes, new features only in 1.5 ...


Do you know when it will be released (I mean 1.5)?

Offline Max Pesce

Junior Devvie




Nil tam arduum quod non ingenio vincas


« Reply #22 - Posted 2003-08-07 17:32:57 »

Quote

I think you missed what I was saying. You can drop the DLL from existance and the timer will run just fine, albeit a little slow on windows. The worst that will happen is a nice exception printed in the Java log. The exception *is* trapped and will not impact your program in any way. Sorry you had to do all that work. Shocked


I've understand, but also if is possible to have ONLY in Windows case a -perfect- timer, I don't like to use it. This will give "perfect" results on Win, but at the same time I will remain slave of the imperfect timer on other platforms.

For the same reason I don't use yet rotations or tranparency. I'll simple wait for an accelerated implementation...
Shocked

Only a point of view  Cool

Happly things can only get better.

Quote

Umm... huh? Beats are not tied to any framerate. It simply a matter of trying to keep your animation as smooth as possible. If the timer generates 1000 beats per second, for 10fps you only want to render once every 100 milliseconds. Usually you'll sleep in any left over time.


Hmm, Ehrr...
Excuse my "out of mind" travel!  Embarrassed
I've fixed the "draw frames continuosly" problem only one week ago!
In fact now there's no more reason to use that timer trick.  Wink

Quote
Sadly, no.  Sad The loading screen comes up, the load bar fills, then the screen goes black. I'm using Safari 1.0 and OS X 10.2.


Can you give me a log of the game (taken from the console)?
Maybe I can do something.

Many thanks for your interest

Offline DrBizzar0

Junior Devvie




Raj raj!


« Reply #23 - Posted 2003-08-07 18:53:01 »

Hmmm nope, the sound is still freezing the game for a while. Maybe it's for a shorter time now, hard to tell, no big difference anyway.
Offline jbanes

JGO Coder


Projects: 1


"Java Games? Incredible! Mr. Incredible, that is!"


« Reply #24 - Posted 2003-08-07 19:28:17 »

Quote
I've understand, but also if is possible to have ONLY in Windows case a -perfect- timer, I don't like to use it. This will give "perfect" results on Win, but at the same time I will remain slave of the imperfect timer on other platforms.


Huh Now you've got me really confused. With the DLL, GAGETimer is designed to guarantee 1000 ticks per second or better on all systems. This means that it should be a "perfect timer" on all systems. The DLL is a workaround for Windows only! When Sun gets their own hi-res timer in, we won't even need that. The timer now known as GAGETimer, is simply an abstraction to allow code to manage time effectively. The old timer and the GAGETimer are one and the same. I just added an alternate timing source.

Quote

Can you give me a log of the game (taken from the console)?
Maybe I can do something.


Hmm... I can't seem to find where logs are in Safari. On the bright side, while looking for the logs, I found out that I just need to wait long enough and the game will appear. It works, but it's slllloooooowwwwwwwww... I think this is related to the Accelerated images problem. Mac Java Gaming is DOA until Apple fixes this. (Just tested GAGE Shooter example. Sure enough, 8 frames per second.)

Java Game Console Project
Last Journal Entry: 12/17/04
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #25 - Posted 2003-08-07 21:02:42 »

Quote
Can you give me a screenshot (not necessarily full size) of the game in action?

The game crashes the browser as soon as I try to move - so this is as close to 'in action' that you will get Smiley


Offline Max Pesce

Junior Devvie




Nil tam arduum quod non ingenio vincas


« Reply #26 - Posted 2003-08-08 03:54:35 »

Quote
Hmmm nope, the sound is still freezing the game for a while. Maybe it's for a shorter time now, hard to tell, no big difference anyway.


Maybe there's no difference at all...
I've done only a try.

I can't explain what that lag is, but for sure it is related with JavaSound.

What VM do you have?

Offline Max Pesce

Junior Devvie




Nil tam arduum quod non ingenio vincas


« Reply #27 - Posted 2003-08-08 04:04:59 »

Quote

Huh Now you've got me really confused. With the DLL, GAGETimer is designed to guarantee 1000 ticks per second or better on all systems. This means that it should be a "perfect timer" on all systems. The DLL is a workaround for Windows only! When Sun gets their own hi-res timer in, we won't even need that. The timer now known as GAGETimer, is simply an abstraction to allow code to manage time effectively. The old timer and the GAGETimer are one and the same. I just added an alternate timing source.


Never mind...
Now I've understand what you said  Cheesy

So the resolution trick has been integrated in GAGEtimer as one of differents beat source right?
And one of them is based on the DLL and works only on windows.  Shocked

This means you have more sources (more than two) or just that the old timer (the one I'm using) is simply more accurate on other systems?

Quote

Hmm... I can't seem to find where logs are in Safari. On the bright side, while looking for the logs, I found out that I just need to wait long enough and the game will appear. It works, but it's slllloooooowwwwwwwww... I think this is related to the Accelerated images problem. Mac Java Gaming is DOA until Apple fixes this. (Just tested GAGE Shooter example. Sure enough, 8 frames per second.)


I don't know if the problem is related only with accelerated images...
On my computer, running in pure software mode I cannot tell the difference.

Are you having the same transparency problem of swpalmer ?


Offline DrBizzar0

Junior Devvie




Raj raj!


« Reply #28 - Posted 2003-08-08 05:26:50 »

I'm using 1.4.2
Offline Herkules

Senior Devvie




Friendly fire isn't friendly!


« Reply #29 - Posted 2003-08-08 07:10:06 »

I experience trouble with the controls. Just doesn't react...

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Pages: [1] 2
  ignore  |  Print  
 
 

 
hadezbladez (350 views)
2018-11-16 13:46:03

hadezbladez (183 views)
2018-11-16 13:41:33

hadezbladez (349 views)
2018-11-16 13:35:35

hadezbladez (85 views)
2018-11-16 13:32:03

EgonOlsen (2179 views)
2018-06-10 19:43:48

EgonOlsen (2221 views)
2018-06-10 19:43:44

EgonOlsen (1379 views)
2018-06-10 19:43:20

DesertCoockie (2012 views)
2018-05-13 18:23:11

nelsongames (1671 views)
2018-04-24 18:15:36

nelsongames (2309 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46
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!