none
Small Basic 2D Tile Engine RRS feed

  • General discussion

  • Currently incomplete - but thought I would show work in progress

    Import Code GTP647

    View online here

    The Silverlight version is a little funky during/just after loading graphics and levels (the screen redraw takes a few seconds to sort itself out) but otherwise works fine.

    Loads tiles from the Internet by default - to run locally:

    1. Save the code locally
    2. Download the tiles
    3. Unzip the tiles to the same folder as the code is saved in
    4. Uncomment the 2nd of these two lines:
    resourceMode = "online"
    'resourceMode = "local"

    This is my 1st Small Basic program, you can see an earlier version in this thread



    • Edited by Nik Coughlin Thursday, October 25, 2012 7:31 AM typo
    • Changed type Nik Coughlin Thursday, October 25, 2012 8:47 PM Error
    Thursday, October 25, 2012 7:30 AM

All replies

  • Nice program, well structured and commented - well done.

    Do you have a question? if not please change the post type to discussion, thanks.

    Thursday, October 25, 2012 5:59 PM
    Moderator
  • No - sorry - not used to these forums. Fixed.
    Thursday, October 25, 2012 8:47 PM
  • Great game! Did you know that you can use Shapes object to reduce flickering down to zero? For example, you can use Image[location] = ImageList.LoadImage(path)to load that image into memory. You can then useGraphics[location] = Shapes.AddImage(Image[location]) to assign that image to an array. Next you can use Shapes.Move(Graphics[location],X,Y) to move that image to that place! There is also Shapes.HideShape(shapeName), Shapes.ShowShape(shapeName), and Shapes.Remove(shapeName) and plenty of others.

    I am a 10 year old that loves math, games, and computers. 'Binary is as easy as 1, 10, 11.'

    Thursday, October 25, 2012 10:04 PM
  • I was vaguely aware of that yeah - it just looked to be a bit of a headache figuring out how to swap out what I currently have to use Shapes instead - but I think what you've outlined above gives me plenty to go on, so I'll give it a shot now - thanks!
    Thursday, October 25, 2012 10:32 PM
  • Hmmm... to be honest due to the large number of tiles that need to be moved/hidden/shown on each turn I don't know that it makes much difference:

    KFL651

    You can switch between retained (Shapes.Add) and immediate (GraphicsWindow.Draw) modes by changing these lines:

    'drawMode = "immediate"
    drawMode = "retained"

    I can see the value of using Shapes but I think in this case it complicates the code without really improving it much

    Or maybe I've missed something?



    Friday, October 26, 2012 3:34 AM
  • Nik, this is amazing. I have been playing with the 50 line version you posted and I'm blown away with the 8 bit version you have going here. Not only does this show a lot of creativity, the code you have written is very tight and easy to read.

    Well done.

    Friday, October 26, 2012 1:47 PM
    Answerer
  • Thanks Coding Cat!

    New version:

    FZG754

    Same method to play locally as listed above.


    Monday, October 29, 2012 5:24 AM
  • OK - this is probably the final version in terms of gameplay - I may add sounds/music/proper titlescreen/highscore table if I get a chance but it is otherwise complete.

    CXP221

    Best played locally with the tileset (as per instructions above) - they take a long time to load over the Internet

    As usual the Silverlight version is funky.

    Tuesday, October 30, 2012 7:25 AM