first_post2.0b - You are all great programmers.

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
Hyozan
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 14
Joined: Tue Nov 04, 2008 8:06 am
Location: Texas

first_post2.0b - You are all great programmers.

Post by Hyozan »

I'm a soldier in the U.S. Army, but in my spare time of late I've been trying to pick up programming. I've done a few simple ( and I mean SIMPLE ) programs, nothing worth mentioning, but now I'd like to step it up a notch. I'm taking GyroVorbis' advice and starting with Blitz3D.

My idea is to make a simple, but interesting text-based RPG. Maybe later on once my skills develope, I can go back and add graphics or what not. I just see it as something I can build on. Would this be a good choice for a project?

Any suggestions would be appreciated, and while I know this last little part will be a bit off topic here, I'd still like to say: GyroVorbis, you've got class. Those pompous assholes at Jforce don't know who they're dealing with. Thanks for humoring my little comment. And sorry if this is a bit late, I only recently discovered you guys on youtube.
Last edited by Hyozan on Wed Nov 05, 2008 9:49 pm, edited 2 times in total.
User avatar
avansc
Respected Programmer
Respected Programmer
Posts: 1708
Joined: Sun Nov 02, 2008 6:29 pm

Re: A question for all you programmers out there, and Gyrovorbis

Post by avansc »

Hyozan wrote:I'm a soldier in the U.S. Army, but in my spare time of late I've been trying to pick up programming. I've done a few simple ( and I mean SIMPLE ) programs, nothing worth mentioning, but now I'd like to step it up a notch. I'm taking GyroVorbis' advice and starting with Blitz3D.

My idea is to make a simple, but interesting text-based RPG. Maybe later on once my skills develope, I can go back and add graphics or what not. I just see it as something I can build on. Would this be a good choice for a project?

Any suggestions would be appreciated, and while I know this last little part will be a bit off topic here, I'd still like to say: GyroVorbis, you've got class. Those pompous assholes at Jforce don't know who they're dealing with. Thanks for humoring my little comment. And sorry if this is a bit late, I only recently discovered you guys on youtube.

text-based RPG. do you mean like just a text based game. well you can just use C/C++ java/pascal/basic for that. i will say this. making a good text-based game is quite hard. getting a program to be able to understand lexicon is hard. id say start with something like pong, then move on to pac-man. then tetris. tetris is actually a tricky bastard to program.
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
User avatar
Trask
ES Beta Backer
ES Beta Backer
Posts: 738
Joined: Wed Oct 29, 2008 8:17 pm
Current Project: Building a 2D Engine
Favorite Gaming Platforms: Sega Genesis and Xbox 360
Programming Language of Choice: C/C++
Location: Pittsburgh, PA
Contact:

Re: A question for all you programmers out there, and Gyrovorbis

Post by Trask »

If you're talking about doing that program for the sake of doing it, I'd stick with BASIC to accomplish this. To learn another language, I wouldn't do that project to start, I'd concentrate more on on the basics for that. Text games are simple in that they don't have graphics, but if you get deep into it you have a lot of logic to plot out such as dialog trees, inventory systems, etc... I have this book called Game Programming 2nd Edition and it sticks with console programming in C++, but it shows you what you can do with various elements in terms of game logic. So they had a small inventory system going, but that was a bit into the book and that's understanding the syntax from that chapter and before it.
MarauderIIC wrote:You know those people that are like "CHECK IT OUT I just made Linux run on this piece of celery [or other random object]!!"? Yeah, that's Falco, but with ES.
Dear god, they actually ported ES to a piece of celery!
Martin Golding wrote: "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Re: A question for all you programmers out there, and Gyrovorbis

Post by Falco Girgis »

Yeah, it's actually very true.

If you are going to make a text based game where it's basically a "choose your own adventure story" where you just type a number like 1 through 3 at a menu to advance the storyline, that's one thing.

But it can get sooo much harder when you have advanced dialog, inventory, rooms, can examine things, etc.

I would have to say that pong would actually be much easier than creating a detailed text based RPG. It's really just a matter of learning some basic graphics calls. We can all help you if you get stuck (not sure how many of us are using Blitz3D, though).

