Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (565)
Games in Android Showcase (152)
games submitted by our members
Games in WIP (607)
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 ... 6
1  Game Development / Newbie & Debugging Questions / Re: Java Application and the host from where it is loaded ? on: 2010-11-06 22:45:35
I made an following method ->

public String getCodeBaseInetAddress ( )
      BasicService bs = ( BasicService ) ServiceManager.lookup ( "javax.jnlp.BasicService" ) ;
      return bs.getCodeBase ( ).getHost ( ) ;
   catch ( UnavailableServiceException ue )
      return "" ;

There was an jnlp.jar file i needed to download, it was 6.9k file, i later need to check if it needs to be signed or if it can be pack200.gz packed.
That method wont return error, i check this tomorrow, thanks and good night.


My second question on this getcodebase().gethost(), would it be ok, to just use every time the inetaddress.getbyname(IPTOMYSERVER); rather than this 6.9k packet ?
is there JVM things that activate when using getcodebase().gethost() rather than direct IP ?
2  Game Development / Newbie & Debugging Questions / Re: Java Application and the host from where it is loaded ? on: 2010-11-06 22:26:00
My humble knowledge of Java failed this time, i have no other experience on Interfaces than keyboard and mouse listeners.
I think i need few hours to understand how to activate BasicService, eh  Grin
3  Game Development / Newbie & Debugging Questions / Re: Java Application and the host from where it is loaded ? on: 2010-11-06 22:15:36

Would make things pretty simple to simply connect to IP Inetaddress of my server ? is this enough on/for every client, can webstart application also work this ways ?
Or is there special ways how getcodebase().gethost() works and is handled on JVM, so direct inetaddress is not enough to open two way transfer without firewall ?
4  Game Development / Newbie & Debugging Questions / Java Application and the host from where it is loaded ? on: 2010-11-06 21:36:20
Application Host!

I have earlier experience mainly with Applets, im now interested of testing an Java Application for my chess game.
When im on applets i can always have firewall free TCP/UDP two way transfer between the host from where applet is loaded and applet itself, with

Now as i go to sandboxed webstarted application, then how to get the inetaddress of an host from where sandboxed webstart application is loaded ?

And is the resolving inetaddress allways a two ways like the applet has ?
5  Game Development / Networking & Multiplayer / UDP : Two way transfers to server application <-> client applet ? on: 2010-11-02 20:31:54
Why my client applet from server wont open a two way transfer ?

my udp transfers from my client applet to my server, they travel allways right, but my transfers from my server to applet never success,
my home firewall allways blocks my packets, why so, why there is no two way transfer enabled, i am using applet ?

public void UDP_send () throws Throwable
   byte [] buf = new byte [ 4096 ];
   buf = "test packet 001".getBytes();      
   UDPsend.send ( new DatagramPacket ( buf , buf.length , received_from_applet_datagrampacket.inetaddress , 32323 ) ) ;

thats my test send code, from my server, this packet blocks to my home firewall, i dont know why.

do i need to have udp connect() from applet to server to make two way transfers between client applet and the server application ?
6  Java Game APIs & Engines / Java 2D / Java Graphics2D : Game site to JFrame holding Applet. on: 2010-10-09 21:47:18

Im not familiar how Java2D works on hardware level, my experiences on other than my own computer are my friends and library.
When im on my town library computers, i wont have success on Bufferstrategy, all my attemps to run Applet Canvas BufferStrategy have failed.
So, i went using Applet.createVolatileImage for doublebuffering, now my town libraryes work without problems, but my friend have WinXP computer
which fails to start my gamesite Applet and with my Linux Mint my Applet sometimes hangs when exitting my gamesite.

So, I currently have following ->

public class GameSite Extends Applet Implements Runnable 
    Chess chess = null;
    // all the game classes like that..
    public void init ()
        JFrame jframe = new JFrame ();
        //  jframe.setbounds & etc..
        jframe.add ( this );

    public void destroy ()
         jframe = null;
         chess = null;
         // null all game classes..
         super.destroy ();

    public void run ()
         while ( onrun )
               if ( gamemode == chess_init )
               chess = new Chess ();
               if ( gamemode == chess_run )
               // all the games like this..  

What would be the right way to end the life of my Applet, when it is build like that, and what may be the problem
why my friends WinXP fails to activate the Applet and why my Linux Mint sometimes hangs when exitting my gamesite.

This is very beginner of Java question, i anyway set it here Java2D.


7  Game Development / Game Play & Game Design / Re: Player sprite just doesnt move smooth? on: 2010-09-07 16:03:38

I have boardgames and clickclick site on a build, i only use Java2D with my project,
i have quite a smooth game play, i use following on my "render" loop.

