Be a Supporter!

Completely Writing Java Game

  • 467 Views
  • 7 Replies
New Topic Respond to this Topic
NinjaGuy
NinjaGuy
  • Member since: Jul. 3, 2006
  • Offline.
Forum Stats
Member
Level 20
Musician
Completely Writing Java Game 2013-02-01 22:08:07 Reply

I'm trying to write a simple game in Java, and I'm wondering how I can incorporate mouse location without using any import statements where I would have to download a class, I just want to work with what Java has for me.


BBS Signature
milchreis
milchreis
  • Member since: Jan. 11, 2008
  • Offline.
Forum Stats
Member
Level 26
Programmer
Response to Completely Writing Java Game 2013-02-02 06:56:05 Reply

At 2/1/13 10:08 PM, NinjaGuy wrote: I'm trying to write a simple game in Java, and I'm wondering how I can incorporate mouse location without using any import statements where I would have to download a class, I just want to work with what Java has for me.

http://docs.oracle.com/javase/tutorial/uiswing/events/mousel istener.html

NinjaGuy
NinjaGuy
  • Member since: Jul. 3, 2006
  • Offline.
Forum Stats
Member
Level 20
Musician
Response to Completely Writing Java Game 2013-02-02 16:03:37 Reply

At 2/2/13 06:56 AM, milchreis wrote:
At 2/1/13 10:08 PM, NinjaGuy wrote: I'm trying to write a simple game in Java, and I'm wondering how I can incorporate mouse location without using any import statements where I would have to download a class, I just want to work with what Java has for me.
http://docs.oracle.com/javase/tutorial/uiswing/events/mousel istener.html

I was hoping for something non import, I have to create it myself, and I can't recreate an existing class, at least not entirely.


BBS Signature
kiwi-kiwi
kiwi-kiwi
  • Member since: Mar. 6, 2009
  • Offline.
Forum Stats
Member
Level 09
Programmer
Response to Completely Writing Java Game 2013-02-02 16:17:10 Reply

At 2/2/13 04:03 PM, NinjaGuy wrote: I was hoping for something non import, I have to create it myself, and I can't recreate an existing class, at least not entirely.

Sorry recreating mouse listeners in a big nono, might as well start writing java from scratch if you want to do that

NinjaGuy
NinjaGuy
  • Member since: Jul. 3, 2006
  • Offline.
Forum Stats
Member
Level 20
Musician
Response to Completely Writing Java Game 2013-02-02 16:38:42 Reply

At 2/2/13 04:17 PM, kiwi-kiwi wrote:
At 2/2/13 04:03 PM, NinjaGuy wrote: I was hoping for something non import, I have to create it myself, and I can't recreate an existing class, at least not entirely.
Sorry recreating mouse listeners in a big nono, might as well start writing java from scratch if you want to do that

ughh, well, how would I go about making a program interactive without using applets?


BBS Signature
NinjaGuy
NinjaGuy
  • Member since: Jul. 3, 2006
  • Offline.
Forum Stats
Member
Level 20
Musician
Response to Completely Writing Java Game 2013-02-11 22:49:08 Reply

I'm about confused on some things I'm working on here, does anyone know of somewhere good to learn things without imports? Some fundamental Java tutorials? Or answer the questions I've been asking...


BBS Signature
deckheadtottie
deckheadtottie
  • Member since: Oct. 21, 2003
  • Offline.
Forum Stats
Supporter
Level 59
Programmer
Response to Completely Writing Java Game 2013-02-12 05:41:25 Reply

At 2/11/13 10:49 PM, NinjaGuy wrote: I'm about confused on some things I'm working on here, does anyone know of somewhere good to learn things without imports?

If you don't want to use imports then you can't use the import java.lang.* which means you won't have access to fundamental interfaces and classes (such as the Object hierarchy, classes and exceptions to name a few). You are going to have to accept that it is practically impossible to write Java without importing packages.

The terrible cliche is "don't reinvent the wheel".


#coys

BBS Signature
NinjaGuy
NinjaGuy
  • Member since: Jul. 3, 2006
  • Offline.
Forum Stats
Member
Level 20
Musician
Response to Completely Writing Java Game 2013-02-12 22:21:42 Reply

At 2/12/13 05:41 AM, deckheadtottie wrote:
At 2/11/13 10:49 PM, NinjaGuy wrote: I'm about confused on some things I'm working on here, does anyone know of somewhere good to learn things without imports?
If you don't want to use imports then you can't use the import java.lang.* which means you won't have access to fundamental interfaces and classes (such as the Object hierarchy, classes and exceptions to name a few). You are going to have to accept that it is practically impossible to write Java without importing packages.

The terrible cliche is "don't reinvent the wheel".

hmmm, I see... any ideas on a good reference other than javadocs for game writing utilities? I also checked out thenewboston, not exactly what I was looking for, but it provided some help in display.


BBS Signature