Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Computer Forums > Software Programming
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

Software Programming Software programming talk, ask questions about computer software programming or help others

Google
Closed Thread
 
LinkBack Thread Tools Display Modes
Old 06-12-2007, 10:21 PM   #1
T
 
T's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Game programming in Java ??

Hey,

Has anyone used Java to program games? I'm trying to decide what
programming language to use and I could do with some advice.

All the basic (Blitz and Dark) languages I have looked at seem to have good
API's for games, but I think it would be hard to write anything very big
because the debugging doesn't look very good. Also the demo's crash on my
computer. My biggest gripe with Blitz and Dark basic is that you can't tell
the compiler to force explicit vairable declarations. I also had a quick
look at the Real basic web site. The price is too high, and there doesn't
seem to be a game API.

C/C++ is OK, I would use either SDL or CDX. I have had a quick look at
these two. Unfortunately SDL seems focused on 2D and there hasn't been a
new release of CDX in a fair while.

Java is a nice language to code in. I have no experience in using it for
real-time stuff though.

Any comments are appreciated.


Thanks
Ty


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Advertisements
Old 06-12-2007, 10:21 PM   #2
Peter Ashford
 
Peter Ashford's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Game programming in Java ??

T wrote:

> Hey,
>
> Has anyone used Java to program games?


Yup

I'm trying to decide what
> programming language to use and I could do with some advice.
>
> All the basic (Blitz and Dark) languages I have looked at seem to have good
> API's for games, but I think it would be hard to write anything very big
> because the debugging doesn't look very good. Also the demo's crash on my
> computer. My biggest gripe with Blitz and Dark basic is that you can't tell
> the compiler to force explicit vairable declarations. I also had a quick
> look at the Real basic web site. The price is too high, and there doesn't
> seem to be a game API.


I have no experience with those languages, so I can't comment.

> C/C++ is OK, I would use either SDL or CDX. I have had a quick look at
> these two. Unfortunately SDL seems focused on 2D and there hasn't been a
> new release of CDX in a fair while.


C/C++ with SDL is a nice combination. SDL works well with OpenGL, so
it's not just for 2D. I've coded for this combination and liked it -
it's portable too

> Java is a nice language to code in. I have no experience in using it for
> real-time stuff though.
>
> Any comments are appreciated.


Java is fine for games using openGL (Jogl binding). For 2D, I wouldn't
use the standard drawing APIs, I'd go for 2D rendering over openGL for
speed.

Here's some good starting points for Java games:

https://games.dev.java.net/forums/
https://games.dev.java.net/



 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 06-12-2007, 10:21 PM   #3
Pierre Pintaric
 
Pierre Pintaric's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Game programming in Java ??

On Wed, 24 Sep 2003 01:33:24 GMT, "T" <csaweb@ozemail.com.au> wrote:

>Hey,
>
>Has anyone used Java to program games? I'm trying to decide what
>programming language to use and I could do with some advice.
>
>All the basic (Blitz and Dark) languages I have looked at seem to have good
>API's for games, but I think it would be hard to write anything very big
>because the debugging doesn't look very good. Also the demo's crash on my
>computer. My biggest gripe with Blitz and Dark basic is that you can't tell
>the compiler to force explicit vairable declarations. I also had a quick
>look at the Real basic web site. The price is too high, and there doesn't
>seem to be a game API.
>
>C/C++ is OK, I would use either SDL or CDX. I have had a quick look at
>these two. Unfortunately SDL seems focused on 2D and there hasn't been a
>new release of CDX in a fair while.
>
>Java is a nice language to code in. I have no experience in using it for
>real-time stuff though.
>
>Any comments are appreciated.
>
>
>Thanks
>Ty
>



It depends what type of game you are coding.
If it is a 3D game, openGL is a good solution, but you have to thing
if Java is the good way. C/C++ will be surely more easiest.
If it is a 2D game, Java is the best way, and you can find lot of API
on the web which can help you for things like collisions...

Good Luck


