Alex's programs for F2009

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Alex's programs for F2009

Post by MarauderIIC »

Figured I'd upload anything worthwhile as it got completed, for your viewing pleasure.
You can use and modify the source freely, as long as credit to me and source URL are both provided in a README.txt file that is distributed with the program binaries and/or program source. If your professor has no problem with that, fine with me (:

Code: Select all

===============================
CS 335, Graphics & Multimedia
===============================
NOTE: I haven't tested these as a stand-alone project, I always run them from inside the Eclipse IDE. Files that were required to run the program but were not source files were copied to my source directory and then everything was zipped, so directory structure isn't preserved.

Hooray for classes that assume you know Java! (Not)

Minesweeper clone
Completion date: Oct 08, 2009
For: CS 335: Graphics & Multimedia, Dr. Ruigang Yang
Language: Java, IDE: Eclipse
Development time: ~5 hours
Thanks to my fiancee Sarah for drawing the mines, broom, and win image =)
Screenshots:
Click here to see the hidden message (It might contain spoilers)
Image
Image
Image
Image


Analog clock
Completion date: Oct 20, 2009
For: CS 335: Graphics & Multimedia, Dr. Ruigang Yang
Language: Java, IDE: Eclipse
Requirements: Uses JOGL 1.something
Development time: ~12 hours - I wasted about five hours fiddling with gluUnproject() until I realized that my problem was that I was calling it outside of GL context.
Features:
Click here to see the hidden message (It might contain spoilers)
Can move clock by left-clicking on it and dragging, or by using arrow keys
- Specification was that it moves when you left click, not that it necessarily follows the mouse. So... awesomeness++
Can scale clock by right clicking on the screen and moving the mouse up and down, or by using i & o
- Specification was that it zooms when you right click, so using the mouse's y-coord was acceptable. But mine scales based on how far you've moved up/down from when you started dragging. So... awesomeness++
Works like a real analog clock, the second hand is the only hand to snap to position
- Specification allowed all hands to snap to positions. So... awesomeness++
Has a textured triangle fan for the clock face
- Specification was for a colored clock face. So... awesomeness++


Utah Teapot Wireframe (Wikipedia)
Completion date: Oct 30, 2009
For: CS 335: Graphics & Multimedia, Dr. Ruigang Yang
Language: Java, IDE: Eclipse
Development time: ~20 hours (I blame subpar teaching)
Screenshots:
Click here to see the hidden message (It might contain spoilers)
Image
Image
Image
Image


3-D Maze
Lights, textures, 3D movement. No collision.
Completion date: Nov 7, 2009
For: CS 335: Graphics & Multimedia, Dr. Ruigang Yang
Language: Java, IDE: Eclipse
Development time: ~15 hours
No screenshots because I'm lazy, but you can always just see below...

a: Crappy shooter
b: Tool to map textures to a face model
Lights, textures, 3D movement, simple spherical collision, stupid AI, weapons. (Uses Maze as a base)
I think that facemap and the shooter use hardcoded filenames for the model and the image.
Completion date: Dec 10, 2009
For: CS 335: Graphics & Multimedia, Dr. Ruigang Yang
Language: Java, IDE: Eclipse
Development time: ~37 hours (This was supposed to be a group project, but my groupmate did about 0%)
Click here to see the hidden message (It might contain spoilers)
Image
Image
(The person is from our sample handout, and so is the green dot on her face)

Code: Select all

==========================
CS441, Compilers
==========================
Coming eventually
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
User avatar
avansc
Respected Programmer
Respected Programmer
Posts: 1708
Joined: Sun Nov 02, 2008 6:29 pm

Re: Alex's programs for F2009

Post by avansc »

you are in college and engaged?
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
User avatar
hurstshifter
ES Beta Backer
ES Beta Backer
Posts: 713
Joined: Mon Jun 08, 2009 8:33 pm
Favorite Gaming Platforms: SNES
Programming Language of Choice: C/++
Location: Boston, MA
Contact:

Re: Alex's programs for F2009

Post by hurstshifter »

avansc wrote:you are in college and engaged?

It's not that uncommon. I have friends my age(23) and even a bit younger that are already married. Some that even have kids already.

