472,125 Members | 1,569 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,125 software developers and data experts.

[J2ME]Development the GAME ARCOIDE

132 100+
HELLO,

am developpement the mini game of arcoide on j2ME but i don't know any web site talk about the programming the game on the J2ME please if u know some url of the web talk about the begining developpement the game of the type arcoide tell me

Thanks
Sep 26 '09 #1
17 4262
RedSon
5,000 Expert 4TB
Did you google "java game development"?

If not you should start there.
Sep 28 '09 #2
manjava
132 100+
thnaks if u know some link about the game call Arcade such as this picture in joint please help me
Attached Images
File Type: jpg imageBall.jpg (5.6 KB, 234 views)
Oct 13 '09 #3
RedSon
5,000 Expert 4TB
We will program an applet in which a ball is moving from the left to the right hand side. I know this is nothing BIG but if you want to learn how to program games it is maybe the most important thing to understand how to animate objects!

At the beginning we have to write our basic structure of an applet again but we will add two little things. Our applet has to implement the interface Runnable and the corrosponding method run() to animate a object. The structure of the applet should look like this:
Expand|Select|Wrap|Line Numbers
  1. import java.applet.*; 
  2. import java.awt.*; 
  3.  
  4. public class BallApplet extends Applet implements Runnable 
  5. public void init() { } 
  6.  
  7. public void start() { } 
  8.  
  9. public void stop() { } 
  10.  
  11. public void destroy() { } 
  12.  
  13. public void run () { } 
  14.  
  15. public void paint (Graphics g) { } 
  16.  
  17.  
More information here: http://www.javacooperation.gmxhome.d...wegungEng.html

Original: http://forums.techarena.in/software-...nt/1252647.htm
Oct 13 '09 #4
manjava
132 100+
Please i want exemple some the picture please help
Oct 13 '09 #5
RedSon
5,000 Expert 4TB
You are not going to find an example. You need to learn the basics.

Try the following link and do a bit of exploring. If you have specific problems that you need help with respond. Otherwise to don't bother posting another remark asking for generalized help. There are other forums for generalized help.

http://www.google.com/search?hl=en&s...=f&oq=&aqi=g10
Oct 14 '09 #6
manjava
132 100+
hello ,

i want to move the racket of the top to the right some
Attached Images
File Type: jpg CopieEcran1.jpg (17.8 KB, 206 views)
Oct 15 '09 #7
RedSon
5,000 Expert 4TB
That's a racket? It looks like a piece of lawn. Are you trying to bounce steel ball bearings off of grass? I don't think a ball bearing would bounce off of sod like that.
Oct 15 '09 #8
manjava
132 100+
please help me i am very nerve with this
Oct 15 '09 #9
RedSon
5,000 Expert 4TB
No, you are not asking for help, you are asking for a whole solution. What you want is someone to do the work for you so you can copy it to whatever application you are working on. When you say "I need an example" what you are really saying is "please someone write the code in a way that I direct you to do it so that I can then use that code in my project and take all the credit".

If you really want some help, copy your source code to the forum and highlight where the errors are occurring. Explain what you want it to do, explain what you *see* it doing.
Oct 16 '09 #10
manjava
132 100+
thank you, juste i want to resolve with me this probleme i have a project that some of the game arcade but i want to work the game with two bouton not with 4 bouton
see my code :
Expand|Select|Wrap|Line Numbers
  1. protected void keyReleased(int keyCode)
  2.     {
  3.         int actionKey = getGameAction(keyCode);
  4.         if(actionKey == 5)
  5.         {
  6.             j2mill_wall _tmp = wall;
  7.             wall.setDir(1);
  8.         }
  9.         if(actionKey == 2)
  10.         {
  11.             j2mill_wall _tmp1 = wall;
  12.             wall.setDir(2);
  13.         }
  14.         if(actionKey == 6)
  15.         {
  16.             j2mill_wall _tmp2 = wall;
  17.             wall.setDir(4);
  18.         }
  19.         if(actionKey == 1)
  20.         {
  21.             j2mill_wall _tmp3 = wall;
  22.             wall.setDir(8);
  23.         }
  24.    }
  25. }
  26.  
and the class of direction
Expand|Select|Wrap|Line Numbers
  1. public class j2mill_wall
  2. {
  3.  
  4.     private int dir;
  5.     public static final int DIR_NULL = 0;
  6.     public static final int DIR_RIGHT = 1;
  7.     public static final int DIR_LEFT = 2;
  8.     public static final int DIR_DOWN = 4;
  9.     public static final int DIR_UP = 8;
  10.  
  11.     public j2mill_wall()
  12.     {
  13.         dir = 0;
  14.     }
  15.  
  16.     public void setDir(int direction)
  17.     {
  18.         dir ^= direction;
  19.     }
  20.  
  21.     public void clearDir()
  22.     {
  23.         dir = 0;
  24.     }
  25.  
  26.     public boolean getDir(int direction)
  27.     {
  28.         int otherdir = 0;
  29.         if(direction == 1)
  30.         {
  31.             otherdir = 2;
  32.         }
  33.         if(direction == 2)
  34.         {
  35.             otherdir = 1;
  36.         }
  37.         if(direction == 8)
  38.         {
  39.             otherdir = 4;
  40.         }
  41.         if(direction == 4)
  42.         {
  43.             otherdir = 8;
  44.         }
  45.         return (dir & (direction | otherdir)) == direction;
  46.     }
  47. }
