×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    11

    Lightbulb Pseudocode for J2ME game components

    I am writing a documentation for a J2ME game project and I am in need to some pseudocodes to explain the J2ME game components. So could anyone please help me with pseudocode for game canvas, collision detection and other game components of J2ME? I would appreciate it very much.
    Thank you

  2. #2
    Super Contributor
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,697

    Re: Pseudocode for J2ME game components

    hi,

    according to common definition its just plain code but without maintaining java language specification in details:
    Code:
    get graphics context
    move sprite to new direction
    draw sprite using graphics context
    Code:
    Grahpics g = getGraphics();
    mySprite.move(newX, newY);
    mySprite.paint(g);
    http://en.wikipedia.org/wiki/Pseudocode

    if you are using decent IDE (like NetBeans+MobilitPack) you can fill JavaDoc comments/tags for documentation just like in real midp docs:
    Sprite.collidesWith(....)

    regards,
    Peter

  3. #3
    Registered User
    Join Date
    Sep 2006
    Posts
    11

    Re: Pseudocode for J2ME game components

    Hi Peter;

    Thank you so much for your reply. It would be even better if you could put it in a layman term (pretty much like English language) for gamecanvas, sprites, tiled layer, collison detection etc.

    I checked in wikipedia, and one of the examples they have given is:

    if credit card number is valid
    execute transaction based on number and order
    else
    show a generic failure message
    end if

    Is it possible to express the game components in J2ME in a similar manner? My lecturer wants me to put it this way to show my understanding of the components but I am really stuck.

    Could you please help me out?

    Thank you so much once again.

    Kiran

  4. #4
    Super Contributor
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,697

    Re: Pseudocode for J2ME game components

    hi,

    you know that api encapsulates what is exacty under-the-hood in canvas/gamecanvas/titedlayer/sprite from us, so I'm not sure how I would describe what is done within a method like collision check or move method, etc, they are exposed methods for use in implementation/inharitance,
    for me it would be more natural to provide pseudocode for details of implementation of such api, that is like I posted: part of game code which uses Sprite/Grahpics object in implementation I think,
    regards,
    Peter

Similar Threads

  1. Question. Free memory in Game Loop(J2ME)
    By videador in forum Mobile Java General
    Replies: 5
    Last Post: 2009-08-24, 06:05
  2. Game directly to Game Folder
    By JPurd in forum Mobile Java General
    Replies: 4
    Last Post: 2008-04-15, 20:34
  3. Great game Wappo
    By geonofear in forum News and Announcements
    Replies: 2
    Last Post: 2007-01-03, 12:00
  4. Game Icon (Solution urgently required)
    By siddharth23 in forum Mobile Java General
    Replies: 5
    Last Post: 2004-01-13, 19:15
  5. Avail Economical & quality game development service
    By pramod_kaushik in forum Mobile Java General
    Replies: 1
    Last Post: 2003-08-18, 15:40

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×