Also, awesome minesweeper clone!
"Time is an illusion. Lunchtime, doubly so."
http://www.thenerdnight.com
K-Bal
ES Beta Backer
ES Beta Backer
Posts: 701
Joined: Sun Mar 15, 2009 3:21 pm
Location: Germany, Aachen
Contact:

Re: Alex's programs for F2009

Post by K-Bal »

I especially like the fact that you made this in -5 hours ;)

Looks good! Are you drawing the Buttons yourself or with some WinAPI stuff?
User avatar
avansc
Respected Programmer
Respected Programmer
Posts: 1708
Joined: Sun Nov 02, 2008 6:29 pm

Re: Alex's programs for F2009

Post by avansc »

hurstshifter wrote:
avansc wrote:you are in college and engaged?

It's not that uncommon. I have friends my age(23) and even a bit younger that are already married. Some that even have kids already.
yea.. its a pitty that accidents do happen..
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
User avatar
Moosader
Game Developer
Game Developer
Posts: 1081
Joined: Wed May 07, 2008 12:29 am
Current Project: Find out at: http://www.youtube.com/coderrach
Favorite Gaming Platforms: PC, NES, SNES, PS2, PS1, DS, PSP, X360, WII
Programming Language of Choice: C++
Location: Kansas City
Contact:

Re: Alex's programs for F2009

Post by Moosader »

avansc wrote:
hurstshifter wrote:
avansc wrote:you are in college and engaged?

It's not that uncommon. I have friends my age(23) and even a bit younger that are already married. Some that even have kids already.
yea.. its a pitty that accidents do happen..
Wow Ava, way to be a douche.

On Topic:
Yey, so since this is Java it'll run on any OS?
User avatar
captjack
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 50
Joined: Fri Sep 18, 2009 4:23 pm
Current Project: engine framework
Favorite Gaming Platforms: PC, XBox 360, PS3
Programming Language of Choice: C, C++
Location: Northern Virginia

Re: Alex's programs for F2009

Post by captjack »

avansc wrote:
hurstshifter wrote:
avansc wrote:you are in college and engaged?

It's not that uncommon. I have friends my age(23) and even a bit younger that are already married. Some that even have kids already.
yea.. its a pitty that accidents do happen..
Uh, wow. If that was a joke it failed.

If it wasn't a joke, then I might have asked you if you had your head up your ass - but I see a dick already in there.

-capt jack
User avatar
avansc
Respected Programmer
Respected Programmer
Posts: 1708
Joined: Sun Nov 02, 2008 6:29 pm

Re: Alex's programs for F2009

Post by avansc »

okay, i'll try and defend my view.

i think to have a planned child in your early 20's is irresponsible,
in no way are you mentally prepared, or for that matter financially.
you are still a child your self.

and no im not saying your marriage will fail. or if you have kids at 23 they will fail or it will ruin your life.

oh, and capt jack... a little projection there son..
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
User avatar
hurstshifter
ES Beta Backer
ES Beta Backer
Posts: 713
Joined: Mon Jun 08, 2009 8:33 pm
Favorite Gaming Platforms: SNES
Programming Language of Choice: C/++
Location: Boston, MA
Contact:

Re: Alex's programs for F2009

Post by hurstshifter »

avansc wrote:okay, i'll try and defend my view.

i think to have a planned child in your early 20's is irresponsible,
in no way are you mentally prepared, or for that matter financially.
you are still a child your self.

and no im not saying your marriage will fail. or if you have kids at 23 they will fail or it will ruin your life.

oh, and capt jack... a little projection there son..

I agree. I will not allow myself to father a child until I am at least 30.
"Time is an illusion. Lunchtime, doubly so."
http://www.thenerdnight.com
User avatar
avansc
Respected Programmer
Respected Programmer
Posts: 1708
Joined: Sun Nov 02, 2008 6:29 pm

Re: Alex's programs for F2009

Post by avansc »

hurstshifter wrote:
avansc wrote:okay, i'll try and defend my view.

i think to have a planned child in your early 20's is irresponsible,
in no way are you mentally prepared, or for that matter financially.
you are still a child your self.

and no im not saying your marriage will fail. or if you have kids at 23 they will fail or it will ruin your life.

oh, and capt jack... a little projection there son..