But thanks for the compliments on the videos, I really appreciate it. Also, thanks for serving our country.
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Re: A question for all you programmers out there, and Gyrovorbis

Post by MarauderIIC »

I did a MUD engine in C/C++. MUD's essentially a multiplayer text adventure.
I'd recommend some sort of dynamic array (C++: vector) that you can use to load room data into. I used C++ pointers for room connections, and set the player's 'currentRoom' pointer accordingly. There were a lot of other things, if you need a hand, I can help you out. Can't shoot you any source from it though, lost it in hd crash.
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
User avatar
Hyozan
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 14
Joined: Tue Nov 04, 2008 8:06 am
Location: Texas

Re: A question for all you programmers out there, and Gyrovorbis

Post by Hyozan »

I knew registering here was a wise decision. The collaborative knowledge of all sorts of programmers coming together is a gold mine, in my opinion. Thank you all for the advice.

To GyroVorbis: It's my pleasure, no thanks necessary. I'm looking forward to seeing your teams progress.

To Marauder: I may just try and work with the simpler things first that were suggested. However, when I do begin work on my idea, I'd be quite thankful for your help and advice along the way. I'll be in touch.

Once again, thanks for the replies.
User avatar
programmerinprogress
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 632
Joined: Wed Oct 29, 2008 7:31 am
Current Project: some crazy stuff, i'll tell soon :-)
Favorite Gaming Platforms: PC
Programming Language of Choice: C++!
Location: The UK
Contact:

Re: A question for all you programmers out there, and Gyrovorbis

Post by programmerinprogress »

good luck with whatever you decide to do, trying to expand your understanding of programming can only be a good thing!
---------------------------------------------------------------------------------------
I think I can program pretty well, it's my compiler that needs convincing!
---------------------------------------------------------------------------------------
And now a joke to lighten to mood :D

I wander what programming language anakin skywalker used to program C3-PO's AI back on tatooine? my guess is Jawa :P
User avatar
avansc
Respected Programmer
Respected Programmer
Posts: 1708
Joined: Sun Nov 02, 2008 6:29 pm

Re: A question for all you programmers out there, and Gyrovorbis

Post by avansc »

here is my advice:

first : depending on what language you choose, you will be limited in what you will be able to do.
id say go C/C++

second : id go and buy a book on OpenGL, (in my opinion having a desk reference will save you time, and you will learn more).

lastly : make something simple. at first dont mess around with data structures or crud like that. just start drawing lines. stick with 2D stuff.
the easiest game really is snake without apples, just try and think about how you will do that. there are great example on that and i actually have a pretty sweet java one if you are interested.


ps: this code is very old, i wrote it in freshman introductory to java.


SnakePanel.java

Code: Select all

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.Random;
import java.io.*;
 
 /**
  * This class sets up the graphical panel that is seen in the GUI.
  */
public class SnakePanel extends JPanel implements ActionListener, KeyListener {

	/**
	 * This is the timer which fires an action to actionEvent every .1 seconds
	 */
	private Timer timer;
	
	/**
	 * This object allows easy access to the pictures that are used in the graphical part of the game
	 */
	private ClassLoader cl;
	
	/**
	 * This image is one piece of the snake (multiple uses of it add up to the entire snake)
	 */
	private ImageIcon s;
	
	/**
	 * This image is the ball that the snake eats
	 */
	private ImageIcon b;
	
	/**
	 * This image is the wall around the snake and the balls (multiple uses again make up the wall)
	 */
	private ImageIcon w;
	
	/**
	 * This array is a collection of all the balls in the game
	 */
	private Ball balls[];
	
	/**
	 * This is the snake object to be used in the game
	 */
	private Snake snake;
	
	/**
	 * This variable knows what direction the snake is moving in
	 * 0 - UP
	 * 1 - LEFT
	 * 2 - DOWN
	 * 3 - RIGHT
	 */
	private int direction;
	
	/**
	 * Random int creater is used to position balls
	 */
	private Random r;
	
