Our Network: VGFacts - DidYouKnowGaming? - The Spriters Resource - Muscle Tower


User(s) Viewing This Thread: 1 Guest(s)
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOURCE] GameDev#1 - Magnet Thingy :: Previous
Author Message
Previous Away
Posting Freak
***

Posts: 3,645
Joined: May 2008
Reputation: 81
Resource - Models Resource - Sounds Resource - Sprites Resource - Textures
Post: #1
[SOURCE] GameDev#1 - Magnet Thingy :: Previous
Although noone seems to care, I thought I'd share the source of tat one with you and explain you what it does / how it works or something along those lines.
I had actually hoped all those others who promised to do something had done something. Now I sad.

Check out the Event here and my attempt here (including the full source code).

The objective (Click to View)
I've made that program in Java for platform independency and because anyone can get the Java development environment for free (just google for the JDK and find it on the Java website).
I'm not going to explain how to set up the JDK, the internet can help you with that. It also depends on your OS anyways. If you have trouble setting the PATH in windows, I could help you with that, I guess.

Now let's take a look at the code, step by step.
Mind you that this is not a real tutorial. I don't even know all the things myself. I might use some wrong terms and my explanations might be incorrect. I'm taking no responsibility!

'Main' part of the program (Click to View)
The main window: class MainFrame (Click to View)
MainFrame constructor (Click to View)
MouseListener MouseAdapter: react to mouse clicks (Click to View)
Painting the window: Draw them magnets! (Click to View)
actionPerformed: React to the timer call (Click to View)
That's it, basically! If you have questions, go ahead and ask. I'm quite sure my comments weren't really beginner-friendly. But again, this is not really meant to be a tutorial but rather to gibt a brief overview on this thing because why knot?

Full code (Click to View)

Avatar courtesy of Mighty Jetters
(This post was last modified: 03-02-2012 02:02 PM by Previous.)
03-02-2012 02:01 PM
Visit this user's website Find all posts by this user Thank this post Quote this message in a reply
[-] Thanked by
Zabadabenabadaba (03-03-2012), Rosencrantz (03-04-2012)
Login or Register to remove these ads!
Sengir Offline
You can call me Al
***
Moderators

Posts: 1,737
Joined: May 2009
Reputation: 72
Facebook Steam
Post: #2
RE: [SOURCE] GameDev#1 - Magnet Thingy :: Previous
Previous I love you

[Image: zfaQh.gif] [Image: b0KxM.gif] [Image: qjGOacY.png]
03-02-2012 03:16 PM
Find all posts by this user Thank this post Quote this message in a reply
[-] Thanked by
Previous (03-02-2012), Rosencrantz (03-04-2012), Mighty Jetters (05-20-2013)
Post Reply 


Forum Jump:


 Quick Theme:


Login or Register to remove this ad!