HOW TO MAKE THIS GAME MULTIPLAYER???
its in java but i would like to know how to make it multiplayer so i can host a game for others over the internet
http://www.nintendo8.com/game/321/tecmo_super_bowl/
theres the link to the game
KRhodes330 wrote:
its in java but i would like to know how to make it multiplayer ...By leaning Java.
Similar Messages
-
How can i make this game to be over in 3 minutes?
i'm really a total beginner, and this is the race game code for my school assignment.
How can i possibly make this game to be over in 3 minutes?
It says "game over" when you hit 20 cars.
I want to make it say "you've made it!" or something when they survive for 3 minutes with less than 20 crashes.
please help! T.T
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.Timer;
public class BugRace extends Applet implements KeyListener, Runnable{
Image buff;
Canvas Panel;
Graphics2D gPanel;
Graphics2D gBuffer;
Bug redBug;
Bug[] rivals=new Bug[20];
Button StartButton;
//Button StopButton;
Thread game;
Timer time;
private boolean loop=true;
Dimension dim=new Dimension(200, 300);
private int road;
Random rnd=new Random();
private int crash = 0;
public void init(){
prepareResource();
setBackground(Color.gray);
setSize(400,400);
initPanel();
add(Panel);
// Start Button
StartButton=new Button("START");
add(StartButton);
StartButton.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
// request focus for Panel to get key event
Panel.requestFocus();
if(!game.isAlive()){
game.start();}else if(game.isAlive()){
game.start();}
/*StopButton=new Button("STOP");
add(StopButton);
//StopButton.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
//Panel.requestFocus();
if(game.isAlive())
game.stop();}
public void prepareResource(){ //load bug images
Image imgRed=getImage(getCodeBase(),"redbug.gif");
Image imgBlue=getImage(getCodeBase(),"bluebug.gif");
Image imgYellow=getImage(getCodeBase(),"yellowbug.gif");
Image imgPurple=getImage(getCodeBase(),"purplebug.gif");
MediaTracker mt=new MediaTracker(this);
try{
mt.addImage(imgRed, 0);
mt.addImage(imgBlue, 1);
mt.addImage(imgYellow, 2);
mt.addImage(imgPurple, 3);
mt.waitForAll();
}catch(Exception e){}
buff=createImage((int)dim.getWidth(), (int)dim.getHeight());
gBuffer=(Graphics2D)buff.getGraphics();
redBug=new Bug(imgRed, 80,250, dim); // user's bug
for(int i=0;i<10;i++){
rivals=new Bug(imgBlue, 0, 0); // rival blue bug
for(int i=5;i<rivals.length;i++){
rivals[i]=new Bug(imgYellow, 0, 0); // rival yellow bug
for(int i=10;i<rivals.length;i++){
rivals[i]=new Bug(imgPurple, 0, 0); // rival purple bug
for(int i=0;i<rivals.length;i++){ // set locations for rival bugs
setrivals(i);
game=new Thread(this); // game thread for controlling
public void stop(){
loop=false; // stop the thread
public void run(){
while(loop){
drawPanel(); // draw game screen
try{ Thread.sleep(50);}catch(Exception e){}
public void initPanel(){ // initialize the panel
Panel=new Canvas(){
public void paint(Graphics g){
if(gPanel==null){
gPanel=(Graphics2D)Panel.getGraphics();
drawPanel();
Panel.setSize(dim); // size of the panel
Panel.addKeyListener(this); //add keylistener for the game
// set rival bugs' location randomly, and make them not intersect each other
void setrivals(int en){
int x, y;
next:while(true){
x=rnd.nextInt((int)dim.getWidth()-rivals[en].getWidth());
y=-rnd.nextInt(5000)-200;
// if (x,y) intersect to each other, go to next
for(int j=0;j<rivals.length;j++){
if(j!=en && rivals[j].collision(x, y))continue next;
// set (x, y) as en rival bug's location and exit from while loop.
rivals[en].setLocation(x, y);
break;
void check(Bug en){ // check if bugs collides
if(redBug.collision(en)){ // if collide,
if(redBug.getX()>en.getX()){ // if rival bug is on the left side from user's,
en.move(-10, 0); // move rival bug in 10 to the left
redBug.move(10, 0); // move user's bug in 10 to the right
crash++; //add # of crash
else{ // if rival bug is on the right side from user's,
en.move(10,0); // move rival bug in 10 to the right
redBug.move(-10, 0); // move user's bug in 10 to the left
crash++; //add # of crash
synchronized void drawPanel(){ // draw panel
gBuffer.clearRect(0, 0, (int)dim.getWidth(), (int)dim.getHeight()); //clear buffer
gBuffer.setPaint(new Color(0, 150, 0)); //fill background in green
gBuffer.fillRect(0, 0, (int)dim.getWidth(), (int)dim.getHeight());
drawRoad(); // draw the road
// draw rival bugs moving down
for(int i=0;i<rivals.length;i++){
rivals[i].move(0, 15); // move rival bugs down
rivals[i].draw(gBuffer, Panel); // draw the bugs in panel
if(rivals[i].getY()>dim.getHeight()){ //if a rival bug is out of panel
setrivals(i);} // set it at initial position
check(rivals[i]); // check if they intersect
redBug.draw(gBuffer, Panel); // draw user's bug
gPanel.drawImage(buff, 0,0, Panel); // draw buffer in panel
if(crash<20){
gPanel.setFont(new Font(null,Font.BOLD,15));
gPanel.drawString("crash:"+crash,30, 30);}
else{
gPanel.setFont(new Font(null,Font.BOLD,15));
gPanel.drawString("crash:"+crash,30, 30);
gPanel.setFont(new Font(null,Font.BOLD,20));
gPanel.drawString("Game Over", 50, 100);
gPanel.dispose();
void drawRoad(){ // draw yellow center line
road+=80;
gBuffer.setPaint(Color.yellow);
gBuffer.fillRect((int)dim.getWidth()/2, road,10,150);
if(road>=dim.getHeight()){ //if the line goes lower than panel
road=-150; //move it up again
}else if(crash >20){
road=0;
public void keyPressed(KeyEvent ke){
if(ke.getKeyCode()==KeyEvent.VK_LEFT){ // if left arrow is pressed,
redBug.move(-20,0); // the bug moves to the left
else if(ke.getKeyCode()==KeyEvent.VK_RIGHT){ // if right arrow is pressed
redBug.move(20,0); // the bug moves to the right
public void keyReleased(KeyEvent ke){}
public void keyTyped(KeyEvent ke){}import java.util.Timer;
import java.util.TimerTask;
public class Test {
public static void main (String[] args) {
final Timer timer = new Timer ();
System.out.println ("I'm gonna do something in 5 seconds.");
timer.schedule (new TimerTask () {
public void run () {
System.out.println ("Time's up !");
timer.cancel ();
}, 5000);
}if you want to display the time left it's better to make your own Thread that updates a "timeleft variable:
{code}
public class Test {
//set the time Left to 3 mins.
private long secondsLeft = 3 * 60;
public Test () {
new Thread (new Runnable () {
public void run () {
try {
while (secondsLeft > 0) {
//Let's update the timer every second.
Thread.sleep (1000);
secondsLeft = secondsLeft - 1;
System.out.println ("Time left: " + (secondsLeft / 60) + ":" + (secondsLeft % 60));
System.out.println ("Grats !");
} catch (InterruptedException e) {}
}).start ();
public static void main (String[] args) {
new Test ();
{code} -
Dose any one know how to make a game simular to runescape?
what i am talking about is i want to make a agme for my website.
i want it to be a mulity user game where charators can interact with another. So dose anyone have any videos i can whats like a tortorial to make one or any info.
Thank you for ur help.I dont know how to make a game like runescape, but to be quite honest it was runescape that got me starting. In april last year I toke the Java tutorial with the aim to create an online multiplayer role playing game. When I was done with the tutorial I posted some messages i gamecreation forums around to try and find a designer to work with. Around august last year I found him and we had a conversation about how to do it. He told me about opengl, animation techniques and alot of other stuff that day. Stuff I didnt understod the first thing about. But he told me to read up on it since it was good stuff to know if you want to make a good game.
I toke some tutorials at NeHe's openGL site. They are not the best I have seen but they taught me the basics. after that I did something cracy. I tried to find out how to make skeletal animation work so we could use my designers skeletal animated 3d models. I wrote a parser and 3 month later I understod and implemented skeletalanimation into the engine. Btw. I use something called JOGL to access OpenGL from Java. Next step was to implement tweening, kamera and thats where I am now.
I toke a loan im my appartment to give me untill feb. 2007 to finish something and Im working everyday on this project. Good thing is that my designer is just as devouted and has also made arrangements so he doesnt have to work for a while. Now he can use all his time rigging, animating and making textures for characters, monsters, the world and so on.
Its looking good so far and I havent lost my motivation and lust yet, but there is a long way to a finished game.
I still have to learn about collision detection, culling, octrees, networking and a billion other issues but I enjoy leaning and working with it.
When thats done there will be gameplay, AI, a balanced economy system and so on to develope.
Its a long journey, but if all this dont hit you in the stomach and if you think you have the mental stamina for it, I would say go for it. If you succeed, good for you. If not, you gave it a shot!
Good luck! -
Something keeps trying to download on my mac and I don't know what it is. It is not in the apple store and just comes out nowhere and request for my password to download something and I don't know what it is. How to make this stop? It pops up every single day.
Erica,
I can, with 99.99% certainty, tell you that you are absolutely right in not wanting to download or install this "Helper," whatever it is (but we can be equally certain it would not "help" anything).
I cannot comment as to Oglethorpe's recommendation of 'adwaremedic'; I am unfamiliar with it. His links to the Apple discussion and support pages warrant your time and attention.
It might be really simple -- Trying looking in your Downloads folder, trash anything that you don't know with certainty is something you want to keep, and then Secure Empty your Trash. Then remove the AdBlock extension, LastPass, and Web of Trust extensions to Safari and re-boot. If the issue goes away, still be extraordinarily careful in the future.
Unfortunately, it's probably not going to be that simple to get rid of, in which case I'd then try the line by line editing in HT203987.
I have no further suggestions (other than a complete wipe and re-install...but that's a pain because trying to restore from Time Machine would simply ... restore the Mal).
For the rest of us, please post when you find a solution.
Best.
BPW
(Also, try to edit your second post -- black out your last name on the screenshot and re-post it for others) -
I bought a composite AV cable with 30 pin connector at a proper apple store for my ipad 2 which no longer works now i have updated to ios7 - please advise how to make this work ?
I have the same problem.
Two similar discussions:
https://discussions.apple.com/message/23081658#23081658
https://discussions.apple.com/message/23281391#23281391
I have not yet seen any official response to the question: "Is the Apple AV Composite cable fully supported with 30pin connector devices upgraded with iOS7 - specifically ? - eg. iPad 2, iPhone 4, iPhone 4s"
If it is not currently supported is that then due to a bug / oversight and in that case is it something that will be fixed in the near future?
Please let us know what feedback you got from asking Apple support. -
How to make this in Adobe Photoshop CS5? PLEASE Help!
Hey guys, i reallllllllly want to know how to make this image in adobe photoshop.... the cone around the forecast track. Can you guys please show me how to do this? Id greatly appreciate it!
There's a lot implied here, but you're not going to get around having to do the following in general:
Use an unmarked map as a background.
Draw shapes on layer(s) above the background and make them partially transparent.
Obviously the key is to draw shapes that express the "cone of uncertainty" exactly as you want it to look, and with a minimum of fuss.
I'd suggest drawing shapes with Path tools, then filling the shapes, applying a stroke (for the edge border), and using masking to hide parts you don't want to show (or which overlap with the other parts you're drawing).
Are you needing to do this over and over or just once?
-Noel -
How to make this effect in Keylight?
Hi, I have question, how to make this effect in Keylight?
I know that this overlay is added here:
http://oi57.tinypic.com/1174fup.jpg
Photos:
http://iv.pl/images/18475588964010299091.jpgKeylight what? All I see is some effect similar to Leave Color, a.k.a the Pleasantville effect that made the rounds 10 years ago. It may require additional masking and otehr effects, but definitely not something that is specifically related to Keylight...
Mylenium -
How to make this work flow?
Hi,
In a target database such like MySQl, I define a colum role to store the roels in SIM. Then, I want to make a post-workflow that set the account with related role which is defined in the DB after reconciliation and move those accounts from this DB to a specified organzation.
How to make this workflow?
If anyone know about this, kindly help me...
thanks..Just a thought... Are you able to run this as activesync? If you use activesync you could just use a form or metaview to merge (or replace) your role value with waveset.roles and set the org for accounts that correlate.
-Rob -
How to make this work with Firefox, HELP!
Downloading for Real-player, after watching the full movie, I click download and it has to reread the movie from the internet. When using explorer, after downloading the movie, it reads it from memory, which makes it a fast download. How to make this work with Firefox, I like not to use Microsoft products, and I really like Firefox 7.0.1!!!! HELP!
-> click '''Firefox''' button and click '''Options''' (OR File Menu -> Options)
* Advanced panel -> Network tab
* place Checkmark on '''Override Automatic Cache Management''' -> under '''Limit Cache''' specify a large size of space
* Remove Checkmark from '''Tell me when websites asks to store data for offline use'''
* click OK on Options window
* Restart Firefox
Check and tell if ts working. -
How to make this animation in TwitchPlugin?
Hi, I have question, how to make this effect and animation in twitch.
Effect:
Animation:
http://youtu.be/UIrSSYjW5-A?t=15sIf you bought the plug-in you have a bunch of tutorials.
If you are thinking about buying the plug-in take a look at the tutorials provided by Video CoPilot
https://www.videocopilot.net/products/twitch/
If you are still lost AE Basics -
Anyone knows how to make this code to netbeans??
anyone knows how to make this code to netbeans?? i just want to convert it into netbeans... im not really advance with this software... anyway..just reply if you have any idea...or steps how to build it... etc.... thanks guys...
import javax.swing.*;
import javax.swing.table.*;
import java.awt.*;
import java.awt.event.*;
import java.util.regex.*;
public class FilterTable {
public static void main(String args[]) {
Runnable runner = new Runnable() {
public void run() {
JFrame frame = new JFrame("Sorting JTable");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Object rows[][] = {
{"AMZN", "Amazon", 41.28},
{"EBAY", "eBay", 41.57},
{"GOOG", "Google", 388.33},
{"MSFT", "Microsoft", 26.56},
{"NOK", "Nokia Corp", 17.13},
{"ORCL", "Oracle Corp.", 12.52},
{"SUNW", "Sun Microsystems", 3.86},
{"TWX", "Time Warner", 17.66},
{"VOD", "Vodafone Group", 26.02},
{"YHOO", "Yahoo!", 37.69}
Object columns[] = {"Symbol", "Name", "Price"};
TableModel model =
new DefaultTableModel(rows, columns) {
public Class getColumnClass(int column) {
Class returnValue;
if ((column >= 0) && (column < getColumnCount())) {
returnValue = getValueAt(0, column).getClass();
} else {
returnValue = Object.class;
return returnValue;
JTable table = new JTable(model);
final TableRowSorter<TableModel> sorter =
new TableRowSorter<TableModel>(model);
table.setRowSorter(sorter);
JScrollPane pane = new JScrollPane(table);
frame.add(pane, BorderLayout.CENTER);
JPanel panel = new JPanel(new BorderLayout());
JLabel label = new JLabel("Filter");
panel.add(label, BorderLayout.WEST);
final JTextField filterText =
new JTextField("SUN");
panel.add(filterText, BorderLayout.CENTER);
frame.add(panel, BorderLayout.NORTH);
JButton button = new JButton("Filter");
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String text = filterText.getText();
if (text.length() == 0) {
sorter.setRowFilter(null);
} else {
try {
sorter.setRowFilter(
RowFilter.regexFilter(text));
} catch (PatternSyntaxException pse) {
System.err.println("Bad regex pattern");
frame.add(button, BorderLayout.SOUTH);
frame.setSize(300, 250);
frame.setVisible(true);
EventQueue.invokeLater(runner);
}its okay onmosh.....what we need to
this...forum....is to have a good......relationship
of programmers......and to start with .....we need to
have a good attitude........right.....???.....no
matter how good you are in programming but if you did
not posses the right kind of attitude....everything
is useless.....in the first place....all we
want....is just to ask...some....help....but
conflicts......but unluckily......we did not expect
that there are members in here which......not
good...to follow.....just as suggestion for those
people not having the right kind of attidude...why
can't you do in a very nice message sharing in a very
nice....way....why we need to put some
stupid....stuff...words.....can't you live with out
******* ****....its not.....lastly especially you
have your children right now and people around...that
somehow......idiolize...you even me....is one of
them......but showing but attitude....is not
good......tnx....hope you'll take it this....in the
positive side.....be optimistic...guys....the
world..is not yours....all of us will just past
away....always..remember that one.....treasure..our
stay in this....temporary home.....which...is
world....Whoa. That post seems to be killing my brain.
URK
Join........us..........do not be..........afraid....... -
How to make this validation ?
Dear all
In my Entity Object I have 4 attributes:
ID , AccomplishDate ,cancelDate,Status
I want to make a validation on the Status attribute , which is:
if status = "CAN" then the CancelDate attribute value will be current date and the AccomplishDate attribute value be null.
Please can any one tell me how to make this validation.
ThanksThank you so much for replaying
The original method was
public void setProcStatus(String value) {
setAttributeInternal(PROCSTATUS, value);
}I changed it to be like this
public void setProcStatus(String value) {
if (value.equals("CAN")){
setAccomplishDate(new Date());
setCancelDate(null);
setAttributeInternal(PROCSTATUS, value);
}is this right
please tell me how to set the value of AccomplishDate attribute to the current date -
How to make this pattern?
Hello guys Please I am looking for advice how to make this kind of pattenr in pohtoshop- you can see it on background- the rounded one- en the end whole piece makes nice surface.
http://vladstudio.deviantart.com/art/Typographic-World-Map-106395788
thank a lotSometimes a patten is defined for some pixel size and may even need to have the document rotated to have the proper orientation for the pattern. For example a frame pattern for a one inch wide strip. An Action can be created to add the pattern to a mitered 1" wide strip at 300 dpi on the left side then rotate the document for the other side rotate back and dupe and flip the frame side added.
If you search the web there are a countless number of patterns that can be downloaded for free textures like woods ,paper, textiles etc. -
How to make this logo effect? Help please!
How to make this effect? I'm new in illustrator.
It looks like 3 discs with a 2d image applied to them. I would try the 3d revolve tool to create one, then duplicate it for the other two.
-
How to make this in Flash Builder?
I am looking to make an Android app and one of the functionalities is somehting like in the video.
I am new to Flash Builder and looking for some help to make it.
Anyone has a tutrial or has any idea how to make this?
Android SQLite App Development with Flash Builder and Flex - YouTubeI'll give you the short answer, Flash Catalyst is built on top of the Flex Framework and it's libraries. When you launch or load a FC swf, it will contact the Adobe servers to check the status of various libraries. Since you are loading this into a standard Flash Professional created swf, you are by passing some of the fallbacks that exist.
If the movieClip that you are creating is just a filler image, and you are just centering the FC swf, then I also recommend using CSS to display the filler and some HTML/CSS to center the content.
Hope this helps a little.
If you did the loading of the FC swf from a Flash Builder based project, you should not have the issue, since it is a Flex based SWF, the framework checks are already handled for you.
Chris
Maybe you are looking for
-
"Company code is not permitted as the paying company code while FRFT
Hi Experts, I am trying to post cross company fund transfers via FRFT -> F111. In my scenario, CC1 is sending amount to CC2 via a virtual payment method. I have done basic company code set up and also customizations in FBZP for payment method and F8B
-
I currently have 10.5.8 software, what is the next step up?
I am trying to update my softwware. There are no software updates available. I'm thinking what I have is updated. What software do I need to purchaser so that I may update my software. I currently have Leopard 10.5.8
-
How can reinstall the Adobe ExportPDF in my computer
It's any body can tell my How can Reinstall my Adobe ExportPDF in my computer? Thank you
-
Hi, when a business rule was set to a web form, and then we open the web form, we can see the business rule in the left section of the form. so if we need to launch the business rule, we just need to double-click the business rule. but someone cannot
-
i don't know why but all of a sudden i can't open my iweb, i've hardly even used it and i didn't delete any of the files, when i try to open it is say an error has occurred ya da yah, and it says to reset the default settings and try restarting......