If anyone has any tips on upgrading this game, feel free to post them.
Date: 07 Nov 2008 21:45
Number of posts: 12
RSS: New posts
I'm trying not to use xLib
that saddens me.
Oh well, your choice
I don't know how to use xLib…
personally, I don't believe in using xlib, but its fine with me if you do.
Comments: This is a great game. It uses very little space for a minesweeper game and is very efficient. I have three recommendations though.
First, read through your entire code again, looking for parenthesis that are unnecessary.
Second, look at equations. If you can expand a polynomial, its usually smaller and faster (as in 4(E+V) is a byte smaller as 4E+4V). Its also better to put If not(B instead of If B=0, as it saves a byte.
Third, rearrange equations so that you can cut off more parenthesis (for example (a+b)=1 can be shortened to 1=(a+b through some optimization).
Awesome game functionally though!!!
You're right, I can optimize a few things…
Just from a quick glance, I was able to save 18 bytes, and there is a part that I plan on using lines instead of pixels. I bet that would save a lot of room.
Uploaded new version. Nothing too exciting, just optimization and a bug with the custom game was fixed.
If you find a way to write it outside of the graphing canvas (the screen where you would perform operation) I think you would save alot of memory. You would be limited in the dimensions but you would also have a simpler (faster) program.
It looks great and it loads relatively fast, but I'm kinda bummed on how slow loading seems to be when playing multiple games in a row. Have you thought about using the randBin command to create your fields? Run randBin(1,.25,128 to create a 128 element list of 0's and 1's with a probability of a number being a one 25%. I think you could probably speed up loading this way.
Does this game include a flood-fill algorithm? Like when you click a clear space, does it clear the area that has no bombs?