	/**
	 * Label for showing the score
	 */
	private JLabel score;

	/**
	 * Label for showing the high score
	 */
	private JLabel highScore;
		
	/**
	 * This keeps track of the number of balls eaten (the score)
	 */
	private int eaten;
	
    /**
     * The constructor which creates the panel that has the graphics in it.
     *
     * @param countDown  timer object used for updating panel
     * @param k The Label that has keyboard focus and shows the score.
     * @param hs The Label that contains the high score
     */
    public SnakePanel (Timer countDown, JLabel k, JLabel hs) {
    	
    	score = k; // initializes the label
    	score.setText("Balls Eaten: " + 0);
    	
    	highScore = hs;
    	highScore.setText("High Score: " + getHighScoreFromFile());
    	
    	direction = 3; // sets the starting direction of the snake to RIGHT
    	
        timer = countDown;  // sets the local Timer to a instance variable
        timer.start(); // starts the timer
        
        
        r = new Random(); // sets up random to be used to generate balls
        snake = new Snake(); // sets up the snake object
        balls = new Ball[5]; // initializes the array to have 5 balls
        eaten = 0; // starts the score off at 0
        
        makeBalls(); // this methodcall initializes the ball objects and puts them in the array
        
      	
        timer.addActionListener(this);  // This causes the actionPerformed to run each time the timer hits .1 seconds
        
        timer.setDelay(100); //** INCREASE THIS NUMBER TO SLOW DOWN THE SNAKE! **
        
        score.addKeyListener(this); // This tells the program to listen to the keyboard when the label score is focused
        
        cl = this.getClass().getClassLoader();  // this sets up the picture loader
        s = new ImageIcon(cl.getResource("snake.GIF")); // this loads the picture
		b = new ImageIcon(cl.getResource("ball.GIF")); // this loads the picture
		w = new ImageIcon(cl.getResource("wall.GIF")); // this loads the picture
        
        score.requestFocusInWindow(); // again, we ask for the label to have the keyboard focus, just in case.
        setBackground(Color.red); //sets the background of the game to red
        setSize(100,100);  // sets the size
    }
    
    public void checkForCollisions()
    {
    	if(snake.getX(0) == 0 || snake.getX(0) == 100 || snake.getY(0) == 0 || snake.getY(0) == 100 || snake.collision())
        {
            timer.stop();
            System.out.println("Game Over");
            if(eaten > getHighScoreFromFile())
            {
                System.out.println("New High Score!!");
                writeHighScoreToFile(eaten);
                highScore.setText("NEW HIGH SCORE: " + eaten);
            }
        }    	
    }
    
    public boolean ballWasEaten(int whichBall)
    {   
    	if((snake.getX(0) == balls[whichBall].getX()) && (snake.getY(0) == balls[whichBall].getY())){
    		balls[whichBall] = null;
    		eaten+=1;
    		snake.grow();
    		return true;
    	}	
    	return false;	
    }

	public int getHighScoreFromFile()
	{
		Object obj = null;
        BufferedReader bufferedreader = null;
        try
        {
            FileReader filereader = new FileReader("highscore.txt");
            bufferedreader = new BufferedReader(filereader);
        }
        catch(IOException _ex)
        {
            System.out.println("error opening file!");
            return 0;
        }
        int hs;
        try
        {
            hs = Integer.parseInt(bufferedreader.readLine());
        }
        catch(IOException _ex)
        {
            System.out.println("error reading from file!");
            return 0;
        }
        return hs;
	}
	
	public void writeHighScoreToFile(int score)
	{
		FileWriter filewriter = null;
        PrintWriter printwriter = null;
        try
        {
            filewriter = new FileWriter("highscore.txt");
            printwriter = new PrintWriter(filewriter);
        }
        catch(IOException _ex)
        {
            System.out.println("error opening file!");
            return;
        }
        try
        {
            printwriter.print(score);
            filewriter.close();
            return;
        }
        catch(IOException _ex)
        {
            System.out.println("error writing to or closing file!");
        }
	}
	 
