• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

107 Neutral

About harminal

  • Rank
  1. Hi all Im about to make a game for iOS using adobe flash cs 5.5 i know it has terrible performance for iOS, but i just need to make about $3000 for my apple(so i can code something with moar beef).. Can you please warn me about the possible traps that can be sprung?
  2. Thanks guys! I made some changes can you rerate please? http://www.kongregate.com/games/hardman/letter-dash?acomplete=letter+dash
  3. [quote name='__sprite' timestamp='1313149903' post='4848180'] A few issues I had: On my third time through, it seemed to get stuck, and I just didn't ever get game over, even though there were loads of letters, and I was missing >90% of them each time. The key detection is a bit weird. If I type consecutive letters too fast, it doesn't seem to recognise that I've pressed all the keys I have. [/quote] Oh i just picked that up thanks :/ How about the design/layout/ actual gameplay?
  4. Java Desktop application-How to repaint my sprite

    it is painting.however when it moves around the previous image stays on screen and so i get a build up of previous positions
  5. HI so im new to java and im developing a game Im making a desktop application with a ship being able to move around..also using netbeans ide..when the ship moves around it wont repaint properly.. i need help please!:D import java.awt.*; import javax.swing.*; import java.awt.event.*; import java.awt.image.*; import java.util.List; import java.util.Random; import java.util.ArrayList; import java.awt.Font; import java.applet.*; import java.awt.*; public class Invaders { ImagePanel shipPanel; ImagePanel skyPanel; ImagePanel bulletPanel; class Ship { public int x; public int y; } List<Ship> shipList = new ArrayList<Ship>(); int numberMax=10; MathsArcade.Area ourArea; int x1,x2,total; int score=0; int ammo=5; int xPos=200; String x3; public void main() { Image shipImage=Toolkit.getDefaultToolkit().getImage(getClass().getResource("ship.jpg")); Image skyImage =Toolkit.getDefaultToolkit().getImage(getClass().getResource("sky.jpg")); skyPanel=new ImagePanel(skyImage,0,0,500,500); shipPanel=new ImagePanel(shipImage,0,0,100,100); JFrame frame=new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().add(shipPanel); frame.getContentPane().add(skyPanel); for(int x=0;x<10;x++) { for(int y=0;y<5;y++) { Ship i=shipList.get(x+y*10); ImagePanel temp=new ImagePanel(shipImage,i.x,i.y,20,20); frame.getContentPane().add(temp); } } frame.setSize(500,500); frame.setVisible(true); frame.addKeyListener(new KeyListener() { public void keyPressed(KeyEvent e) { if(e.getKeyCode()==KeyEvent.VK_LEFT) { shipPanel.changeX(10); xPos=shipPanel.x; shipPanel.removeAll(); shipPanel=new ImagePanel(shipImage,0,0,100,100); } if(e.getKeyCode()==KeyEvent.VK_RIGHT) { shipPanel.changeX(-10); } if(e.getKeyCode()==KeyEvent.VK_DOWN) { shipPanel.changeY(10); } if(e.getKeyCode()==KeyEvent.VK_UP) { shipPanel.changeY(-10); } x3+=e.getKeyCode(); JOptionPane.showMessageDialog(null,x3); } public void keyReleased(KeyEvent e) { } public void keyTyped(KeyEvent e) { } }); } class ImagePanel extends JPanel { private Image img; private int width=100; private int height=100; public int x=0; private int y=0; public ImagePanel(Image img,int x, int y,int width,int height) { this.img = img; this.width=width; this.height=height; this.y=y; this.x=x; Dimension size = new Dimension(500, 500); setSize(size); setLayout(null); } public void changeX(int amount) { x+=amount; repaint(); this.validate(); }public void changeY(int amount) { y+=amount; repaint(); this.validate(); } public void paintComponent(Graphics g) { super.paintComponents(g); Graphics2D g2D = (Graphics2D)g; g2D.drawImage(img,x,y,width,height,this); } }
  6. Quote:Original post by SiCrane Quote:Original post by harminal Well i think this question is irrelevant all i want to know is why i cannot convert my integer to char>.> You think knowing which programming language a question concerns is irrelevant to answering the question? That just might be the stupidest thing I've ever heard here. Its irrelevant because i kept telling you its C++... And anyway the guy above me solved my answer! Thank you guy above me. No thanks to you sicrane....
  7. Well i think this question is irrelevant all i want to know is why i cannot convert my integer to char>.>
  8. I have written a small fragment and when it displays it keeps displaying the integer not the char value. Help pleeease:D int ascValue=wParam; char key=((char)ascValue); MsgBox(key.ToString());
  9. I am working on a project and i need the user to enter a username. However ive been looking for ages and i cannot find an answer how to get alphabetical input with win32/C++ Thanks!!!
  10. Im working with C++/Win32.. And I Need to whatever alphabetical number the user pressed shall come up. I don't want to use predefined keys as this would take to long. heres what the code might look like. Get keyboard state; Convert the state into a char; The first line is what i need help with,I just need it translated to C++! Thanks
  11. So simon in this line of my code sin.sin_addr.s_addr = inet_addr(""); would i change the ip to my external one?
  • Advertisement