Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
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  
  newbie: Can LWJGL be used to accel. my 2D games?  (Read 6324 times)
0 Members and 1 Guest are viewing this topic.
kul_th_las
Guest
« Posted 2003-05-24 21:42:01 »

-Can LWJGL be used to accelerate my 2D games?
-Should I wait for JDK1.5 (or JSR 134) if I'm looking for 2D graphics more closely geared for games? (I'm using BufferStrategy and such now).

If I understand correctly, are LWJGL games distributed as native programs, not requiring a JRE install?

EDIT: Made changes - the "I'm using BufferStrategy" part is now a statement, not a question.
Offline oNyx

JGO Coder


Medals: 1


pixels! :x


« Reply #1 - Posted 2003-05-24 23:30:19 »

-yes
-yes
-who knows?
-that's not a question, I can answer... because I don't know if you use BufferStrategy or not :>
-no. They are usual class/jar files, wich requires a native library. If you want to make a native java programm you have to use something like Jet (like Cas did).

弾幕 ☆ @mahonnaiseblog
kul_th_las
Guest
« Reply #2 - Posted 2003-05-25 00:07:04 »

So, are you saying:

1) LWJGL software does require a JRE install (unless compiling to native code)?
2) By packaging the .JAR file with different native libraries (depending on the OS I'm targeting) I can easily make a cross-platform game?

Did that clarify?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline AndersDahlberg

Junior Member





« Reply #3 - Posted 2003-05-25 00:15:50 »

yes
yes (depending on ones definition of "cross-platform", win32, linux and soon(tm) mac os x should work(tm) Wink

unless I'm mistaken Grin
kul_th_las
Guest
« Reply #4 - Posted 2003-05-25 00:29:55 »

Excellent! Now, can anyone point me the best tutorial you know of for the 2D and OpenAL parts of LWJGL (the more thorough the better).
Offline aldacron

Senior Member


Medals: 9
Exp: 16 years


Java games rock!


« Reply #5 - Posted 2003-05-25 03:23:58 »

There are no '2D parts' of LWJGL. On the graphics front, it provides an interface to OpenGL. How you make use of it is entirely up to you. I don't know of any '2D with OpenGL' tutorials off of the top of my head (other than a short tutorial I saw once at http://www.gamedev.net/). I suggest you 1) check out http://www.opengl.org/ and see what resources they have and 2) use Google to search for 'OpenGL 2D tutorials', or something along those lines.
Offline oNyx

JGO Coder


Medals: 1


pixels! :x


« Reply #6 - Posted 2003-05-25 03:56:30 »

a bunch of tutorials:
http://chman-area.tuxfamily.org/

general opengl tutorials:
http://nehe.gamedev.net/
(GL_LINES gets GL.LINES etc Wink)

stuff I need to say:
-your game will require an openGL compatible graphic-card (everyone who plays a game once in a while does have one)

-your games can't run as an applett

-doing 2d is basically putting textures (your sprites) on quads (rectangular polygons)... btw you should check the document by nvidia posted by Orangy Tang in the "how to... scanlines" thread. It's about the way the rasterizer works and how you can hit single pixels exactly. You don't need to understand it completly right now but it might be helpfull in the not to distant future Wink

弾幕 ☆ @mahonnaiseblog
kul_th_las
Guest
« Reply #7 - Posted 2003-05-25 04:54:19 »

Well, thank you, everyone, for a freash start. It's easy to see why LWJGL is so popular, if everyone is both this helpful, and this exicted about using the technology.

I will undoubtedly have a lot more questions as time goes on, but for now I say thank you, and I'll be off to the tutorials!
Offline princec

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #8 - Posted 2003-05-26 10:49:44 »

I promise to write a big long series of articles about writing a game in Java and LWJGL soon. Just wait for A.F to get out of the way and then I'll begin.

The code examples I use will generally be lifted straight out of A.F. as well so you can be sure it's the right way to do it Wink Or at least, a right way.

Cas Smiley

Offline Themroc

Junior Member





« Reply #9 - Posted 2003-05-27 14:15:17 »

There can be a problem when switching from java2d to opengl, your game may run faster on medern machines, but much slower on older machines, as these have sometimes slow 3d-chips (and bad opengl drivers), but fast 2d-units.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #10 - Posted 2003-05-27 16:45:19 »

'srite. LWJGL is generally for computers less than 3 years old which tend to come with proper 3D. In the not-too-distant future this will of course be most computers, but right now, it's only about half of them (and a lot less for laptops).

Cas Smiley

Offline whome

Junior Member




Carte Noir Java


« Reply #11 - Posted 2003-05-27 19:09:56 »

"I promise to write a big long series of articles about writing a game in Java and LWJGL soon. Just wait for A.F to get out of the way and then I'll begin."

Now that's what I like to read. Just cant wait to see how everyone here is posting "Test my A.F2K/A.FSuper" and similar clones. It's gonna like a new worm game genre :-)

You plan to publish a hardcover book about "LWJGL for Dummies"?  (ofc a namechange finalized first).

cya
Offline oNyx

JGO Coder


Medals: 1


pixels! :x


« Reply #12 - Posted 2003-05-27 23:47:39 »

Quote
'srite. LWJGL is generally for computers less than 3 years old which tend to come with proper 3D. In the not-too-distant future this will of course be most computers, but right now, it's only about half of them (and a lot less for laptops).


Heh. My comp is over 3 years old... even my last OS-install is :>

25.12.1999 and it's still running Smiley

Well these 3 years seems to be a good rule of thumb right now.

弾幕 ☆ @mahonnaiseblog
kul_th_las
Guest
« Reply #13 - Posted 2003-05-27 23:59:22 »

Strictly off topic, but I wondered if anyone recognized the quote that's under my picture (it's from a PC game). I placed it there to see if I could get a reaction from anyone.

