anyone here have any full coding for JAVA(OOP)-GAMES,QUIZ,ETC..

ANYONE HERE CAN HELP ME? pleaseee...
[43 byte] By [koteiroa] at [2007-9-30 0:24:39]
# 1
hahahahahahahahaha.... etc
Abusea at 2007-7-16 4:54:08 > top of Java-index,Other Topics,Java Game Development...
# 2
Need some homework done real quick, huh?
shmoovea at 2007-7-16 4:54:08 > top of Java-index,Other Topics,Java Game Development...
# 3
I have plenty, but none of them use OOP at all, because I program in Java without using objects, so they'd be no use to you.
_Breakfast_a at 2007-7-16 4:54:08 > top of Java-index,Other Topics,Java Game Development...
# 4
hahahaha WOW that's funny :)
Malohkana at 2007-7-16 4:54:08 > top of Java-index,Other Topics,Java Game Development...
# 5

Below a very simple example of OOP. Note that it doesn't have any getters or setters for the sake of keeping the example short. If you get the idea of the code below then you can start building a lot more complex OOP.

Maybe the newbies forum might have been better for this post. If you are really looking for game sources then the thread about the 4K games have some links to source codes (maybe not textbook examples of OO usage).

public class DaGame

{

public static void main(String args[])

{

new DaGame().run();

}

public void run()

{

Player p1 = new Player("Jack", 1);

Player p2 = new Player("Jones", 2);

if(p1.score > p2.score)

{

System.out.println(p1.name + " is the winner!");

}

else if(p2.score > p1.score)

{

System.out.println(p2.name + " is the winner!");

}

else

{

System.out.println("we have a draw! Play again.");

}

}

}

class Player

{

public String name;

public intscore;

public Player(String name, int score)

{

this.name = name;

this.score = score;

}

}

kpokkia at 2007-7-16 4:54:08 > top of Java-index,Other Topics,Java Game Development...
# 6
why does jones always win, thats not a fair game !
penguins404a at 2007-7-16 4:54:08 > top of Java-index,Other Topics,Java Game Development...
# 7

Make so:

import java.util.Random;

////////////

public void run() {

Random random = new Random();

Player p1 = new Player("Jack", random.nextInt(10));

Player p2 = new Player("Jones", random.nextInt(10));

That will be more funny! :)

stridmanna at 2007-7-16 4:54:08 > top of Java-index,Other Topics,Java Game Development...
# 8

Let the excitement begin:

import java.util.Random;

////////////

public void run() {

Random random = new Random();

Player p1 = new Player("George Bush", random.nextInt(10));

Player p2 = new Player("John Kerry", random.nextInt(10));

JN_a at 2007-7-16 4:54:08 > top of Java-index,Other Topics,Java Game Development...
# 9

how about a very simple mmorpg with fully 3d graphics, without using the java 3d api, as an applet. Then you could add functions for rotation, as well as having hundreds of thousands of randomly generated items, each with its individual picture. You could have the landscape generated individually for each person, but have everyone together (dont ask me how that will work). Then, you could deploy it on your own web site and make millions of dollars.

adams555a at 2007-7-16 4:54:08 > top of Java-index,Other Topics,Java Game Development...
# 10
Well yes, that would be possible, but it hardly has the pure gameplay, scale and sheer variety of Kpocci and Stridmann's masterpiece, does it?
_Breakfast_a at 2007-7-16 4:54:08 > top of Java-index,Other Topics,Java Game Development...
# 11

adam, my RPG is 3D (sort of ;) ) and will be multiplayer when my brother gets done dorking around with other stuff and comes to help me impliment that. However, I am designing random map capability and I've genericized the creation of items for the ability to make random items that do many different things. Now that I've got a start, think I can get part of that million bucks? I'll take a 20... :)

Malohkana at 2007-7-16 4:54:08 > top of Java-index,Other Topics,Java Game Development...