basic java games question

hi all
i just started write java game in a few months
i want to know 'bout basic game stuff :

first, bout using awt or swing
i read many java game tutorial that using awt for making games
but i think swing is more nice and clean :wink:
so which one is more efficient (faster) awt or swing??
is using swing slower than awt or vice versa

then bout full screen exclusive,
i rather confuse using full screen (how to do it) :frowning:
is using full screen really boost the speed or not?
i like windowed game, but if i continue write windowed game
is it easy to turn it into full screen game?
plz give me a fullscreen quick tutorial (the code in check resolution, turn it into full screen, and the difference paint method)
i don’t understand bout render, and checking screen resolution and turn it into resolution i want (what if the resolution i want not support by player computer? or player’s computer not support full screen mode)

then, bout applet or application
i try to use applet at first, but applet can’t read and write to file system,
so i change to application, but recently i read a tutorial that said applet can read/write using jarsigner
so which one good for build games applet or application?
i have many map,graphic,sound to load and player’s data to save
so i need file security and speed, i prefer applet
and regarding to my first question, using Applet or JApplet??

and the last question, bout editor
in building a game what do you all use? a GUI editor or not?
a notepad or jbuilder? i use notepad now, but i think the progress took very long time

okay, that’s all

thank you very much :smiley:

NB: i’m trying to make a massive RPG game, so i really think bout speed!

If you want speed, use LWJGL but you need to write everything yourself (like handling all mouse and keyboard input, drawing images etc.). If you want some stuff made ready for you (like ready-to-run mouse and keyboard listeners, drawing methods, etc.) use AWT, but that’s slower. If you want a lot done for you, use Swing but that requires a fast pc with LOTS of RAM (Swing is built on top of AWT and adds to its features). You might want to check out Java3D too.

About fullscreen… If you don’t want to use it, you just put ‘false’ to those method calls where you set the screen attributes like width and height. If the method provides fullscreen mode, you can set it on with true and leave it off with false.

Try to edit with Textpad ( http://www.textpad.com/ ) for starters. It is easy to start with but has LOTs of features for the advanced user. You definitely need syntax highlighting which Notepad wont give you. If you want to try an IDE, use Eclipse. But I recommend beginners use a text editor like Textpad or similar.

thanx the editor is very nice! i like it! ;D
but… it’s not free…!?

what’s LWJGL??

i use AWT now instead of SWING like u said

but i still can’t use full screen exclusive
plz show me more link to full screen exclusive tutorial
especially more example, i’m better learn by example

i still confuse how to use active render, where to put the code?
and if the player’s computer not support full screen, where to put repaint method? how to use buffer or page flipping??

and where to put my drawing code?

how to change to my desire resolution?
(800x600x16 or 640x480x16)

please gimme the windowed code and fullscreen code
where’s the difference

is applet can use full screen exclusive?

See the Shared Code section. There is a posting that has the complete stripped down code for doing fullscreen in Java.

[quote]thanx the editor is very nice! i like it! ;D
but… it’s not free…!?
[/quote]
Yeah, if you are honest, you’ll pay the fee. But you can take your time testing the product as you are not missing anything as long as you don’t pay, it’s not some 30 day trial that expires. The only thing you see is once in a while, when you save a file, it will remind you that you haven’t registered yet. That’s all. A small annoyance. Pay for it, when you publish your fist game or something. ;D

[quote]what’s LWJGL??
[/quote]
LighWeight Java Gaming Library. It is a work in progress, version 0.4 if I remember correct. Contains low level libraries for graphics, audio and input devices. See http://java-game-lib.sourceforge.net/

But if you are a total newbie, it may get a bit hairy at some times as it is yet a work in progress and that affects the level of documentation. If you are just beginning game stuff, you can use AWT for your first projects just fine (or even Swing if you don’t mind it needs a lot of memory to work okay) and then try out LWJGL when you get to the point that you really need more control or speed than AWT gives you. AWT is fine for the games one can make when learning.

[quote]i use AWT now instead of SWING like u said
[/quote]
I use AWT for all my actual game projects at the moment (I’m not that experienced at making games) but I keep my eye on the progress of LWJGL just in case I want to try it out later.

i’m a java newbie, i’m delphi programmer before
it’s too hard if i must make my own component >:(
so i’ll stay using awt i think ;D
thanx anyway for LWJGL

hey, where’s the shared code section??
i can’t get to there
always stuck in this discussion forums section

i need many fullscreen exclusive tutorials, i need it bad :wink:

and what bout Applet and Application? which one is the best for developing RPG game??

by the way, what’s VolatileImage? what’s the difference from common Image?

thank youuu

It is one of the forums, see the forum index carefully, one of them is titled “Shared Code”.

[quote] need many fullscreen exclusive tutorials, i need it bad :wink:
[/quote]
You have been to this page?
http://java.sun.com/docs/books/tutorial/extra/index.html

[quote]and what bout Applet and Application? which one is the best for developing RPG game??
[/quote]
That depends on you alone. Do you want the game to be played from web browser? Or do you want it to be a completely separate application. If you make it an applet, you may have to be more carefull about what version you use as not all browsers have the plugin installed. If you make it an application, you are more free to do what you will. If you make it an applet, it is simple for people to start playing. If it is an application, you must include instructions on how to install it, including mentioning that they must have JRE installed before. Have you read about Java Web Start? It is a way to install applications from web so it is easy to the customer. Go read about it at http://java.sun.com/

[quote]by the way, what’s VolatileImage? what’s the difference from common Image?
[/quote]
VolatileImage is in the java.awt.image package. It was added to Java 1.4 so you can take advantage of hardware acceleration. It uses the fastest way on the current platform (on Win this means the graphics are stored directly in videoram, on Unix the graphics get direct access to X Server).

What?

U have to make your own event handling crap to use lwgjl or whatever???

That makes no sense?
???

[quote]U have to make your own event handling crap to use lwgjl or whatever???
[/quote]
Hmmm… a bad choice of words on my behalf. Why don’t you go see yourself. It’ll take you five minutes to figure out how to handle mouse input with LWJGL and you’ll see the difference. With LWJGL you have to create and position the mouse yourself. Then you have to listen to it’s movement.

You don’t have the EventListener implementations from AWT to help you (i.e. mouseEntered, mouseExited…).

[quote]That makes no sense?
[/quote]
Ah, to be so young… ;D You should’ve been around when games were written in assembly for Vic-20!