thank you redson
Oct 20 '09 #11
RedSon
5,000 Expert 4TB
If you only want two buttons then combine your if statements in keyReleased(). Then you can do something like:
Expand|Select|Wrap|Line Numbers
  1. if (actionkey is 2 || actionkey is 5)
  2. {
  3.   if wall.getDir is 1
  4.       wall.setDir(2)
  5.   if wall.getDir is 2
  6.       wall.setDir(1)
  7. }
  8.  
You are just flipping between states that is all. Maybe some java guys can give you the correct code.
Oct 20 '09 #12
manjava
132 100+
thank you but i don't resolve my probleme i change the keypressed but the game not work good and i return on neatbeans erreur :Uncaught exception: java.lang.NullPointerException: 0
at j2mill.j2mill_canvas.logic(j2mill_canvas.java:285)
at j2mill.j2mill_canvas.run(j2mill_canvas.java:147)
at java.lang.Thread.run(), bci=11

and my code
Expand|Select|Wrap|Line Numbers
  1. protected void keyPressed(int keyCode)
  2.     {
  3.         int actionKey = getGameAction(keyCode);
  4.         if(actionKey == 5 || actionKey == 2)
  5.         {
  6.            if (wall.getDir(1));
  7.            wall.setDir(2);
  8.  
  9.            if (wall.getDir(2));
  10.            wall.setDir(1);
  11.         }
  12.  
  13.         if(waittime == 0)
  14.         {
  15.             waiting = false;
  16.         }
  17.     }
  18.  
  19.  
  20. protected void keyReleased(int keyCode)
  21.     {
  22.         int actionKey = getGameAction(keyCode);
  23.         if(actionKey == 5)
  24.         {
  25.             j2mill_wall _tmp = wall;
  26.             wall.setDir(1);
  27.         }
  28.         if(actionKey == 2)
  29.         {
  30.             j2mill_wall _tmp1 = wall;
  31.             wall.setDir(2);
  32.         }
  33.         if(actionKey == 6)
  34.         {
  35.             j2mill_wall _tmp2 = wall;
  36.             wall.setDir(4);
  37.         }
  38.         if(actionKey == 1)
  39.         {
  40.             j2mill_wall _tmp3 = wall;
  41.             wall.setDir(8);
  42.         }
  43.    }
  44.  
thanks
Oct 23 '09 #13
RedSon
5,000 Expert 4TB
When is keypressed and keyreleased called? Your keyreleased call is clobbering the data you handled on keypressed. Do you use a debugger? If not you need to start because that will help you with a null pointer exception.
Oct 25 '09 #14
manjava
132 100+
hello am lost mauch the time on this please if you can help me tell me how can resolve my probleme am debbugin and he done this message
Probleme with bar1
[WARN] [rms ] javacall_file_open: _wopen failed for: C:\Users\kamar\javame-sdk\3.0\work\0\appdb\00000002icons#16#bar2_6PNG.tm p

Probleme with bar1
[WARN] [rms ] javacall_file_open: _wopen failed for: C:\Users\kamar\javame-sdk\3.0\work\0\appdb\00000002icons2#16#bar11_6PNG. tmp

Probleme with bar11
[WARN] [rms ] javacall_file_open: _wopen failed for: C:\Users\kamar\javame-sdk\3.0\work\0\appdb\00000002icons2#16#bar22_6PNG. tmp

Probleme with bar22
thank you
Oct 26 '09 #15
RedSon
5,000 Expert 4TB
I'm not trying to be rude or anything, I'm asking an honest question, because I can tell by your posts that your English skills are not very good. With these warning messages can you read them and understand them?

The warning messages are pretty clear to me, but that is because I am a native English speaker.

The warning is telling you that it cannot find the png file that you included in your project. You need to make sure your call to _wopen has the correct path for the file.

If you are having trouble with the messages that javac is telling you about, you might want to see if there is some kind of translation software to use, or see if javac will output it's messages in French or Tagalog or whatever.
Oct 26 '09 #16
manjava
132 100+
hello ,

can you give for you my project and reslove me juste le probleme the two bouton

that's my probleme so

yes or no

thanks
Oct 26 '09 #17
manjava
132 100+
please any one can help me
Nov 1 '09 #18

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Samar Hossam | last post: by
reply views Thread by Timinator | last post: by
1 post views Thread by Tomislav | last post: by
reply views Thread by dchoubey | last post: by
1 post views Thread by Choubey | last post: by
21 posts views Thread by Nik Coughlin | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.