Skip to main content
GameDev.net gamedev.net
🔒 Locked

[java] Simple Graphic Functions

Started by Halsafar Sep 26, 2005 at 5:41 PM 2 replies 700+ views
Original Post
Halsafar
Halsafar
I don't know where to start or what to google so I'm hoping to get some info or some links. I also don't even know if what I want to do is entirely possible. Okay, I need a Graphic Library or at least a package which as some basic graphic functions. Like line(x1,y1,x2,y2), and something to take over the screen with. maybe set a minor resolution (like the BASIC language functions). I don't need anything more than the ability to draw lines, clear the screen, and eventually somehow capture keyboard input. (Goona make Asteroids in Java) Now, I gotta do this for Linux, I'm not sure if that makes a difference cause of the JVM but it may. It would be nice however if I can run the same program in Win OS and Linux OS. Lastly, this has to be done within the console unless there is a generic way to create a GUI Window for both OS's or since Linux is my OS of choice then it can be just for that.
Whackjack
Whackjack
You don't need a fancy toolkit to create something like this. The standard JDK comes with everything you need to create your Asteroids game. I'd start by Googling AWT/Swing tutorials. Then go through the javadocs (specifically the Graphics object) and look at the methods available to you.
CaptainJester
CaptainJester
Quote:
Original post by Halsafar
Lastly, this has to be done within the console unless there is a generic way to create a GUI Window for both OS's or since Linux is my OS of choice then it can be just for that.


This is what Java does by definition. You should really do The Java Tutorial http://java.sun.com/docs/books/tutorial/index.html
"None of us learn in a vacuum; we all stand on the shoulders of giants such as Wirth and Knuth and thousands of others. Lend your shoulders to building the future!" - Michael Abrash[JavaGaming.org][The Java Tutorial][Slick][LWJGL][
H_o_p_s
H_o_p_s
Tutorial on making an actual game

I'v found this tutorial really good for people first learning java for game development.
BRING BACK THE BLACK (or at least something darker)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.