Solved

Tips for non-Applet Java game needed

Posted on 2001-06-16
13
275 Views
Last Modified: 2012-06-27
I'm trying to my first game using java which I hope will eventually a cool Final Fantasy style RPG game. I'm not interested in making an Applet at all right now, I want this thing to be able to be as powerfull as I can get using java. So far I've been using a threaded JFrame object as my main screen but whenever I draw images at possition (0,0) it gets cut off by the title bar. So my question is, is there any way to get rid of the title bar and stuff from a JFrame object, or is there a better or different Top-level class that just has a drawing surface like an applet but not the annoying title bar and close box? Also if anybody can give any pointers or links to building a decent non-applet game with java it would help a lot and I'll raise the points for this question thanks a lot.
0
Comment
Question by:kainhart
  • 5
  • 3
  • 2
  • +3
13 Comments
 
LVL 15

Expert Comment

by:a.marsh
ID: 6197861
Well most tutorials are based around applets - but the key thing is that they teach you the key essentials - which apply even if you are not using an applet.

Some links for you:

http://modena.intergate.ca/personal/iago/javatut/

http://www.hotscripts.com/Java/Tips_and_Tutorials/General_Java/

Ant
0
 

Author Comment

by:kainhart
ID: 6198302
Thanks for the links, I already found and read through the first site on my own though. I'm raising the points because I wan't to get an definite answer quickly otherwise I will have to sweat out using Directx and C++, yuck.
0
 

Expert Comment

by:sgc2000
ID: 6198620
There is no way of getting rid of the title bar, it would be easier if you just try to solve the drawing problem another way. Also have you considered Java3D?
0
 
LVL 92

Expert Comment

by:objects
ID: 6199121
> or is there a better or different Top-level
class

Try JWindow.

> links to building a decent non-applet game

Also thought I'd mention, that any applet related references will still my mostly relevant for building apps. Applets and applications really just run inside a different context. The actual games development would not differ greatly. In fact in many case it's only a few extra lines of code to get an applet to run as an application and visa versa.

0
 
LVL 9

Expert Comment

by:doronb
ID: 6199778
Hi,


I'm just interested in what you're trying to do, and if you're already thinking C++ and DirectX why not give Java3D a shot?

Try this link:
http://www.3dlinks.com/3dprogramming_Java.cfm


Have fun and good luck!

Doron
0
 

Author Comment

by:kainhart
ID: 6200421
The only reason I didn't want to go with Java3D right away is because I plan on making a very 2D style game, like the old role playing games for Nintendo (eg. Dragon Warrior, Final Fantasy, Ultima ...).

I know you can do 2D stuff with 3D if you keep a constant coordinate possition for the z axis but I wanted to make my first game as simple as possible because I tend to dive into projects which are too much for me to handle on my own. The main problem I have with DirectX is that there is too much lingo and low-level stuff which I don't really care for as a begginer game programmer. I've thought about writing classes to abstract Directx 8 stuff so that I could use my own logic to initialize the hardware and do everything with with graphics and sound. I don't much at all about Java3D but from what I've read, it would only add more complexity and possibly a performance decrease for use with a 2D game. My Idea is to get my feel wet with a little RPG in Java and then when the Gaming API comes out in the Java SDK 1.4 release I will probably port whatever abstractions I've made for my first game to so that it uses the new API.

If I'm getting the wrong Idea about Java3D let me know, Otherwise I think my plan will work by using a JWindow which seems to lack a title bar. I'll test it out tomarrow and if there is no problem using JWindow I will give the user named "objects" credit for mentioning the JWindow which I actually found out about before he/she mentioned it unless somebody can post a better solution to my game programming stratagy.

objects, About using an Applet for making an application or the small amount of code you were talking about to switch between. I figured that there was probably a way to use an Applet for an application and to just call the inherited methods of Applet from a different start up class but I also read somewhere about how applets automatically change any image to 256 color mode and that would not be good for my graphics. Plus I figured that making extra method calls would slow things down a bit.
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 3

Expert Comment

by:Sendoh
ID: 6200931
hi !
think this might help u too....

http://java.sun.com/docs/books/tutorial/extra/fullscreen/index.html

this website shows how to make ur java apps to become fullscreen app :)

hope it helps...

regards
Sendoh
0
 

Author Comment

by:kainhart
ID: 6201139
Yeah thats part of the new API that I was talking about, but if you look closely it says it it will be available "Java 2 Standard Edition, version 1.4".
0
 
LVL 3

Expert Comment

by:Sendoh
ID: 6201209
yeap...
its one of the new features that jdk provided...(version 1.4)....
why not download it and have a try ?
anyway, it just a suggestion....not solution...:)
0
 

Author Comment

by:kainhart
ID: 6203451
where can I download it, the only version I see to download is 1.3. The version I have on my computer is "jdk1.3.0_02" stated on my JDK directory. I've looked all around and could not find any information about the release of 1.4, and I could not find where to download it, plus all of the classes that are talked about it that tutorial are not it the API documentation yet. So, if you know where to find the updated SDK please let me know because that would be a perfect solution to by problem.
0
 
LVL 92

Accepted Solution

by:
objects earned 150 total points
ID: 6204335
Hidden away, I think because it's still in beta:
http://java.sun.com/j2se/1.4

Enjoy :)
0
 

Author Comment

by:kainhart
ID: 6204435
Thanks, I don't know how you found it but thanks. Thanks to everybody else who helped out and gave me some links. I would give you all some points for this if I could.
0
 
LVL 92

Expert Comment

by:objects
ID: 6204448
Thanks for the points :)
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now