So? Any takers?
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #14 - Posted 2003-05-28 08:35:11 »

Sanitarium, if i remember correctly. Twisted, freaky game Shocked The product of a very disturbed mind.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #15 - Posted 2003-05-28 13:51:53 »

Quote
The product of a very disturbed mind.  

IIRC there were even deaf children in that game Shocked

kul_th_las
Guest
« Reply #16 - Posted 2003-05-31 20:55:51 »

I've got another total newbie question. I downloaded LWJGL 0.6, but I can't seem to run any of the demos. Can someone explain the directory structure to me (where a .class file should be placed in relation to the LWJGL .jar and .dll files)?
Offline elias

Senior Member





« Reply #17 - Posted 2003-05-31 21:31:59 »

A more specific error message would be nice, but the general way to run the demos is to do

java -Djava.library.path=<path to lwjgl.dll> -cp lwjgl.jar;lwjgl_test.jar;examples.jar <some test>

(assuming windoze)

And you can omit the lwjgl_test.jar and examples.jar if you only need lwjgl for your own app.

- elias

Offline bedelf

Junior Member




Are you suggesting coconuts migrate?


« Reply #18 - Posted 2003-05-31 23:57:56 »

Heres what I do for fun:

I installed lwjgl to it's own directory (c:\lwjgl-0.6\) and just told eclipse lwjgl.jar was a part of my project (classpath), then in the run menu, under arguments->VM arguments i have: -Djava.library.path=c:\lwjgl-0.6\ so it looks for the dll there too.

If your not using eclipse you should give that a go too. www.eclipse.org
kul_th_las
Guest
« Reply #19 - Posted 2003-06-01 00:53:57 »

Thank you for the quick replies.

I will look into JXInput.

I've used Eclipse - I'm perfectly fine with my text editor and syntax highlighting. I've used IDE's in the past, and I always go back to my text editor, but thanks for the info.

Thank you again, everyone...I've never started a thread that had so many useful posts, and helpful / knowledgable people.
Offline bedelf

Junior Member




Are you suggesting coconuts migrate?


« Reply #20 - Posted 2003-06-01 01:11:40 »

I used to try IDE's and go back to TextPad and my array of batch files and classpath settings. Tongue I just do too much nowadays to bother with it anymore, I like being able to just tell eclipse to export javadoc/jar files/include a jar and it just works.

Have fun though. Tongue
kul_th_las
Guest
« Reply #21 - Posted 2003-06-01 05:57:34 »