Pierre Pintaric
The Genuts Team.
http://www.genuts.com/
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 06-12-2007, 10:21 PM   #4
Frecklefoot
 
Frecklefoot's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Game programming in Java ??

"T" <csaweb@ozemail.com.au> wrote in message news:<Ev6cb.119942$bo1.55984@news-server.bigpond.net.au>...
> Has anyone used Java to program games?


Yes, but only professionally. ;-)

> All the basic (Blitz and Dark) languages I have looked at seem to have good
> API's for games, but I think it would be hard to write anything very big
> because the debugging doesn't look very good.


A good debugger is high in my priority list. What good is a language
if you can't debug it? That's why I didn't like Java very much, though
I used it for about a year. I could never find a decent debugger for
it. I guess I got spoiled by Microsoft's excellent IDE's!

> Also the demo's crash on my
> computer. My biggest gripe with Blitz and Dark basic is that you can't tell
> the compiler to force explicit vairable declarations. I also had a quick
> look at the Real basic web site. The price is too high, and there doesn't
> seem to be a game API.


I haven't used DarkBasic, but it'd surprise me if it didn't have a
game API. AFAIK, it IS a game API--that's their market. It also just
got an excellent review in Game Developer. What kind of game-related
API calls are you looking for?

> C/C++ is OK, I would use either SDL or CDX. I have had a quick look at
> these two. Unfortunately SDL seems focused on 2D and there hasn't been a
> new release of CDX in a fair while.


That's true, but I think what is there is still valid (CDX). You can
do 3D with SDL, but if you don't like it, you can use Direct3D or
OpenGL (if you want to be cross-platform).

> Java is a nice language to code in. I have no experience in using it for
> real-time stuff though.


Java is fine for most simple games, but I wouldn't use it for anything
too graphically demanding or 3D. It's 2D graphics API is nice, though
it takes some practice just like anything else. But few, if any, games
are or require realtime. Most games are programmed to be just "good
enough."

You've hinted at what you are looking for in a language, but haven't
said it explicitly. Do you need cross-platform support? Blazing speed?
2D as well as 3D support? Does it need to be OO?
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 06-12-2007, 10:21 PM   #5
Dr. O
 
Dr. O's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Game programming in Java ??


"T" <csaweb@ozemail.com.au> wrote in message
news:Ev6cb.119942$bo1.55984@news-server.bigpond.net.au...
> Hey,
>
> Has anyone used Java to program games? I'm trying to decide what
> programming language to use and I could do with some advice.
>
> All the basic (Blitz and Dark) languages I have looked at seem to have

good
> API's for games, but I think it would be hard to write anything very big
> because the debugging doesn't look very good. Also the demo's crash on my
> computer. My biggest gripe with Blitz and Dark basic is that you can't

tell
> the compiler to force explicit vairable declarations. I also had a quick
> look at the Real basic web site. The price is too high, and there doesn't
> seem to be a game API.
>
> C/C++ is OK, I would use either SDL or CDX. I have had a quick look at
> these two. Unfortunately SDL seems focused on 2D and there hasn't been a
> new release of CDX in a fair while.
>
> Java is a nice language to code in. I have no experience in using it for
> real-time stuff though.
>


Java is currently used in mobile games (i.e. mobile phones) as it's cross
platform. It is, however, still a lot slower than native code C/C++. I've
used C++/DirectX previously and it's very fast, although cumbersome to work
with. You'll have to work quite a bit just to get something working. Using
Darkbasic means you can spend more time on being creative instead of getting
things working. And the Pro version compiles to native code.






 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 06-12-2007, 10:21 PM   #6
Peter Ashford
 
Peter Ashford's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Game programming in Java ??

Frecklefoot wrote:
> "T" <csaweb@ozemail.com.au> wrote in message news:<Ev6cb.119942$bo1.55984@news-server.bigpond.net.au>...
>
>>Has anyone used Java to program games?

>
>
> Yes, but only professionally. ;-)
>
>
>>All the basic (Blitz and Dark) languages I have looked at seem to have good
>>API's for games, but I think it would be hard to write anything very big
>>because the debugging doesn't look very good.

