(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
05-17-24 03:05 AM
Acmlm's Board - I3 Archive - - Posts by Squash Monster
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
User Post
Squash Monster

Bouncy


 





Since: 11-18-05
From: Right next to myself.

Last post: 6305 days
Last view: 6298 days
Posted on 11-18-05 06:13 PM, in Programming Experts directory Link
I know a lot of languages, but the only one I'm really willing to help people with is Java.
Squash Monster

Bouncy


 





Since: 11-18-05
From: Right next to myself.

Last post: 6305 days
Last view: 6298 days
Posted on 11-19-05 04:27 PM, in Voices, Languages and Tounges [Sentence Choosing] Link
I'm going to have to vote for nine, "Hello. I'm [name] from [country]. This is my contribution to the "Voices, Languages and Tounges" thread on Acmlm's Board," because it's actually possible to say it in my language of choice without getting too creative.
Squash Monster

Bouncy


 





Since: 11-18-05
From: Right next to myself.

Last post: 6305 days
Last view: 6298 days
Posted on 11-19-05 04:43 PM, in How to make a game [beginner Link
Too many beginning game programmers either start with a tool like RPG Maker and never learn how to program for real or start with the crazy notion that they're going to make Doom 4 on their first try.

So I'm going to give you all a piece of advice and all the hard code (in Java).

Start with Pong, then make Gradius, then make Super Mario Brothers, then go ahead and make whatever it was you were planning on in the first place.

And here's some code:

This will show how to get yourself a window, a timer, and keyboard input. Also known as all you should really need to start programming.

First, the main class. You may want to rename this from EmptyClass to the name of your game.

Excuse the fact that everything's doublespaced, Acmlmboard's treatment of the pre tag is icky.

import java.awt.*;
import javax.swing.JPanel;
import javax.swing.JFrame;
import javax.swing.Timer;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;


class EmptyClass extends JPanel implements ActionListener
{
//Timing variables:
private Timer gameTimer = new Timer(15, this); //One frame per 15ms = 60fps
private boolean midFrame = false; //Explained in actionPerformed
//Game-related variables:
private Player player = new Player(); //Every game needs a player.

public EmptyClass()
{
//Set up the game.
setPreferredSize(new Dimension(512,512)); //(512,512) are the dimensions
//You may want to change it to something else.
//It's in pixels.
setFocusable(true); //Say that it's possible to receive keypresses
addKeyListener(player); //Give the player object access to keypresses.
//Put any initialization code you'll need here:


//And tell the game it's time to start:
gameTimer.start();
}

public void actionPerformed(ActionEvent eventWeDontCareAbout)
{
//This method is run every frame.
//Naturally, bad things will happen if the last frame hasn't finished.
//So check that before doing anything.
if(!midFrame)
{
midFrame = true; //Stop letting new frames be processed.
//Actual game code goes here:
player.doStep(); //For sake of example, the player will do something

//Tell the game it's time to draw again
repaint(); //This indirectly calls paintComponent
midFrame = false; //We're done, so make sure we know that.
}
}

public void paintComponent(Graphics g1)
{
//This method is run every time the game needs to be drawn.
super.paintComponent(g1); //ALWAYS do this or weird things may happen.
Graphics2D g = (Graphics2D) g1; //Graphics2D is more advanced,
//So get an instance of that.
//Do any drawing code, or calling of things that need to be drawn here:
player.draw(g);
}

public static void main(String[] args)
{
//Sets up a window for the game and all that nonsense.
JFrame appFrame = new JFrame(); //Make a window to put everything in
EmptyClass game = new EmptyClass(); //Make an instance of your game
appFrame.setContentPane(game); //Make the window show your game
appFrame.pack(); //Make the window sort itself out
appFrame.show(); //Show the window
}
}


And now, a class for the "player", or whatever it is that recieves input from the player. This one is a bit more examply.

import java.awt.*;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;

class Player implements KeyListener
{
//Class variables:
private int x = 20;
private int y = 20;
private int xs = 0;
private int ys = 0;

public Player()
{
//Initialization code would go here if you needed any

}

public void doStep()
{
//A method to call once per frame

//Just example code here:
x += xs;
y += ys;
}

public void draw(Graphics2D g)
{
//Drawing code goes here:

//Just an ugly example:
g.fillRect(x,y,10,10);
}

public void keyPressed(KeyEvent e)
{
//Called whenever a key is pressed
switch(e.getKeyCode()) //Check what key was pressed
{
//Note that what we do with each of these keys is just an example
case KeyEvent.VK_RIGHT:
xs = 4;
break;
case KeyEvent.VK_UP:
ys = -4;
break;
case KeyEvent.VK_LEFT:
xs = -4;
break;
case KeyEvent.VK_DOWN:
ys = 4;
break;
}
}

public void keyReleased(KeyEvent e)
{
//Called whenever a key is released
switch(e.getKeyCode()) //Check what key was released
{
//Note that what we do with each of these keys is just an example
case KeyEvent.VK_RIGHT:
if(xs > 0)
xs = 0;
break;
case KeyEvent.VK_UP:
if(ys < 0)
ys = 0;
break;
case KeyEvent.VK_LEFT:
if(xs < 0)
xs = 0;
break;
case KeyEvent.VK_DOWN:
if(ys > 0)
ys = 0;
break;
}
}

public void keyTyped(KeyEvent e)
{
//Called when a key is pressed then released.
//Nobody cares about this method.
//But you need it because you implemented KeyListener
}
}



(edited by Squash Monster on 11-19-05 03:44 PM)
(edited by Squash Monster on 11-19-05 04:42 PM)
(edited by Squash Monster on 11-19-05 04:55 PM)
Squash Monster

Bouncy


 





Since: 11-18-05
From: Right next to myself.

Last post: 6305 days
Last view: 6298 days
Posted on 11-20-05 02:28 AM, in Political Ideology Link
Political compass says:
Economic Left/Right: -3.13
Social Libertarian/Authoritarian: -7.54

This is close to what most tests say (though they usually put me farther left), and moderately close to what I'd say.

By my own assesment, I'm far, far farther left than most everyone, including socialists and even communists.

My ideal economic system is /really/ far out there. I'll try to explain.

We have computers and robots and a ton of technology doing work for us. One would think that'd mean less people have to work, but just as many are. This is because a lot of people are doing pointless beurocratic jobs just to take up space. That's just silly.

So, in the ideal economy, we should have a very high unimpoyment rate, because nobody is doing any useless work.

A good government gives its citizens good health care, education, and all that other jazz. All that stuff costs money.

We can't get that money by taxing the citizens, because most of them are going to be unimployed, so we have to tax the coorporations. The coorporations will have to lay off all their unimportant workers to keep up with our heavy taxes. This gets that unimpoyment that we wanted in the first place.

Coorporations are just going to hop to a different country if we tax them too hard. So we have to give them an incentive to be in our country in the first place.

We're already paying a lot for education, so we're going to go ahead and kick that up a bunch until our citizens are some of the most qualified people on the planet.

We're going to make people lose citizenship pretty easilly, so they won't want to switch countries to go work for a coorporation somewhere that'll avoid our taxes, because they'll lose all those benefits we were talking about.

And we're going to tax imports heavilly, since there will be a lot of people living in a country like this, and coorporations won't have a choice but to do business with us.
Squash Monster

Bouncy


 





Since: 11-18-05
From: Right next to myself.

Last post: 6305 days
Last view: 6298 days
Posted on 11-20-05 11:01 AM, in How to make a game [beginner Link
Ah, see, I assumed people would see me say it's in Java in that post, and go look into it a bit.

Java is rediculously easy to program in once you learn how to do the stuff that I just showed how to do.

If you want to make a game, you're going to learn a programming language. There's no way around it. Even most game making tools have their own stripped-down programming language.

Why use a gimped language that only has booleans and if statements when you can take a tiny bit more effort and use one that works?

To learn Java, go here:
Sun's Java tutorial -- basics.
Then here:
Sun's Java tutorial -- objects.
Then use this for reference:
The Java API
Squash Monster

Bouncy


 





Since: 11-18-05
From: Right next to myself.

Last post: 6305 days
Last view: 6298 days
Posted on 11-23-05 01:27 AM, in From Scratch Link
Do you already know any programming languages?

C++ isn't exactly the best language to start with if you're looking to jump right into making a game. First you'll need to spend some time doing some rather bland projects to make sure you have a good grip on the language. Most C graphics libraries are going to require you to be familiar with almost all of the language's features before you can use them.

If you're going to stick with C to start though, I'm going to make you a big suggestion: Start with ASCII graphics and don't switch to real ones until you can program a working roguelike.
Squash Monster

Bouncy


 





Since: 11-18-05
From: Right next to myself.

Last post: 6305 days
Last view: 6298 days
Posted on 11-23-05 01:31 AM, in Your Opinion Link
I'm against game makers in general.

When people are given a new tool, they stop trying as hard and just avoid doing things the tool can't do. Things they would've been willing to do beforehand.

Also: No 3D engine is complete and the only way you're going to get a good one is to either buy one from a game with similar requirements or make your own.
Squash Monster

Bouncy


 





Since: 11-18-05
From: Right next to myself.

Last post: 6305 days
Last view: 6298 days
Posted on 11-27-05 07:07 PM, in Racoon dog ?!?!?!?!? Link
It's been shopped.

It's a racoon's head on a larger varment's body.

I'm thinking a fisher.
Squash Monster

Bouncy


 





Since: 11-18-05
From: Right next to myself.

Last post: 6305 days
Last view: 6298 days
Posted on 11-29-05 06:37 PM, in How to make a game [beginner Link
Originally posted by Thayer
Forgive my ignorance but isn't it true that once you have Java or C++ down, all other programming languages aren't that hard?

Well, no, not quite. Once you have Java or C++ down, about a third of all languages will take roughly ten minutes to learn. A huge number of languages exist that just try to copy one of the two whenever possible. Java and C++ themselves only have around five major differences between them.

It's the same with learning an assembly language, or a version of basic. Once you've learned one or two, a lot of languages of the same type are easy.

It applies more to the ones like Java and C++, though. I just wouldn't say that it makes all programming languages not hard. I can think of a few programming languages that will always be hard no matter how you slice it.


(edited by Squash Monster on 11-29-05 05:39 PM)
Squash Monster

Bouncy


 





Since: 11-18-05
From: Right next to myself.

Last post: 6305 days
Last view: 6298 days
Posted on 11-29-05 08:55 PM, in How to make a game [beginner Link
You said all languages. I said about a third.

I think that's a reasonable enough gap to make it a good idea to point out the distinction while answering your question.
Squash Monster

Bouncy


 





Since: 11-18-05
From: Right next to myself.

Last post: 6305 days
Last view: 6298 days
Posted on 11-29-05 09:05 PM, in So... you have a favorite board game? Link
My favorite board game is Diplomacy.

It's like Risk, with no ranomness, and a lot more diplomacy (surprise surprise).

I'm shocked I saw no mention of it here.
Squash Monster

Bouncy


 





Since: 11-18-05
From: Right next to myself.

Last post: 6305 days
Last view: 6298 days
Posted on 11-29-05 09:10 PM, in Racoon dog ?!?!?!?!? Link
Originally posted by Apofisu
Originally posted by Squash Monster
It's been shopped.

It's a racoon's head on a larger varment's body.

I'm thinking a fisher.
ummm... no? the tanuki is a real animal and really looks like that.
Well, I can be wrong on ocassion, that works too.

The fur around that thing's head messes with my sense of depth perception.

And now for a distraction while I beat a hasty retreat.



(edited by Squash Monster on 11-29-05 08:10 PM)
Squash Monster

Bouncy


 





Since: 11-18-05
From: Right next to myself.

Last post: 6305 days
Last view: 6298 days
Posted on 12-02-05 06:06 PM, in Dragons. Link
I learned something today.

Dragons have disproportionately large spleens.

I thought you all should know that.
Squash Monster

Bouncy


 





Since: 11-18-05
From: Right next to myself.

Last post: 6305 days
Last view: 6298 days
Posted on 12-02-05 11:06 PM, in Dragons. Link
I think a lot of you thought I was kidding.

I can assure you, I was not.

Dragons have unusually large spleens. I have scientific proof.



Originally posted by Clockworkz
I'm part dragon, and I take offense to this
Have you ever disected yourself?

That's right, I thought not. Sit down, spleen-boy.
Squash Monster

Bouncy


 





Since: 11-18-05
From: Right next to myself.

Last post: 6305 days
Last view: 6298 days
Posted on 12-03-05 10:16 AM, in Dragons. Link
Originally posted by [GGS
Cruel Justice]Are you talking about western dragons having large spleens? The eastern ones are serpentine, how did you come up with this conjecture? Are you rascist or something spleen squash dragon-hater!?
Serpents have spleens. Sit down, factless-accusation-man.
Squash Monster

Bouncy


 





Since: 11-18-05
From: Right next to myself.

Last post: 6305 days
Last view: 6298 days
Posted on 12-03-05 02:57 PM, in Dragons. Link
Originally posted by Master Higgins
Originally posted by Danielle
Maybe that's why they have a large spleen. Is that what it's for?

The spleen is an important part of our body. It produces antibodies to help aour inmunnity system. Now i don't know if a large spleen should mean a better defense system, I'm not a doctor
It's quite obvious that you're not, as that's not what spleens are for, and it's entirely possible to live without a spleen.

The spleen decomposes old blood cells and removes waste from the blood stream.
Squash Monster

Bouncy


 





Since: 11-18-05
From: Right next to myself.

Last post: 6305 days
Last view: 6298 days
Posted on 12-04-05 02:03 AM, in Dragons. Link
I said disproportionately large. As in large even for the large body.

I know that the organ that performs that function I mentioned is really big for dragons. And if you ask me, if it acts like a spleen it's a spleen.


You see, dragons are big. They also fly. Big things need lots of food. Flying things need lots of food too. Actually, many flying things need to eat three times their body weight daily. That's a lot when you consider that they're still really big.

Now, I think most of you are aware that dragons also breathe fire. So, not only do they need enough energy to fly and be big at the same time, they need enough energy to produce flame.

When you get right down to it, a dragon is going to have to eat two or three flocks of sheep every few hours, just to stay alive.

However, it seems there's at least one dragon available for every doofus in armor out to impress his girlfriend. Plus enough dragons to remain alive and provide breeding stock for the species. That's a lot of flocks of sheep.

Obviously, dragons can't be eating that much. Indeed, most accounts only having them eating a few maiden sacrifices or the occasional would-be hero.

Indeed, there's only one reasonable conclusion. Dragons are nuclear powered.

Decomposing an adventurer on the atomic level would certainly provide the amount of energy we're talking about here.

The dragon, however, is now subject to a great deal of radiation. And radiation causes cell damage. The dragon must have some means of dealing with this.

Some animals keep a large supply of stem cells throughout their lifetimes, which are used to replace damaged cells. Dragons are obviously pretty big on this. Stem cells used in this manner decompose the cells they're replacing and the cellular remains are passed through the body to...

The spleen.

And dragons need to do this a lot.

Thus, big spleens.
Squash Monster

Bouncy


 





Since: 11-18-05
From: Right next to myself.

Last post: 6305 days
Last view: 6298 days
Posted on 12-04-05 03:23 AM, in ||bass' Impossible Yet Possible Quiz - Question 1 (Peg Game) Link
||bass wanted a strategy that would be gaurinteed. He didn't care which player would be the one able to use it.

But it was easilly possible to misread as wanting a strategy that would work for both players.


Just wanted to save you two pages of back and forth confusion.
Squash Monster

Bouncy


 





Since: 11-18-05
From: Right next to myself.

Last post: 6305 days
Last view: 6298 days
Posted on 12-05-05 08:54 PM, in I am spam. Link
PEANUT BRITTLE battleships from Pennsylvania

They embarked on an INTERGALACTIC ITINERARY to form an embasy to INDIA.

But then their BRAINS suddenly MELTED because they had too many SAMMICHES.


(edited by Squash Monster on 12-05-05 07:56 PM)
(edited by Squash Monster on 12-05-05 07:57 PM)
Squash Monster

Bouncy


 





Since: 11-18-05
From: Right next to myself.

Last post: 6305 days
Last view: 6298 days
Posted on 12-05-05 09:00 PM, in I am spam. Link
That's because I have skills.

Crazy skills.

Srazy ckills.

Chilly pills.

Poor pill bugs. Someone knit them a sweater!


(edited by Squash Monster on 12-05-05 08:00 PM)
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Acmlm's Board - I3 Archive - - Posts by Squash Monster


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.022 seconds; used 445.16 kB (max 577.02 kB)