Author Topic: Axe Minesweeper  (Read 47379 times)

0 Members and 3 Guests are viewing this topic.

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Axe Minesweeper
« Reply #270 on: January 24, 2011, 06:46:18 pm »
After learning lots about Axe and programming in general, I glanced over the source code for Minesweeper, and I was appalled by how inefficient and unnecessarily complicated it was in many places.  As a result, I've decided to attempt completely rewriting the program, and while I can't promise that I'll have time to finish this, I've decided to start.  So far, I've rewritten my menu system (although most of the graphics should be the same), finally created an algorithm that implements wrap-around (after promising this feature for practically forever :P), created a much more optimized stack-based algorithm for the expanding bubble thing, and shifted code around in general.

However, I have several questions:
I was considering adding an option that lets the user use nearly all of their RAM so that they can make massive levels if they want.  Should I do this, or just stick with using the amount of data in L1 instead?  If I do allow this to be a feature, should I leave it as a permanent feature, or should I let the user turn this option on or off?

Besides toggling question marks on and off, toggling wraparound, and toggling showing the positions of the mines when you die, should I add any more options?

What else should I add to make Minesweeper even better?
« Last Edit: January 24, 2011, 06:47:51 pm by Michael_Lee »
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Axe Minesweeper
« Reply #271 on: January 25, 2011, 02:00:49 am »
That reminds me when I glanced at Illusiat 12 code. I was shocked O.O Although I guess we all have to start somewhere :D

I hope you can finish this project, though. I was sad to see it never finished :(

You could add more options such as larger maps, but try to make sure it cannot cause Mem clears. Otherwise it might be best to stick to L1. Good luck!

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Axe Minesweeper
« Reply #272 on: January 28, 2011, 07:16:30 pm »
After learning lots about Axe and programming in general, I glanced over the source code for Minesweeper, and I was appalled by how inefficient and unnecessarily complicated it was in many places.  As a result, I've decided to attempt completely rewriting the program, and while I can't promise that I'll have time to finish this, I've decided to start.  So far, I've rewritten my menu system (although most of the graphics should be the same), finally created an algorithm that implements wrap-around (after promising this feature for practically forever :P), created a much more optimized stack-based algorithm for the expanding bubble thing, and shifted code around in general.

Same here with Simul and all that stuff :D Axe's just so fast that you don't notice if it's really, really unoptimized.




Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Axe Minesweeper
« Reply #273 on: January 30, 2011, 08:07:12 pm »
This is also why so many new TI programmers still manage to release games that are as great as some others. That said we need to make sure that these newcomers still learn to optimize, though, so the community won't take bad habits of not optimizing at all (when  the 84+ came out this started happening with TI-BASIC: The standard was 3 frames per second for a BASIC game on a regular 83+, but then this became the standard on SE calcs too, so 83+ users were stuck not being able to play those games due to lack of optimizations.

Offline JustCause

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 810
  • Rating: +115/-5
    • View Profile
Re: Axe Minesweeper
« Reply #274 on: February 03, 2011, 09:58:27 am »
For your giant maps, I suggest creating an appvar buffer only if the map won't fit in L1. You can check for this at runtime. Store your map offset to a var and use that var everywhere you would normally use L1. That's what I did for cUbEs.
See you, space cowboy...

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Axe Minesweeper
« Reply #275 on: February 03, 2011, 02:57:25 pm »
For your giant maps, I suggest creating an appvar buffer only if the map won't fit in L1. You can check for this at runtime. Store your map offset to a var and use that var everywhere you would normally use L1. That's what I did for cUbEs.

I'm planning on combining L1 and an appvar buffer for map data.  At the start, if the map size is larger then L1 can handle, then a temporary appvar is created to handle the overflow.  I'm planning on either RLE or something I think is called macro compression (?) to compress my maps when using the teacher key.  I don't want to keep a huge appvar in memory :P
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Axe Minesweeper
« Reply #276 on: February 04, 2011, 02:19:16 am »
THey would be compressed upon quitting, right? Otherwise that might be a bit slow if they're decompressed everytime they're drawn. X.x

By the way should I create a sub-forum for this?
« Last Edit: February 04, 2011, 02:19:38 am by DJ Omnimaga »

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Axe Minesweeper
« Reply #277 on: February 06, 2011, 10:44:50 pm »
Yup, I'm planning on adding as much compression as possible when saving map data.

As for the subforum, I think probably not.  I've been really busy lately, and it's been difficult of late to work on calc projects.
Besides, after this final update (plus bug fixes if needed), I'll probably just finally lay this to rest.
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Axe Minesweeper
« Reply #278 on: February 08, 2011, 12:57:33 am »
Hmm I see. I hope you aren't planning to quit calc stuff anytime soon. it would suck to see you go so early. :(