whats farcry 3 about
Started by xNuzzy, December 26, 2012, 04:05:35 PM
public class CraftMine
{
public static void main(String [] args)
{
Game g = new Game(); //make the game object
g.run(); //run the game
System.exit(0); //exit and close all threads when the game is ready to close (isRunning is set to false)
}
}
Quote
//this class does nothing but provide you with a blank window to fill in with your game objects
import javax.swing.*;
import java.awt.*;
public class Game extends JFrame
{
private boolean isPlaying = true;
//fps settings
private final int DEFAULT_FPS = 60;
private int fps = DEFAULT_FPS;
//window dimensions settings
private int windowWidth = 640;
private int windowHeight = 480;
///place any other global objects you may need below
public static void main(String [] args) //ignore this
{
}
public run()
{
boolean isPlaying = true;
initialize(); //call the initialization logic
while(isPlaying)
{
long startTime = System.currentTimeMillis();
update();
draw();
long endTime = System.currentTimeMillis();
//keep the framerate from going above the specified fps (default fps is 60)
if((endTime - startTime) > (1000/fps))
{
try {Thread.sleep((endTime - startTime) - (1000/fps));}
catch (Exception e) {}
}
}
}
public void initialize()
{
setSize(windowWidth, windowHeight); //sets the screen dimensions
//TODO: place initialization logic here! Set other JFrame settings as well
}
public void update()
{
//TODO: place update logic here! Include user input. To make the program
//stop, simply set isRunning to false to make the while loop exit and consequently, the whole program
}
public void draw()
{
BufferedImage bb = new BufferedImage(windowWidth, windowHeight, BufferedImage.TYPE_INT_RGB);
Graphics buffer = getGraphics(); //get the graphics object (from the JFrame)
Graphics backbuffer = bb.getGraphics(); //get the graphics object (from the backbuffer buffered image "bb")
//TODO: place drawing logic here! (draw all of your shapes to the backbuffer object. NOT the buffer object)
//END DRAWING LOGIC
buffer.drawImage(backbuffer, 0, 0, this); //draw the backbuffer to the screen
//this is known as double buffering, and this prevents the screen from flickering while performing the draw method
}
}
Quote from: That Goalie Guy. on December 29, 2012, 07:34:22 PMThat song is not weird. I grew up listening to country and the songs have good meanings. Sure, most of them are about love, but that one is not. I know most of you are think that I am crazy for listening to country music, but "God is great, beer is good and people are crazy" :p
My dad likes weird songs. Title of 1: death to my hometown.
Chorus of the other: god is great, beer is good, nd ppl r crazy!
Quote from: pew1998 on December 30, 2012, 05:16:44 AMDont get me wrong i love country. I just think 'death to my hometown' is an odd name. And the other is well, kinda stupid.Quote from: That Goalie Guy. on December 29, 2012, 07:34:22 PMThat song is not weird. I grew up listening to country and the songs have good meanings. Sure, most of them are about love, but that one is not. I know most of you are think that I am crazy for listening to country music, but "God is great, beer is good and people are crazy" :p
My dad likes weird songs. Title of 1: death to my hometown.
Chorus of the other: god is great, beer is good, nd ppl r crazy!
Quote from: Morrison1996 on December 30, 2012, 04:30:36 AMI just noticed it's the 30th XD. Depends on his time zone for the 31st
Is it the 31st yet.