×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    May 2008
    Posts
    4

    Netbeans visual game designer, using a sprite twice?

    Hi first post and all that :P

    I am making a game using J2ME for a University Project to run on phones and was using the Visual Game Designer in Netbeans to deal with sprites and initial positions (it all seemed so easy!)

    However, I need to use a number of sprites more than once in a scene in my game. It looks like it isn't possible to do this with the Visual Game Designer within Netbeans? Would I be correct in thinking this? Or is there a way around this 'issue'?

    I know I can deal with this by using a Vector of Sprites, and positioning them manually; however, I really wanted to use the Visual Game Designer. Even if the solution is rather laborious/difficult, I'd like to know, as limitations like this are quite handy to know for when I write up my report.

    Just in case, I am well acquainted with J2SE, but this is my first real venture into J2ME.

    Thanks for any help!

  2. #2
    Nokia Developer Expert
    Join Date
    May 2007
    Location
    Mexico D.F
    Posts
    351

    Re: Netbeans visual game designer, using a sprite twice?

    Hello...

    Could you please clarify more this:

    I need to use a number of sprites more than once in a scene in my game.


    : Ruben

  3. #3
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: Netbeans visual game designer, using a sprite twice?

    Hi gaq,

    when you create a Sprite within NetBeans Game Builder, what you do is creating a single Sprite instance (as you can easily check by looking at the generated code). So, since it's an instance, you cannot reuse it more than once within the same Scene.

    Pit

  4. #4
    Registered User
    Join Date
    May 2008
    Posts
    4

    Re: Netbeans visual game designer, using a sprite twice?

    Thanks jappit,

    That verifies what I thought. That makes the visual designer rather limited...

    Rdrincon, if I was making an Arkanoids clone and say I created a Sprite using the designer called redBrick. I can only use redBrick once; however, I would need to use a number of redBricks to create a level. This is easy to do manually with an array or vector; but not possible with the visual designer!

  5. #5
    Registered User
    Join Date
    Aug 2008
    Posts
    1

    Re: Netbeans visual game designer, using a sprite twice?

    Why do you need to represent each brick as a single sprite? I suggest you use a TiledLayer for that. If, for example, you would like to change the brick appearance after they are hit, use different Tiled layers. Each element of subsequent TiledLayer should become visible by using setCell(x,y,arg) with arg = 0 on top most visible one.

    Regards!

  6. #6
    Regular Contributor
    Join Date
    Aug 2008
    Location
    Bournemouth, UK
    Posts
    65

    Re: Netbeans visual game designer, using a sprite twice?

    hey, does anybody know of any guides on the vgd? i've done a bit of google-ing but nothigns come up really except for extending the demo app already supplied by netbeans....

Similar Threads

  1. Replies: 16
    Last Post: 2008-01-11, 09:03
  2. Carbide.c++ UI Designer vs Game API
    By arachidyl in forum Symbian User Interface
    Replies: 4
    Last Post: 2006-10-25, 10:10
  3. modifying code generated through UI Designer of Visual Midlet in NetBeans
    By biju gopinathan in forum Mobile Java General
    Replies: 1
    Last Post: 2006-03-27, 18:08
  4. My Questions are not getting answered
    By earamsey in forum Symbian
    Replies: 1
    Last Post: 2003-06-04, 17:26
  5. Severe RResourceFile Error, HELP!
    By earamsey in forum Symbian
    Replies: 0
    Last Post: 2003-06-02, 19:34

Posting Permissions

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