The idea of setting up project is at the same time one of my favorite, and most dreaded features. I like to work with as few files as possible. I like to write my programs so that all files that I generate are actually required by a release version (except perhaps for source files, but I usually include those anyway).

I also spent a few months a couple of years ago looking for a software developement solution, evaluating the different solutions and such. Perhaps I just got turned off by the fact that the project files generated from one IDE to the next were inconsistent in their format and number, and I wished I could move a project easily from one IDE to another.

Perhaps I'll take another shot at it. How long have you been using Eclipse? What sorts of projects have you done with it, and how easy was it to pick up and use (it's been so long since I tried it, perhaps it's gotten better over time)?
Offline princec

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #22 - Posted 2003-06-01 10:51:00 »

I've been using Eclipse for 2 years now, and everything I've done has been written using it since.

This includes the LWJGL, the SPGL, and Alien Flux. And it also includes a TV graphics client/server system, some JSP/servlet stuff, a barcoding/warehouse application for J2ME, and all sorts of other bits and bobs. I couldn't recommend it more highly. It was trivial to set up a project in it and get everything working nicely, and it only ever went badly wrong when I was using the betas - it's been rock-solid since the official 2.1 release. Eclipse generates no funny code or files for you either; it's just a plain ol' directory of java source just like you could tweak in any other IDE.

It makes working with Textpad and the commandline tools a complete joke, really; anyone who tells you otherwise... is slower at getting things done than I am. Which is what it's all about.

Cas Smiley

Offline bedelf

Junior Member




Are you suggesting coconuts migrate?


« Reply #23 - Posted 2003-06-01 11:58:29 »

This morning I stopped being a tard and realized I could just open the CVS Repository view in eclipse and add Cas's SPGL location on sourceforge and just told it to IMPORT AS PROJECT (or something) and viola, it worked. I changed like one project setting and that's all.  (he was using LWJGL as a dependant project, so I changed it to the lwjgl.jar instead).
kul_th_las
Guest
« Reply #24 - Posted 2003-06-01 14:46:58 »

There's something else I'm missing here. People keep refering to 'Cas', and as hard as I've tried to attach a meaning to this name, I've been unable to do so. So, who / what is Cas?
Offline princec

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #25 - Posted 2003-06-01 14:58:47 »

Me!

Cas Smiley

kul_th_las
Guest
« Reply #26 - Posted 2003-06-01 15:01:57 »

Well, that makes a bit more sense. Is it your first name or something?
Offline bedelf

Junior Member




Are you suggesting coconuts migrate?


« Reply #27 - Posted 2003-06-01 15:02:15 »

Yes, him! Hes sort of a fixture here, or a fixation, depending on how lonely you are.

Tongue

edit: (cough caspian cough) what?
Offline princec

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #28 - Posted 2003-06-01 15:38:38 »

Yep, it's just short for my complicated mouthful of a name which since marriage has mutated into Caspian Rychlik-Prince.

It was weird enough to start with, especially for a bog-standard causasian Englishman.

Bloody hippies for parents, wasn't it?

Cas Smiley

Offline bedelf

Junior Member




Are you suggesting coconuts migrate?


« Reply #29 - Posted 2003-06-01 16:00:10 »

Haha, I like your name. I've always hated my last name, Trilck (i think thats german?), because no one can pronouce it. I'd kill for something simple like Prince. Tongue

The whole Caspian Rychlik-Prince thing just makes you sound like some drider high king who worthships lloth and eats babies. No one wants to mess with that. Wink
Pages: [1] 2
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Riven (12 views)
2014-07-29 18:09:19

Riven (9 views)
2014-07-29 18:08:52

Dwinin (9 views)
2014-07-29 10:59:34

E.R. Fleming (26 views)
2014-07-29 03:07:13

E.R. Fleming (10 views)
2014-07-29 03:06:25

pw (40 views)
2014-07-24 01:59:36

Riven (39 views)
2014-07-23 21:16:32

Riven (27 views)
2014-07-23 21:07:15

Riven (28 views)
2014-07-23 20:56:16

ctomni231 (59 views)
2014-07-18 06:55:21
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!