if ( -- this.gamesurface_sync_delay < 1 )
   Toolkit.getDefaultToolkit ( ).sync ( ) ;
   this.gamesurface_sync_delay = 4 ;

My games on a build are found here ->

There may be some slowdowns at start on windows machines, but with linux it is quite a smooth all the way.
you may should choose the "Q" key for Air Pilots 1917 to see the best and smoothest for purpose, it is still to set only for 25 fps.

( Edit.  I also use scale for smooth movement, 1500-15000 pixels applet height, and 4:3 or 16:10, seems to be enough for me. )

( Edit2. I also have here my Caveflyer demo from 2007, it is quite a smooth too, even if it is not smooth at all, when game situtations
change fast game may look smooth, even if not ->


8  Game Development / Newbie & Debugging Questions / Java Graphics2D and MipMaps ?? on: 2010-08-03 13:53:46

My Java2d sprite engine is now build to use mipmapped bufferedimages and i want to ask a few questions on my mind.

- At first, is it enough to just simply use BufferedImages which are not accelerated, im with Java 1.5 and 1.6,
i have read at some forums that accelerated Images can sometimes lose the data they hold, my images are still quite fast even not accelerated.

- Secondly, is my MIPMAP engine rightly build, if it just simple make a BufferedImage chain for every image from max 2048x2048 to min 4x4,
and then when drawing, engine just checks if the mipmap image height is fit to screen height of image, or should i on some way too check the width of an image,
or even area of an image ??

- And at last, what is the best way with Java2D to create MipMap images, im having some unwanted results with RenderingHints INTERPOLATION and RENDERQUALITY and others.

I have get 30 % - 40 % increase of framerates, with the game demoes i have build with my mipmap java2d sprite engine.


9  Games Center / Archived Projects / Re: Chess, Checkers and WarBoards - Screen captures here from my Boardgames site !! on: 2010-06-02 16:04:01
10  Games Center / Archived Projects / Re: Chess and Checkers - I have some screen captures here from my Boardgames site !! on: 2010-05-27 08:40:22
11  Games Center / Archived Projects / Re: Chess and Checkers - I have some screen captures here from my Boardgames site !! on: 2010-05-26 15:42:32
12  Games Center / Archived Projects / Re: Chess and Checkers - I have some screen captures here from my Boardgames site !! on: 2010-05-24 05:34:46
13  Games Center / Archived Projects / Re: Chess and Checkers - I have some screen captures here from my Boardgames site !! on: 2010-05-23 13:36:42
14  Games Center / Archived Projects / Removed.. on: 2010-05-23 07:48:11
15  Game Development / Newbie & Debugging Questions / Re: Static Variables - Im on WinXP and LinuxMint, on Linux i have no problems ?? on: 2010-05-21 02:14:37

I have now removed all, i think, static variables from my code, thank you for pointing me my bug, i only had 4 game demoes to track down,
i will later on build atleast 30 AWT games to my site.

Im only a hobbyer with Java, i have no school history on computers.

so, i removed all static variables and changed my code to following style.

My chessgame for example holds 5 classes.,,,,

My variables are all on file.

I call it as following ->

at i have
public ChessGame_Variables vars = new ChessGame_Variables ();

and at other classes _Init, _GameLogic, _ScreenUpdate i have an contrucstors for vars,
public ChessGame_Variables vars = null;

public ChessGame_XXXXX ( ChessGame_Variables fvars )
    vars = fvars;

I hope i get it right this time Wink, i will work like this way on my futher releases too !!
It was a bit of a dump idea from me to try to build my Applets with static variables !!


16  Game Development / Newbie & Debugging Questions / Static Variables - Im on WinXP and LinuxMint, on Linux i have no problems ?? on: 2010-05-19 04:57:44

I have an boardgames site on a build.

I have all my game classes ( currently 4 games ) in one applet.

My problem comes when i restart my games, on WinXP my Applet wont work fully after i double choose a game, there is problems on variable updating ??

All my variables are on a static "style".

In what ways the Linux and Windows static variables differ, im with Sun Java


17  Game Development / Game Play & Game Design / .svg based animations with Java2D ?? on: 2010-05-07 17:15:21

I have an boardgames site on a build.

I have been creating an simple vector graphics class with animations + 3D for my project with java2d and generalpath.

I draw my vector graphics with Inkscape and after save, i convert plain .svg files to my own very simple .jvg format.

My plan is to build an animations of different sizes from my .jvg + .png + fonts graphics. ( Scale, onoff, fade, translate, etc.. ).

Im wondering if others here at the have been building similiar classes and editors for their own vector graphics,

and if some of you is already familiar with similiar flash style java animator software i would like to be linked.

I really dont have large animations on my mind, but would like to know how other folks have handled .svg based animations with Java.


18  Game Development / Performance Tuning / Java2D and SVG style Animations. on: 2010-05-05 10:58:46
Post moved ->

Sorry !!
19  Game Development / Game Play & Game Design / Re: 3D Sprites with Java2D ?? on: 2010-04-20 10:07:08

I have here link to my Java2D chessboard, chessboard has 2D sprites on, and few white horses floating over the board too.

chessboard ->  my link is not 24h.

I want to build an Java2D engine for polygons and scaled sprite2d and scaled sprite3d, my polygon and scaled sprite2d codes are almost ready,
i now only need few words for scaled sprite3d routines, if i build an object with blender, maybe this wwii time spitfire, what i mentioned
earlier, im sorry for my English, i may need few ways to build an sprite sheet from this blender object.

I think this way ->

Blender object "spitfire" is ready and saved as an .directx file.

I need to build an .directx file loader.
I only will use Java2D, so i only need color and polygons.

I need Java2D 3D engine.
I have my chessboard on my link, made with my 3d engine, which i think is enough for my spitfire too.

I need sphere type array for angles of blender object.

I draw every angle of my spitfire for my bufferedimages.
I dont yet know how many bufferedimages i should use for my 3d sprites, maybe some what of 64-96-128-??? ?

I next need help with math.
how i should calculate the right 3d sprite from bufferedimages, when my sprite is on my 3d area.
There must be some math for this too ??

I then just use my ready engine with my projects.

Well, when i writed it down it looks quite an ease task.

I remember Amiga and AtariST game "Battlehawks of Pacific ??" from somewhere late '80s or early '90s.
"Battlehawks of Pacific ??" used this way 3d sprites to create aireal battles between american navy and imperial japanese navy at ww2.

If you checked that chessboard demo at the top of my message you get the idea of what im planning to my site, i think a ww2 time
game over british channel would be nice, i really would presiede every detail what you may have to share for my 3d project,
i have really almost zero  experiense on 3D games, and when im only planning to use Java2D then this is a bit more complex to accomplish.


20  Game Development / Game Play & Game Design / 3D Sprites with Java2D ?? on: 2010-04-15 00:23:15

My 3D game area holds polygons and scaled BufferedImage 3D sprites.

Im currently planning to create my objects with Blender, objects hold only shaded/colored polygons no textures.
If i build an wwii time polygon Spitfire with Blender, then how i should build a sprite sheet for every 3D angle of spitfire and how many angles i need for xyz ??


21  Game Development / Performance Tuning / Re: Calculate angle between two points ?? on: 2010-03-31 07:28:07
22  Game Development / Performance Tuning / Re: Calculate angle between two points ?? on: 2010-03-30 21:07:46
23  Game Development / Performance Tuning / Removed.. on: 2010-03-30 13:50:32
24  Game Development / Game Play & Game Design / Re: Doublebuffer with 4 Volatile images. on: 2010-03-28 04:55:19
Why don't you use BufferStrategy? Providing hardware accelerated backbuffers is what it was designed for.

Though there is no guarantee that it too won't suffer from this same issue, which is obviously caused by the massive virtual screen resolution.


I was first using BufferStrategy but it didnt work well on my town library WinXP systems, well it didnt work at all, i just received an exception and Applet halted.
I was thinking that maybe there is some other users with same kind of system what my town library has, and i want my project to work well almost every computer.
With VolatileImage doublebuffer my project is working very well also with my town library WinXPs.

So, How i should be handling drawing on 4 volatile images, should i just trye to draw every image and shape to every single doublebuffer volatileimage and let the auto clipping handle clips ??

On my home system the Applet maximum size will be some what W:2000px H:1300px.


25  Game Development / Game Play & Game Design / Doublebuffer with 4 Volatile images. on: 2010-03-27 14:39:02

I have an Java2D project on a build, my project runs currently as an full browser Applet with a doublebuffer Volatile image.

I have situtations when my Applets goes very slow on screen update, sometimes a lot slower than 1fps, this happens only when my doublebuffer is very large.

I would like to avoid this problem by using 4 volatile images as a doublebuffer, as i currently use only one made by applet.createVolatileImage (...);
I think that putting them 2 by width and 2 by height is the right answer, my question is this, what is the right way to create four width 50% height 50% volatile images
to work as an doublebuffer.

And what is the best way to draw to thies volatile images, should i just let Java2D clip them and draw every shape and image to all of them, or should i build my own clipper ??

My Screen resolution is 4096x4096 with Linux Mint Virtual and Monitor 24" 1920x1200, i think is best to use 4 or more volatile images rather than just only one.


26  Java Game APIs & Engines / Java 2D / Re: Java2D build "lookAt" funktion for 3DPoints. on: 2010-03-21 02:30:43

Great, i now have an working AWT.lookAt ( Point3D , Point3D ); funktion on my 3D library, this was a great help, great !!

It is my first 3D engine this what im now creating,
i dont know if i really need this following bit on my project, but, would like to ask anyway,
what about an polygon airplane flying on 3D world, how about the rotating of plane nose and screen view around.

Is there just as simple formulas for airplane nose 3D rotatings and forward movings, as the formulas what i just received with lookAt question ??


27  Java Game APIs & Engines / Java 2D / Java2D build "lookAt" funktion for 3DPoints. on: 2010-03-20 08:54:03

I have here ->

My Java2D engine for my AWT 3D games, this is what im asking now.
My AWT 3D engine for my site, is almost done, but, i now need some tiny help with one funktion,
the funktion where i need this help is "AWT.lookAt( Point3D p3a, Point3D p3b );"

I currently have the following code to do rotation to certain Point3D(x,y,z);

if ( JC.keys[KeyEvent.VK_L])
          double xa = JMath.calcAngle ( new Point ( (int)AWT.eye_ypos, (int)AWT.eye_zpos), new Point(0,0) );
         double ya = JMath.calcAngle ( new Point ( (int)AWT.eye_xpos, (int)AWT.eye_zpos), new Point(0,0) );
         double za = JMath.calcAngle ( new Point ( (int)AWT.eye_xpos, (int)AWT.eye_ypos), new Point(0,0) );
         AWT.rotate3DTo ( xa , ya , za );

eye_(xyz)pos  is the location of camera, and the camera is looking to the Point3D (0,0,0);

The rotate3DTo ( xa,ya,za); rotates camera to look to selected angles.
When running code, I have success on y angle and some with x angle but when i change eye_zpos, then the look wont give right angles anymore.
I have tryed to look google and i have found several tutorials, but, they have been too difficult for me to follow.

Maybe some of here have some old lookAt tutorial on storage to help me !


28  Game Development / Newbie & Debugging Questions / Java Chess and other Boardgames engines ?? on: 2010-02-26 09:35:31

I have an boardgames site on a build, as im limited, so i personally cant offer a possibility to play
boardgames against computer, i was thinking that maybe there is a chance that some other folks have
already build open source Chess, Checkers, etc, etc.. engines.

I would like to ask, about, the most common open/free boardgame engines there is for Java.

As im also a very beginner with Java, i would love to have the engines to be that simple that
i could just enter an board situtation and computer would return an move and engine itself
could be on a .JAR file.

Im not very good English reading person, so i wanted to ask here at the Java forums.

Open Source Java engines for Boardgames : Chess, Checkers, CrossCheckers and all the others ??


29  Game Development / Game Play & Game Design / Re: Boardgames : Net boardgames on Java Applets ! on: 2010-02-16 12:04:28
Chess Graphics!

Hello! I have my boardgames now on my site,
i have my chess/checkers pieces and Air Pilots 1917, you can find them from this link ->

The Java Applet is at the bottom of the site, here comes some keys ->

F5 -> Chess.
F6 -> Checkers.
F7 -> Reversi.
F8 -> Air Pilots 1917.

All game demoes can be "controlled" with mouse, there is no real game rules yet implemented, rules are coming at near days/weeks/months.

so link to Applet at the bottom of the site ->

image link chess ->
image link reversi ->
image link checkers ->


30  Game Development / Newbie & Debugging Questions / Re: Testing Java capabilities !! JNI & C++ with Glut !! on: 2010-02-07 17:28:21
GLUT is old and just not very good. There are already several other Java bindings for using OpenGL in an applet, so do you mind if I ask why you specifically want to use it?


Im with my Ubuntu and i simply dont know any other OpenGL libraryes to Linux C++ than Glut and SDL, SDL it is too heavy to my use.

And as i dont want to use Applets surface to OpenGL, i have on my mind to build my entire game to C++ library and just launch it from Applet ??
Im not an professional game developer, this is just an hobby, is my way to approach OpenGL game programming too odd ??

This way i thinked i should go, as i am using C++ for game itself and Java for browser launch ??


Pages: [1] 2 3 ... 6
Riven (10 views)
2015-04-01 18:27:05

ags1 (27 views)
2015-03-31 10:55:12

theagentd (13 views)
2015-03-27 23:08:20

wxwsk8er (54 views)
2015-03-20 15:39:46

Fairy Tailz (48 views)
2015-03-15 21:52:20

Olo (29 views)
2015-03-13 17:51:59

Olo (33 views)
2015-03-13 17:50:51

Olo (40 views)
2015-03-13 17:50:16

Olo (44 views)
2015-03-13 17:47:07

ClaasJG (61 views)
2015-03-10 11:36:42
How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

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 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!