J2ME game programming

Helo everyone,
I am working in j2me game programming plz if
any one know how make image as small as possible
in our game program.?
I am using *.png format of image which is working well
in game but my game size is very big so plz help me to get
out of this problem
Thank u
Aman Gautam

hi,
if you want to do any kind of game programming in J2ME, i suppose you would require to use the Canvas class, well there are a few good resources.. try out
www.billday.com
www.javamobiles.com..
that ought to get u started.
cheerz
ynkrish

Similar Messages

  • J2Me game programming plz help

    Helo everyone,
    I am working in j2me game programming plz if
    any one know how make image as small as possible
    in our game program.?
    I am using *.png format of image which is working well
    in game but my game size is very big so plz help me to get
    out of this problem
    Thank u
    Aman Gautam

    I solved the same problem by using indexed color images instead of true color.
    So, for example, if you have a colorful background you can convert it to a 256 color image.
    Depending on your specific image and the devices you'll see it on you may or may not notice the difference, but the file size is generally smaller.
    Then you can push further for smaller elements, like, say, a moving object like a pointer or a starship, you can reduce it to 60 or 30 colors, or even less.
    Another technique is to use tiles to build up the background instead of big images. With MIDP2.0 there's the TiledLayer, but you can implement the same with some code also on MIDP1.0 if backward compatibility is of concern.

  • New site about J2ME game programming and optimization

    Hello!
    I just wanted to tell you about a new J2ME development site
    SupremeJ2ME found at
    http://supremej2me.bambalam.se
    It has a lot of useful guides and tips about mobile J2ME game development and optimization, a forum and information about the best J2ME tools.
    Check it out!
    cheers,
    Cranky

    J2ME Polish have licensing costs associated with it:
    http://www.j2mepolish.org/licenses.html
    As for Canvas VS GameCanvas:
    GameCanvas is MIDP 2.0 and up, so depending which devices your app supports you might want to stick with Canvas. GameCanvas eases graphics flushing, but double buffering can be implemented on Canvas like so:
    Image offscreen = isDoubleBuffered () ? null :
               Image.createImage (getWidth (), getHeight ());See http://www.developer.com/java/j2me/article.php/10934_1561591_8
    section: Avoiding Flickering

  • J2ME game project advice

    Hey guys, i was hoping to get some advice on a project i am about to start. basically I have just started learning J2ME, using Netbeans. i have went through few tutorials from Hello World to Pong and completed them working fully. Now my project is something not too difficult I hope what i wanted to do was create a dungeons and dragons type game.
    Basically I see my game as a start screen, the user presses start and then the player enters a castle and then there are either 1-4 doors available to walk into one on each side of the screen, the bottom door will always be to take the player to the previous screen.
    I have just started the project, but before I even enter any code i was hoping I could get some advice form you guys first. IN each room I hope to have things for teh player to interact with, wether it is a treasure chest, dragon, another human or traps, I have not decided yet.
    I was thinking of having a class one for each screen, but many screens means many classes. I am not even sure how to start with the titlescreen as i am completely new to J2ME.
    any help would greatly appreciated!
    Thanks!

    I was thinking of having a class one for each screen, but many screens means many classes. I am not even sure how to start with the titlescreen as i am completely new to J2ME.No, that is not what you want. Like you should always do in programming, do-not-start-with-the-code. Very bad practice!
    Start with a piece of paper and draw some simple screen designs. Menu, in game screen, control widgets, etc. Get something visual going quickly.
    Next, Use some proper non-programming related terms to describe the game and stick to them. You do not have screens, you have rooms. Each room has doors in its walls which leads to another room. All the rooms together form a maze. Each room has different properties. It can have 1-4 doors, it might hold an item, a trap, an enemy, etc.
    Given from the short description I have given you, you should already be able to distill a simple design. You can already easily identify two main classes: Maze and Room. A Maze consists of rooms. Each room links to 1-4 other rooms through a door. Each room has zero or more elements in it which are different from room to room. You will want to be able to control per room what it contains. I smell a simple grid based data structure; but then you still need a way to actually create the data for the game. There are two basic options: create a level editor, or auto-generate the mazes based on some simple rules. The latter would be the best choice in this case, as you get endless levels. The former has the benefit of having precise control over the design and difficultly of a maze.
    Auto generated levels become more difficult when you want to add an option to save progress though, as you'd need to be able to not only recreate the level (hint: generate based on a seed) but also restore the progress that the player made in that level. Its up to you really.
    When you have your game fleshed out, its time to start taking the technology into account. You'll have a nice set of functional and technical requirements that you need to fulfill; a good resource on J2ME game programming will probably help you to fulfill most of them. Don't expect to just be able to do this, you'll need to study J2ME a lot and probably do a whole set of test and play programs before to figure out how to do even the simplest things. I recommend you get a good book in stead of trying to piece it together using the internet, in moments like this you need something coherent in stead of something as fragmented as the web.

  • Game programming

    I am new to game programming and J2ME. how can i integrate animated clips and application using J2ME>

    Well thats kinda general... In my opinion java is a great language. Just not for games usually. Also what kind of game? 2d or 3d? I would recommend checking out unity for 3D games. I have used it and it is a great tool for people looking to make 3D games without as much work. Plus it supports execution in a browser like an applet kindof. For 2D i usually use flash as it greatly simplifies the process. If your hearts set on Java start off with this- http://www.tutorialized.com/view/tutorial/2D-Java-Platform-Game/10145

  • I recently downloaded a 10.6.8 update and a game program has now been reduced in size.  It's specifications are set for full screen, but it is about 1/4 of the size.  Any ideas how to fix?

    I recently downloaded a 10.6.8 update and a game program has now been reduced in size.  It's specifications are set for full screen, but it is about 1/4 of the size.  Any ideas how to fix?

    Hi, I have got the same problem but all is 1/4 the size have you fixed it?

  • NEED COE OF SENDING J2ME GAME ON WTK 1.4

    i need and sample code or help to send the J2ME game form JSP using
    Tom Cat 4.1 to WTK (Wire less toolkit)1.4
    and also need the help to Conect the WTK with the Http Server

    i need and sample code or help to send the J2ME game
    form JSP using
    Tom Cat 4.1 to WTK (Wire less toolkit)1.4
    and also need the help to Conect the WTK with the Http
    Server i guess ur confused, better ask for some simple j2me code, that u will be able to run on wtk...

  • J2ME game timer

    Hi,
    I am developing a J2ME game. At the moment i have code which will terminate the game if the game is reaches the time set.
    Now i want to be able to display the count down on the actual game. I want to display it anywhere on the screen but im not sure what i really need to implement to physically the actual counter.
    Can anybody help.
    Thanks

    Problem solved. :)
    Comments are welcome. :)
        public void run()
            int millis_per_tick = 100;
            int counter = 1000/millis_per_tick;
            timeLeftInMillis = 180000;
            Thread currentThread = Thread.currentThread();
            try
                // This ends when myThread is set to null, or when
                // it is subsequently set to a new thread; either way, the
                // current thread should terminate.
                while (currentThread == myThread)
                    long startTime = System.currentTimeMillis();
                    repaint(0, 0, screenWidth, screenHeight);
                    serviceRepaints();
                    long timeTaken = System.currentTimeMillis() - startTime;
                    if (timeTaken < millis_per_tick)
                        synchronized (this)
                            wait(millis_per_tick - timeTaken);
                    if (counter == 0) {
                        timeLeftInMillis = timeLeftInMillis - 1000;
                        counter = 1000/millis_per_tick;
                    else
                        counter--;
                    if (timeLeftInMillis<0) {
                        synchronized(this){
                            isGameOver = true;
            catch (InterruptedException e)
        }

  • Applet Game Programming - player movement

    HI Java Experts,
    I have a very simple question applet game programming - jdk 1.02.
    Let's say you have a player on the applet window. He can move right and left.
    Naturally you have an image representing the player. When the player moves left you present an image loop with him running left. And vice versa for running right.
    Of course when he stops moving you just want to show a still image.
    What do you guys feel is the best technique for that situation ?
    Stephen

    Hi Thanks for the advice.
    I'm under the impression that if I used jdk1.4
    everybody who wanted to play the game would have to go
    through the trouble of downloading something . If
    that is so, then i would like to stick with 1.02 to
    have the widest possible audience.Use Java Web Start to deploy it as an application instead of an Applet. If your program is really cool, people will download the JDK 1.4 to use it. Then we will have more java users in the world :)
    By the way i have a URL perhaps someone could look > at the source code and give additional suggestions
    you can make sonic the hedge hog run and jump
    http://www.swebdev.com/Adventure.html
    That code has some good points. I like the nice object oriented flow of it. However, the way he sets up the Thread is all wrong. He uses yield and sleep, you would want to set up this using wait() and notifyAll() calls if you want to make it more interesting.
    Right now i'm trying to address the issue of how to
    reverse the image for when the player is running the
    opposite way -- ? perhaps a separate thread in 1.02
    might be an answer? I would be glad to hear all kinds
    of suggestions on the sample code seen thereYou shouldn't need a separate thread just to reverse the image. If your little guy is already in his own thread, just switch the image that is displayed when the player hits the opposite direction key.
    Think of threads like puppets, and you are the puppet master. Your little guys is a puppet, so he should be in his own thread. You can make him do whatever you want from your thread (the master) by pulling strings (changing globals, and message passing)
    Wow... Thats a really good analogy... I just thought that up :)

  • Timer for game program.

    Hello all,
    I am making a game program and I need a way to implement a timer so that it the game will end if the time expires.
    Is there any easy function to help me with this task?

    Thanks for the reply and I just found that class.
    Thanks

  • J2ME game gui? J2ME Canvas? J2ME polish? Which is better?

    I am currently trying to build a J2ME brochure like project which is required to have rich presentation.
    JAVA is not a problem for me as I've used it for quite a long time. But since I am very new in J2ME, I am confused which technology to use, should I use j2me game gui, j2me canvas or j2me polish?
    Using j2me game gui looks good. J2me canvas looks a bit tedious to me because for a brochure like project, it will mean I will probably end up using a lot of canvas which make the application quite big. Regarding to J2ME polish, there is not many materials or examples about it. it seems that J2ME polish hasn't been used a lot and I don't know whether it's good or not.
    Anybody knows something about those three? Please give me a hand.
    Thanks.

    J2ME Polish have licensing costs associated with it:
    http://www.j2mepolish.org/licenses.html
    As for Canvas VS GameCanvas:
    GameCanvas is MIDP 2.0 and up, so depending which devices your app supports you might want to stick with Canvas. GameCanvas eases graphics flushing, but double buffering can be implemented on Canvas like so:
    Image offscreen = isDoubleBuffered () ? null :
               Image.createImage (getWidth (), getHeight ());See http://www.developer.com/java/j2me/article.php/10934_1561591_8
    section: Avoiding Flickering

  • J2ME Game

    Hi all, i am making a J2ME game for my mobile(Nokia 7210). But i meet a problem that my mobile is just support MIDP1.0 that is no media api. I know sun provided Mobile Media API, can i use it? But the VM in the mobile do not have the classes, how can it run? Or can i attach the media api classes with my MIDLet game and run directly? If yes, how can i attach it?
    Please help me. Thanks a lot.

    And I forgot to mention, those classes (and a bunch of other Nokia extension classes) can be found on any of the Nokia SDKs on their site. And you're in luck because there's one specially made for the 7210.
    shmoove

  • I want to learn 2D game programming. But, I am confused!

    I want to make a 2D game in C#. I have begun learning C# on my own. But, I am confused sbout what to learn after c# to make a game. I hear many things like XNA, MDX, Monogame, SlimDX, SharpDX, Frameworks, game engines, IDE's etc. To me all of this has
    caused a great confusion. The C# game tutorial I am learning is based on MDX (Managed DirectX). Now, I realise that MDX and XNA is dead. I am confused if I want to change my tutorial itself. Can anyone clear things out for me and tell what i need to learn
    step by step?
    I really don't even know what all the sh*t (.NET ,XNA, Monogame, SharpDX, xxx, xxxx, xxxx etc.) really is or what it does or which is better or even what the differences are. So please explain everything to me. Please help!

    Hi,
    You can refer to the Books:
    Beginning .NET Game Programming
    Beginning C# Game Programming
    Few other useful links:
    Coding 4 Fun is a great .NET resource that has quite a few user-created games. They also have a
    book and a
    2-D game primer
    Tutorial Listing at C# corner
    C# Game Tutorial for Beginners (video)
    Link to more game programming e-books
    Advanced Topics
    The Farseer Physics Engine on Codeplex would be a good next step once you get comfortable with programming games.
    Please mark as answer or vote as helpful if my reply does

  • About game programming.. please....help

    How to define game map for java midlet
         If I see the rpg game, it have default map. I want to know how to translate it to code
         in midlet? The map will be existed image or dynamicly generated?
         Like Prince of Persia Midlet version, I wonder how to generate the environment?
         Is it pixel generated or immutable image?
    detect collision
         SO if the map is image and the sprite game is draw over the map, how can we detect the
         collision?
         Please hellp me.... because I want to be game programmer for midlet but I
         didn't know about game programming before

    to write a small game in midl is already a hard work. to make a big one, take a look of a team of programers.
    about maping, there is no such thing. wire every thing by yourself. by books or read tutorials.
    as i already said. no easy task.
    but keep on trying. if you need some help write me a mail.
    [email protected]
    jeliel
    (sebastian)

  • Mobile Game Programming

    Hey All,
    I am a decent Java programmer but in last few days I found Java Game Programming intresting and has strong future for ones career.
    I wanted to know what do Expert over here have to say about this ?
    and
    Where do I need to start In order to get to know about it ?(I mean under Java).
    Thanx
    Messy

    I suggest you move to this forum and ask your question again.
    http://forum.java.sun.com/category.jspa?categoryID=23