	public boolean finished()
	{
		for(int i = 0; i < 5; i++)
            if(balls[i] != null)
                return false;

        return true;
	}
	
	public void makeBalls()
	{
		boolean col = true;
		int x = 0;
		int y = 0;
		int count = 0;
		
		for(int i = 0; i < 5; i++)
		{
			while(col)
            {
            	col = false;
            	
            	x = r.nextInt(101);
            	y = r.nextInt(101);
            	
            	for(int a = 0;a < snake.getLength();a++)
            	{
            		if((snake.getX(a) == (x - (x%5))) && (snake.getY(a)== (y - (y%5))))
            		{
            			col = true;

            		}
            	}
            }
            
            col = true;
            	
            balls[i] = new Ball(x, y);
        }
	}

    /**
     * This is another required method from implementing KeyListener.  This method
     * responds to keys being pressed (meaning pushed and held down).  Here, we listen
     * for an arrow key being pushed and change the direction of the snake based on which one
     * was pushed.
     *
     * Every key on the keyboard has a number associated with it, known as its KeyCode.  This is
     * how we tell key was pushed.
     *
     * @param e the key that was pushed.
     */
    public void keyPressed(KeyEvent e)
    {
    	if(e.getKeyCode() == 39)
        {
        	if(direction != 1)
            	direction = 3;
        }
        if(e.getKeyCode() == 37)
        {
            if(direction != 3)
            	direction = 1;
        }
        if(e.getKeyCode() == 38)
        {
        	if(direction != 2)
            	direction = 0;
        }
        if(e.getKeyCode() == 40)
        {
            if(direction != 0)
            	direction = 2;
        }	
    }

	/**
	 * Similar to the way actionPerformed handles events that occur in the gui,
	 * keyTyped handles the event of a key being typed. Although it is not used for anything,
	 * by implementing KeyListener we are required to have it.
	 *
	 * @param e the key that was typed.
	 */
    public void keyTyped(KeyEvent e) {
    	// DO NOT ENTER CODE HERE
    }
    
    /**
     * This is the final required method from implementing KeyListener.
     * It handles when a key is released, or let go of after it was pushed down.
     * 
     * @param e the key being released
     */
    public void keyReleased(KeyEvent e) { 
    
    	// DO NOT ENTER CODE HERE   	
    }
    
    /**
     * This method responds to the TIMER object, which fires an action every .1 seconds
     *
     * @param event The timer object telling the program that .1 seconds has passed
     */
    public void actionPerformed(ActionEvent event) {
    	repaint(); // tells the GUI to repaint itself
    }
    
    /**
     * This method paints the walls, snake, and balls.
     * It is called every .1 seconds.
     * 
     * @param page  graphics object used for updates
     */
    public void paintComponent(Graphics page) {
        super.paintComponent(page);
       
        //first we paint the 10*10 wall  
        for(int i = 0; i < 21; i++)
        {
        	w.paintIcon(this, page, (i*5)+100, 100);
        	w.paintIcon(this, page, (i*5)+100, 200);
        	w.paintIcon(this, page, 100, (i*5)+100);
        	w.paintIcon(this, page, 200, (i*5)+100);
        }
                
        // next we update the snake based on the current direction and paint the snake
        snake.move(direction);
        
        // this paints the snake
        for(int i = 0; i < snake.getLength(); i++)
        {
        	s.paintIcon(this, page, 100+snake.getX(i), 100+snake.getY(i));        	
        }
        
        // here we check to see if the snake crashed into itself or the wall, thus ending the game
		checkForCollisions();
        
        // paint balls if they are still uneaten, or set them to null if they were eaten
        for(int i = 0; i < 5; i++)
        {
        	if(balls[i] != null) // if the ball in this array index was not eaten yet
        	{
        		if(!ballWasEaten(i)) //collision
        			b.paintIcon(this, page, 100+balls[i].getX(), 100+balls[i].getY()); // paint the ball otherwise	
        	}
        }
        
        // if all the balls are eaten, we make new ones
        if(finished())
        {
        	makeBalls();
        }
        
        // update the score
        score.setText("Balls Eaten: " + eaten);
		
    }
}
Snake.java