>
>
> A good debugger is high in my priority list. What good is a language
> if you can't debug it? That's why I didn't like Java very much, though
> I used it for about a year. I could never find a decent debugger for
> it. I guess I got spoiled by Microsoft's excellent IDE's!


Eclipse is a free Java IDE with debugger. It's the only IDE I've ever
found that I liked better than Visual Studio.

>
>>C/C++ is OK, I would use either SDL or CDX. I have had a quick look at
>>these two. Unfortunately SDL seems focused on 2D and there hasn't been a
>>new release of CDX in a fair while.

>
>
> That's true, but I think what is there is still valid (CDX). You can
> do 3D with SDL, but if you don't like it, you can use Direct3D or
> OpenGL (if you want to be cross-platform).


You can't do 3D with SDL alone, but it does integrate nicely with
OpenGL. It does not support D3D.


>
>>Java is a nice language to code in. I have no experience in using it for
>>real-time stuff though.

>
>
> Java is fine for most simple games, but I wouldn't use it for anything
> too graphically demanding or 3D.


Actually, this is where I *would* use it the most - you hand off the
heavy lifting to the gfx card.

>It's 2D graphics API is nice, though


The 2d gfx might well be too slow - I've seen a number of 2d java games
which don't cut it because they're too slow. As I said previously, if I
was going to do 2d with Java, I'd sit it on top of Jogl (OpenGL for Java)

> it takes some practice just like anything else. But few, if any, games
> are or require realtime. Most games are programmed to be just "good
> enough."
>
> You've hinted at what you are looking for in a language, but haven't
> said it explicitly. Do you need cross-platform support? Blazing speed?
> 2D as well as 3D support? Does it need to be OO?


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 06-12-2007, 10:21 PM   #7
Peter Ashford
 
Peter Ashford's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Game programming in Java ??


> Java is currently used in mobile games (i.e. mobile phones) as it's cross
> platform. It is, however, still a lot slower than native code C/C++. I've
> used C++/DirectX previously and it's very fast, although cumbersome to work
> with. You'll have to work quite a bit just to get something working. Using
> Darkbasic means you can spend more time on being creative instead of getting
> things working. And the Pro version compiles to native code.
>


For 3D (Jogl/OpenGL), Java speed is fine because most of the work is
done by the Gfx card.


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 06-12-2007, 10:21 PM   #8
Dr. O
 
Dr. O's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Game programming in Java ??


"Peter Ashford" <me@here.there.com> wrote in message
news:xspcb.158108$JA5.3884048@news.xtra.co.nz...
>
> > Java is currently used in mobile games (i.e. mobile phones) as it's

cross
> > platform. It is, however, still a lot slower than native code C/C++.

I've
> > used C++/DirectX previously and it's very fast, although cumbersome to

work
> > with. You'll have to work quite a bit just to get something working.

Using
> > Darkbasic means you can spend more time on being creative instead of

getting
> > things working. And the Pro version compiles to native code.
> >

>
> For 3D (Jogl/OpenGL), Java speed is fine because most of the work is
> done by the Gfx card.


Sounds like a contradiction in terms to me. OpenGL is almost exclusively
used on PC's and therefore C++, VB or DarkBASIC would be much more obvious
choices. And even though a lot is done by the 3D card, there's still plenty
of overhead in the game logic, so speed does matter.


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 06-12-2007, 10:21 PM   #9
Peter Ashford
 
Peter Ashford's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Game programming in Java ??

>>>
>>
>>For 3D (Jogl/OpenGL), Java speed is fine because most of the work is
>>done by the Gfx card.

>
>
> Sounds like a contradiction in terms to me.


What terms contradict?


OpenGL is almost exclusively
> used on PC's


Ummm... no. Macs use openGL heavily too. So do most graphics workstations.

and therefore C++, VB or DarkBASIC would be much more obvious
> choices.


Why? What is "obvious" about using BASIC or C++ for openGL over using
Java? I could perhaps understand that argument being made for C or C++,
since openGL is a C interface, but why is BASIC more "obvious" to use
with openGL than Java?

