Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Memory Analyzer » Sorry, Extreme Beginner here(Please if you are seeing this, try to help. I'm very very new.)
Sorry, Extreme Beginner here [message #1002636] Sat, 19 January 2013 01:29
Chris L is currently offline Chris L
Messages: 1
Registered: January 2013
Junior Member
Okay, sorry if this is the wrong section, I don't know too too much about coding, but I've started to make a game. Its fairly simple. But I have a couple of problems. 1.) i am trying to make a randomly generated 2D terrain, I have 3 PNG's ready: Stone, Dirt and an ore (which i am trying to get to randomize and become rare), each is 32 X 32 pixels. I heard a simple algorithm would work, but i have no knowledge on how to do so. 2.) I am trying to make my character move, here's my code:
public void keyPressed(KeyEvent e){
	int key = e.getKeyCode();
	
	if (key == KeyEvent.VK_LEFT);
	dx = -1;
	
	if (key == KeyEvent.VK_RIGHT);
	dx = 1;
}
public void keyReleased(KeyEvent e){
	int key = e.getKeyCode();
	
	if (key == KeyEvent.VK_LEFT);
	dx = 0;
	
	if (key == KeyEvent.VK_RIGHT);
	dx = 0;
}
}


3.) I am trying to make health bar, and creatures that will hit the main character and make he/she lose some health, varying on the creature and such.

Again, Apologies for putting in the wrong section, Im new to the forums, I know very little C++, i just use tuts online, so if you could explain to me waht to do that'd be great (to avoid future accidents). Thanks Again! -Chris
Previous Topic:Limited formats - hprof vs phd
Next Topic:Live objects in MAT histogram?
Goto Forum:
  


Current Time: Thu Oct 23 04:38:29 GMT 2014

Powered by FUDForum. Page generated in 0.01551 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software