Code: Select all

/**
 * This class represents the snake in the game, more specifically
 * where each piece of the snake lies in terms of (x,y), and it's length.
 */
public class Snake
{
	/**
	 * The length of the snake
	 **/
	private int len;
	
	/**
	 * This array tells the position of each piece of the snake
	 * [0][0] is the head of the snake's x-coordinate
	 * [0][1] is the head of the snake's y-coordinate
	 */	
	private int position[][];
	
	/**
	 * This tells if the snake is growing (meaning it just ate a ball)
	 */
	private boolean growing;
	
	/**
	 * This tells how many more pieces of the snake are to be added each time it moves
	 * based on growth from eating a ball
	 */
	private int remainingGrowth;
	
	/**
	 * This is the constructor that sets up the snake's variables
	 */
	public Snake()
	{
		remainingGrowth = 0; // it should not grow yet	
		growing = false; // it is not growing at this time
		len = 5; // it starts out being 5 units long
		
		position = new int[50][2]; // this array starts out as 50 units, each with an x and a y coordinate.
		                           // it is made big to account for the growth of the snake.
				
		// This sets the y coordinate of the snake's head and body to 5
		for(int i = 0; i < 5; i++)
		{
			position[i][1] = 5;
		}
		
		// here we set the x coordinates for the snake (each piece of the snake is 5 pixels long and high).
		// This is how the GUI sees the coordinates (in case you are wondering why the numbers look strange)
		/**
		 *  (0,0)..................(100,0)
		 *    .						  .
		 *    .						  .
		 *    .						  .
		 *    .						  .
		 *  (0,100)................(100,100)
		 */
		position[0][0] = 25;
		position[1][0] = 20;
		position[2][0] = 15;
		position[3][0] = 10;
		position[4][0] = 5;		
	}
	
	public int getLength()
	{
		return len;
	}
	
	public int getX(int part)
	{
		return position[part][0];
	}
	
	public int getY(int part)
	{
		return position[part][1];
	}
	
	public void directSnake(int direction)
	{
		switch(direction)
        {
        case 0: // '\0'
            position[0][1] -= 5;
            return;

        case 1: // '\001'
            position[0][0] -= 5;
            return;

        case 2: // '\002'
            position[0][1] += 5;

            return;

        case 3: // '\003'
            position[0][0] += 5;
            break;
        }		
	}
	
	public boolean collision()
	{
		for(int i = 1; i < len; i++)
            if(position[0][0] == position[i][0] && position[0][1] == position[i][1])
                return true;

        return false;		
	}
		
	/**
	 * This method handles moving the snake in a certain direction.
	 * The head moves in that direction 5 pixels.
	 *
	 * The rest of the snake may or may not move depending on whether
	 * or not the snake is growing.  If it is not, the rest of the snake
	 * simply moves to the position the spot in front if it used to be in.
	 *
	 * If the snake is growing, the rest of the snake does not move, and the new
	 * unit of the snake is added to the position where the head used to be, thus
	 * creating the illusion of the snake growing
	 *
	 * @param direction The direction the snake is moving (0-UP 1-LEFT 2-DOWN 3-RIGHT)
	 */
	public void move(int direction)
	{
		// If the snake is not growing
		if(!growing)
		{	
			// move the position of the body units to the previous position
			// of the unit in front of it	
			for(int i = len - 1; i > 0; i--)
			{
				position[i][0] = position[i-1][0];
				position[i][1] = position[i-1][1];
			}
		}
		
		// If the snake is growing
		else
		{
			// we move the units down a notch in the array to make
			// room for the new "grown" unit, which is placed behind the
			// head of the snake (position 0 in the array)
			for(int i = len; i > 0; i--)
			{
				position[i][0] = position[i-1][0];
				position[i][1] = position[i-1][1];
			}
			
			remainingGrowth--; // decrement the count of units that need to be grown
			len++; // add one to the length of the snake
			
			// if the snake is done growing, we set growing to false
			if(remainingGrowth == 0)
				growing = false;
		}
		
		directSnake(direction);		
	}
		
