Thursday, October 25, 2012 7:30 AM
Currently incomplete - but thought I would show work in progress
Import Code GTP647
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:
- Save the code locally
- Download the tiles
- Unzip the tiles to the same folder as the code is saved in
- 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
Thursday, October 25, 2012 5:59 PMModerator
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 8:47 PMNo - sorry - not used to these forums. Fixed.
Thursday, October 25, 2012 10:04 PMGreat 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:32 PMI 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!
Friday, October 26, 2012 3:34 AM
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:
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 1:47 PM
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.
Monday, October 29, 2012 5:24 AM
Thanks Coding Cat!
Same method to play locally as listed above.
Tuesday, October 30, 2012 7:25 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.
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.