Maybe you are looking for

  • Passive graphics card for 2-monitor setup

    I am looking for a graphics card for use with 2 monitors in a dual monitor configuration that has: Passive cooling 1 x DVI port 1 x DisplayPort I'm aware that CS6 can  make use of some of the more advanced graphics card features, such as Open CL, but

  • Why won't AIM download correctly?

    So when i try to download AIM on my macbook for some reason when i double click to unzip the file it says "unable to archive aim.bin into downloads error 45 operation not supported" how do i get aim on my computer? will it even work? or do i have to

  • How important is GPU acceleration in FCPX/Motion 5?

    So I've been using FCPX and Motion5 on an old mac (mid-2010 iMac, i3 dual core) at work (self taught - 3-6 minute promos and tutorial vids for our web services, not remaking Blue Planet or anything!), and as an Apple Convert I want to replace my home

  • Aperture and iPhoto workflow?

    The problem: I'm not happy with quality of previews used by aperture to display slideshows. Even at maximum resolution and quality setting they are too soft to my taste. The same photos exported as jpgs out of aperture are sharp. I guess there must b

  • Adobe Premiere Elements 8.0 - programme closes everytime I open my project within 5 seconds - HELP

    Please can somebody help with the above. The programme closes with no error message or anything, every time I open the project I am working on. Thanks