I agree. I will not allow myself to father a child until I am at least 30.
right willingly.. thats why i said , "yea.. its a pitty that accidents do happen.."
i dont know why i was called a douche for that.

ps: and in no way to you out there that may have been accidents, am i saying you are less of a person or any wacadoo shit like that. so please dont tell you therapist about this. your parents still love and appreciate you just as if you were planned.
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Re: Alex's programs for F2009

Post by MarauderIIC »

avansc wrote:you are in college and engaged?
Yes, I've been engaged most of the time I've been in college. We're not getting married until we both graduate. Kid when we're around 30.
hurstshifter wrote:Also, awesome minesweeper clone!
Thanks.
K-Bal wrote:I especially like the fact that you made this in -5 hours ;)

Looks good! Are you drawing the Buttons yourself or with some WinAPI stuff?
Thanks.

It's in Java, so no to the Win API. The buttons are actually opaque labels with a grey background and a BorderFactory.createBeveledSomething border. When revealed, they're a BorderFactory.createLineBorder border, with an icon that I drew denoting the number of neighbors, if necessary. They're this way since I didn't see a simple way to change the background of normal buttons, and icons on buttons don't fill the whole thing (so a grey icon on a regular button gives you a button with a grey square in the middle). Further, disabling the buttons makes everything on the button gray, so while it gives a nice look to a revealed square, I couldn't have colored numbers.

So the buttons are JLabels with a background and, if revealed and they have neighbors, they have ImageIcons denoting the number of neighbors. JLabels have a click event just like a button does.
avansc wrote:
hurstshifter wrote:It's not that uncommon. I have friends my age(23) and even a bit younger that are already married. Some that even have kids already.
yea.. its a pitty that accidents do happen..
The only people I know like this are from, and still live in, small towns, and its not an accident, usually.
Moosader wrote:Yey, so since this is Java it'll run on any OS?
Yeah. My CS335 class programs in Java only. So I'll soon be using OpenGL with Java d:
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
User avatar
Moosader
Game Developer
Game Developer
Posts: 1081
Joined: Wed May 07, 2008 12:29 am
Current Project: Find out at: http://www.youtube.com/coderrach
Favorite Gaming Platforms: PC, NES, SNES, PS2, PS1, DS, PSP, X360, WII
Programming Language of Choice: C++
Location: Kansas City
Contact:

Re: Alex's programs for F2009

Post by Moosader »

Who says people who are engaged whilest in college have been knocked up? :P Sometimes people get married because they want to get married.

Anyways, this stuff belongs in a different thread, if you care to start a "Accidents happens, I won't have kids 'til I'm 30" thread elseware. :P
User avatar
captjack
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 50
Joined: Fri Sep 18, 2009 4:23 pm
Current Project: engine framework
Favorite Gaming Platforms: PC, XBox 360, PS3
Programming Language of Choice: C, C++
Location: Northern Virginia

Re: Alex's programs for F2009

Post by captjack »

avansc wrote:yea.. its a pitty that accidents do happen.
avansc wrote:okay, i'll try and defend my view.

i think to have a planned child in your early 20's is irresponsible,
in no way are you mentally prepared, or for that matter financially.
you are still a child your self.

and no im not saying your marriage will fail. or if you have kids at 23 they will fail or it will ruin your life.

oh, and capt jack... a little projection there son..
avansc wrote:ps: and in no way to you out there that may have been accidents,
My parents had me at 20. I guess you think I'm an "accident". So, yes, I will project a tad... son.
I've said my peace. On to code.

-capt jack
User avatar
avansc
Respected Programmer
Respected Programmer
Posts: 1708
Joined: Sun Nov 02, 2008 6:29 pm

Re: Alex's programs for F2009

Post by avansc »

i was really referring to cock comment...
buts its good to see you reason with emotion and not logic.. and way to take that out of context or not show the entire quote..
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
User avatar
Bakkon
Chaos Rift Junior
Chaos Rift Junior
Posts: 384
Joined: Wed May 20, 2009 2:38 pm
Programming Language of Choice: C++
Location: Indiana

Re: Alex's programs for F2009

Post by Bakkon »

Nice work. I'm assuming this was made using Javax.Swing? I've only made tic-tac-toe with that and it's kind of annoying getting stuff to line up the way you want in a JPanel.
Post Reply