	/**
	 * This method handles making the array of positions bigger if the snake grows
	 * from eating a ball.  It also sets the growing variable to true and adds 3 to
	 * the remaining growth.
	 */
	public void grow()
	{		
		growing = true;
		remainingGrowth += 3;
		
		// if the snake is becoming bigger than the array can hold, we need to add to
		// its length and copy over the values	
		if((len % 50)  > 40)
		{
			int[][] temp = new int[len+50][2];
			for(int i = 0; i < len; i++)
			{
				temp[i][0] = position[i][0];
				temp[i][1] = position[i][1];
			}
			position = temp;
		}			
	}
		
}
SnakeGUI.java

Code: Select all

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

/**
 * This is the GUI that shows the game.
 * All this class does is set up the frame with the components,
 * one of which being the panel that has the graphical game in it.
 */
public class SnakeGUI extends JFrame {
    /**
     *  A number used with the timer. each 100 is .1 second
     *              200  ---  .2 seconds
     *              500  ---  .5 seconds
     */
    private final int DELAY = 100;
    
    /**
     * The timer class that will call actionPerformed every DELAY.
     */
    private Timer timer;
    
    /**
     *	This label shows the score and will also hold the "focus" of the keyboard.
     */
	private JLabel score;
    
    /**
     * This label shows the current high score
     */
    private JLabel highScore;
    
    /**
     *	This is the constructor, which calls a method that sets up the GUI with all it's components
     *
     */
    public SnakeGUI()
    {
    	init();
    }
    
    /**
     * Initializes the GUI. Creates the layout, creates a timer to
     * use in updating the panel that shows the game's graphics.
     */
    public void init() {
    	
		score = new JLabel("");
        timer = new Timer(DELAY, null);// Creates a timer object using a .1 second interval
        
        JPanel scorePanel = new JPanel();// creates the panel for the score that will be displayed
		
        scorePanel.add(score, BorderLayout.CENTER);//adds the label to a panel
        
        highScore = new JLabel("High Score: ");
        JPanel highScorePanel = new JPanel(); // a panel for holding the high score label
        
        highScorePanel.add(highScore, BorderLayout.CENTER);
        
        this.pack(); // this will make the GUI recognize the components that have been added.
        			 // This is important because without it, the game will not respond to
        			 // keyboard buttons as will be shown later.
        
		Container c = getContentPane(); // container for the components
		
        c.add(new SnakePanel(timer, score, highScore), BorderLayout.CENTER); 
                                    // creates the SnakePanel and then adds to the container 

		c.add(highScorePanel, BorderLayout.NORTH); // adds the high score panel to the north region
		
        c.add(scorePanel, BorderLayout.SOUTH); // adds the score panel to the container
        
        score.setFocusable(true); // This allows the label score to have keyboard focus
        
        score.requestFocusInWindow(); // This gives the label score the keyboard focus
        
        setTitle("Snake Race"); // title
        setLocation(100,100); // location
		setSize(310,350); // size
		setDefaultCloseOperation(EXIT_ON_CLOSE); // end the program when the window is closed
		//show(); // show the GUI
		setVisible(true); // show the GUI (I always use both these lines because I can never remember which one to use)
		
    }
   
    /**
     * This main method just creates a new GUI which starts the game.
     *
     * @param args Command Line arguments, which are not used
     */
    public static void main(String args[])
    {
    	new SnakeGUI();
    }

}
Ball.java

Code: Select all

/**
 * This class keeps track of an individual ball that can be eaten
 * by the snake.  It simply has an x and y coordinate.
 */
public class Ball
{
	/**
	 * The x-coordinate of the ball
	 */
	private int x;
	
	/**
	 * The y-coordinate of the ball
	 */
	private int y;
	