And even though a lot is done by the 3D card, there's still plenty
> of overhead in the game logic, so speed does matter.


Have you profiled that and found out? I have done a lot of profiling of
windows/VC++/openGL, windows/SDL/OpenGL and windows/Java/OpenGL code
and I've seldom found many areas requiring radical optimization -
usually just using a sensible alogrithm does the job.

I've also profiled raw number crunching (floating point and integer
maths, array thrashing) in Java and VC++ and found the performance to be
very similar (for those tests, Java was about 80-105% the speed of C).
That means that unless you code very badly, there's no reason that your
game logic should go slow in Java.

Peter.


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 06-12-2007, 10:21 PM   #10
Dr. O
 
Dr. O's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Game programming in Java ??


"Peter Ashford" <me@here.there.com> wrote in message
news:qPLcb.159118$JA5.3916714@news.xtra.co.nz...
> >>>
> >>
> >>For 3D (Jogl/OpenGL), Java speed is fine because most of the work is
> >>done by the Gfx card.

> >
> >
> > Sounds like a contradiction in terms to me.

>
> What terms contradict?
>
>
> OpenGL is almost exclusively
> > used on PC's

>
> Ummm... no. Macs use openGL heavily too. So do most graphics

workstations.

Ok, same difference.

>
> and therefore C++, VB or DarkBASIC would be much more obvious
> > choices.

>
> Why? What is "obvious" about using BASIC or C++ for openGL over using
> Java? I could perhaps understand that argument being made for C or C++,
> since openGL is a C interface, but why is BASIC more "obvious" to use
> with openGL than Java?


Java is generally used in cross-platform business applications since speed
matters less there and the payoff of multiplatform execution is a great
boon. In games, you want the fastest performance possible. How many
commercial PC or console games are written in Java? None that I know off.
Speed matters, every drop of it. Until someone comes with a good native
code, static compiled version of Java and proves that it's 90% as fast as
C/C++ under similar circumstances, I won't give it a second thought. Also
note that a lot more tools (libraries and such) are only available for
C/C++. Don't get me wrong, I'm a Java fan (as in the language), but in the
entertainment industry competion is horrible, so you can't afford your game
having just a little less performance. On top off that, people won't like
them having to install a virtual machine to run your app.

>
> And even though a lot is done by the 3D card, there's still plenty
> > of overhead in the game logic, so speed does matter.

>
> Have you profiled that and found out? I have done a lot of profiling of
> windows/VC++/openGL, windows/SDL/OpenGL and windows/Java/OpenGL code
> and I've seldom found many areas requiring radical optimization -
> usually just using a sensible alogrithm does the job.


Maybe, but speed still matters and C++ is still quite a bit faster than Java
(especially startup and pre-JIT first-run). That may mean that may mean the
difference between 12 and 16 computer controlled opponents (compare the PS2
and XBox versions of "DTM Race Driver" for example).

>
> I've also profiled raw number crunching (floating point and integer
> maths, array thrashing) in Java and VC++ and found the performance to be
> very similar (for those tests, Java was about 80-105% the speed of C).
> That means that unless you code very badly, there's no reason that your
> game logic should go slow in Java.
>


Sounds too good to be true. And what kind of Java programming tools were you
using? Compiled or JIT interpreted Java?

But when you introduce your commercial Java PC/Console game, let me know.
I'll gladly eat my own words.








 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Featured Websites
Free Space
Free Space
Free Space Free Space
Closed Thread
Tags: , ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming languages Rick Software Programming 3 06-12-2007 9:42 PM
Professional VB6 Web Programming ukfreesell Ebay Technical Questions 1 05-31-2007 11:53 AM
WDS Programming - Search Remote Server Stuart Parker MSN questions 0 05-28-2007 1:45 AM
Programming section? thekl0wn Bugs And Feedback 10 12-28-2006 9:41 PM


Featured Websites




All times are GMT +1. The time now is 12:52 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98