	/**
	 * This constructor takes two random ints between 0 and 100, which 
	 * are used to determine where the ball is placed.  The ball is placed
	 * to the neares multiple of 5 for x and y because the ball is a 5*5 picture,
	 * and it needs to align with the 5*5 picture of the snake.
	 *
	 * @param x The random x coordinate
	 * @param y The random y coordinate
	 */
	public Ball(int x, int y)
	{
		x = x - (x%5);
		if(x == 0)
			x = 5;
		if(x == 100)
			x = 95;
		y = y - (y%5);
		if(y == 0)
			y = 5;
		if(y == 100)
			y = 95;
		this.x = x;
		this.y = y;
	}	
	
	/**
	 * This method returns the x-coordinate of the ball
	 *
	 * @return The x-coordinate of the ball
	 */
	public int getX()
	{
		return x;
	}
	
	/**
	 * This method returns the y-coordinate of the ball
	 *
	 * @return The y-coordinate of the ball
	 */
	public int getY()
	{
		return y;
	}	
}
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: A question for all you programmers out there, and Gyrovorbis

Post by MarauderIIC »

Well, if he's doing a text-based RPG, I don't think that he needs OpenGL yet =)
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
User avatar
cypher1554R
Chaos Rift Demigod
Chaos Rift Demigod
Posts: 1124
Joined: Sun Jun 22, 2008 5:06 pm

Re: A question for all you programmers out there, and Gyrovorbis

Post by cypher1554R »

xD Haha.. Anyone notice the joke in the title of this thread?
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Re: A question for all you programmers out there, and Gyrovorbis

Post by Falco Girgis »

Lol, you bastards.
User avatar
Trask
ES Beta Backer
ES Beta Backer
Posts: 738
Joined: Wed Oct 29, 2008 8:17 pm
Current Project: Building a 2D Engine
Favorite Gaming Platforms: Sega Genesis and Xbox 360
Programming Language of Choice: C/C++
Location: Pittsburgh, PA
Contact:

Re: A question for all you programmers out there, and Gyrovorbis

Post by Trask »

Oh how does the joke go...

Falco doesn't code, he takes existing source code and when we watch the videos we watch them in reverse as he's deleting lines so it appears that he's typing the code out.


I probably butchered that joke, but someone will know what I mean and chuckle. :roll:
MarauderIIC wrote:You know those people that are like "CHECK IT OUT I just made Linux run on this piece of celery [or other random object]!!"? Yeah, that's Falco, but with ES.
Dear god, they actually ported ES to a piece of celery!
Martin Golding wrote: "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
User avatar
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

Re: A question for all you programmers out there, and Gyrovorbis

Post by eatcomics »

Trask wrote: I probably butchered that joke, but someone will know what I mean and chuckle. :roll:
I chuckled at that part^ :lol:
Image
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Re: first_post2.0b - You are all great programmers.

Post by Falco Girgis »

Oh shit, I have finally been found out...

Fine, I will come clean then. I have an Asian computer engineer with a Master's degree locked up in my basement with nothing but an old Celeron and a Dreamcast. I put little folded pieces of notebook paper through a slit in the door every day with my daily programming tasks for him. He performs these tasks for food. As he does these tasks, I require him to use camstudio so that I can capture them and use them to trick you all in the dev videos.

Meanwhile, I'm upstairs reaping all of the benefits from his hard work. Basically it's nothing but a drunken orgy upstairs while the Asian guy does the devving as a captive in my basement.
User avatar
avansc
Respected Programmer
Respected Programmer
Posts: 1708
Joined: Sun Nov 02, 2008 6:29 pm

Re: first_post2.0b - You are all great programmers.

Post by avansc »

GyroVorbis wrote:Oh shit, I have finally been found out...

Fine, I will come clean then. I have an Asian computer engineer with a Master's degree locked up in my basement with nothing but an old Celeron and a Dreamcast. I put little folded pieces of notebook paper through a slit in the door every day with my daily programming tasks for him. He performs these tasks for food. As he does these tasks, I require him to use camstudio so that I can capture them and use them to trick you all in the dev videos.

Meanwhile, I'm upstairs reaping all of the benefits from his hard work. Basically it's nothing but a drunken orgy upstairs while the Asian guy does the devving as a captive in my basement.

damnit, i must be asian.
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
Post Reply