Author Topic: Axe Minesweeper  (Read 48152 times)

0 Members and 2 Guests are viewing this topic.

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 #180 on: September 16, 2010, 08:14:02 pm »
Umm...
The cursor jumping to the other side was something I was originally going to include, anyways, although I was unable to make it work in time.
Making the actual map loop continuously would be wickedly hard (and I'm unable to come up with any clever ways to do it at this moment).
With wraparound, I think you just have to make the mine placement and expanding loop to the other side once, which should be easy enough to do.
Aah ok I see. Well, good luck!

SirCmpwn

  • Guest
Re: Axe Minesweeper
« Reply #181 on: September 16, 2010, 09:07:01 pm »
Ooo, I just got this, and it's nice!

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Axe Minesweeper
« Reply #182 on: September 16, 2010, 09:20:15 pm »
I didn't have time to include wraparound, or make any kind of elaborate high scores list, but now you can contort your minefield size so long as the total is equal or under to about 355.

No wraparound? That's not a problem. Not many PC minesweeper games have wraparound, anyway :)

Yes, but wraparound is EPIC.  (I've never seen it or been able to enable it, but I was looking forward to trying it myself...)

so i thought of something original? thats awesome!
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Axe Minesweeper
« Reply #183 on: September 16, 2010, 10:08:39 pm »
i now have a bit of time to explain myself as my brother is done using the machine. (you most likely know the vast majority of what is going to follow already, but im going to cover everything anyways just in case)
traditionally, map data for tilemappers is stored in one long continuous string of data. to access a set point in this data one would simply multiply the y position by the total width of the map and then add the height. thus, drawing a map from the data would look like these(you draw to a 10*10 square and store your data in L1, right?):
fixed map size of 10*10:
Code: [Select]
for(L,0,9
for(M,0,9
PtOn(6*L,6*M,10*M+L+L1
End:End
Dispgraph

which can also be written as

Code: [Select]
for(L,0,99
PtOn(L^10*6,L/10*6,L1+L
End
Dispgraph

scrolling for variable sizes larger than 10*10(x and y positions are listed as A and B respectively. these could technically be stored in a single variable with accessing via ^ and / as well, but that just makes things too confusing):

Code: [Select]
0->A->BRepeat D=15
Repeat D
getkey->D
End
A+((D=3)*(A<[total map width minus 10]))-((D=2)*(A>0))->A
B+((D=1)*(B<[total map height minus 10]))-((D=4)*(B>0))->B
for(L,0,99
PtOn(L^10*6,L/10*6,[total map width]*B+A+L1+L
End
Dispgraph
End

Scrolling with wraparound(this is very similar to the option above, but instead of just stopping at it's max value, the x and y's will revert back to zero. to make what im doing a bit cleaner and easier to read ive split some of it into if statements, but these can be incorporated easily into the long +- strings {saving quite a bit of space} as well if you want. also to make things easier to read, the L^ and L/ are L and M again):
Code: [Select]
0->A->BRepeat D=15
Repeat D
getkey->D
End
A+((D=3)*(A<[total map width]))-((D=2)*(A>0))->A
B+((D=1)*(B<[total map height]))-((D=4)*(B>0))->B
if A=[total map width] and (D=3)
0->AEnd
if A=0 and (D=2)
[total map width]->AEnd
if B=[total map height] and (D=1)
0->BEnd
if B=0 and (D=4)
[total map height]->BEnd
for(L,0,9
for(M,0,9
PtOn(L^10*6,L/10*6,B+M^[total map height]*[total map width]+(A+L^[total map width])+L1
End:End
Dispgraph
End

i dont know any specifics about the code you're using for the sweeping routine, but it could potentially do the same thing. im going to assume that you have to check all the spots around a given point to see which direction the sweeping should advance in. in that case, check if the point you are checking is less than 0(in which case you would add the total map dimension you are advancing in) and check if it is greater than the max map dimension in the direction you are checking in(in which case you simply subtract that total to find the tile you want)

this code was all written on the spot and was not bug tested, so there may be an off by 1 in here somewhere or i may have mixed up getkey(1) and getkey(4) again. however, the general concepts should work. good luck on making this happen!

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Axe Minesweeper
« Reply #184 on: September 17, 2010, 08:12:44 pm »
Code: [Select]
for(L,0,99
PtOn(L^10*6,L/10*6,L1+L
End
Dispgraph


I like this, but am slightly confused by the rest.

I don't think this:

scrolling for variable sizes larger than 10*10(x and y positions are listed as A and B respectively. these could technically be stored in a single variable with accessing via ^ and / as well, but that just makes things too confusing):

Code: [Select]
0->A->BRepeat D=15
Repeat D
getkey->D
End
A+((D=3)*(A<[total map width minus 10]))-((D=2)*(A>0))->A
B+((D=1)*(B<[total map height minus 10]))-((D=4)*(B>0))->B
for(L,0,99
PtOn(L^10*6,L/10*6,[total map width]*B+A+L1+L
End
Dispgraph
End

would work.  Assume that there's a 4x4 map for simplicity, and I want it to look like this: (* is a mine, and can be replaced by an arbitary number over 8 )

01*2
012*
0011
0000

If I stored that map data to L1, it would look like this:

01*2 012* 0011 0000
(with spaces for readability)

Using your code, if I just wanted to display the graph, without adding scrolling, I would do this.
Code: [Select]
For(L,0,8
PtOn(L^4*6,L/4*6,4*B+A+L1+L
End
(assuming for a moment that A=B=0)
Which would display only the first 9 numbers in L1 and look like this:

01*
201
2*0

Parts left out: 00110000

instead of ideally, this:

01*       2
012       *
001       10000
          Right column = parts of the list left out.


At this moment, I'm not sure if your code will accommodate displaying correctly.  I think you've made the same kind of error for looping too.
Or did I completely misunderstand your code or did something stupid on my part?  (apologies if I did, I'm a bit tired)
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 shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Axe Minesweeper
« Reply #185 on: September 18, 2010, 12:34:37 am »
the second one should work, as i've made it work before:


however, it is also quite possible that i mistyped something as i am also quite tired
ima try mocking up a couple of demos for you

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 #186 on: September 18, 2010, 01:04:11 am »
Was that a new RPG you were working on shmibs?

Offline whitevalkery

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 129
  • Rating: +10/-10
  • DCS7 Beta tester
    • View Profile
Re: Axe Minesweeper
« Reply #187 on: September 18, 2010, 01:45:12 am »
Was that a new RPG you were working on shmibs?
it looks kinda like Pokemon :P
is it going to be something like a pokemon clone or something on those lines?
harvest moon perhaps?

i donno... i am just thinking up all the games that look like that :P

though it looks like pokemon the most



Used to be Schoolhacker...

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 #188 on: September 18, 2010, 01:57:20 am »
Yeah indeed, although the map seemed different. It looks nice though. I wonder if he'll work on a RPG. I wish I had motivation to port ROL3 to Axe...

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Axe Minesweeper
« Reply #189 on: September 18, 2010, 10:21:15 am »
@ Shimbs: Huh - so I was wrong  :P
Your sprite stays in the center of the screen though - is that built in, or can that be changed?  My screen only moves if the pointer approaches the edges.

@ Everybody:
Right now, I'm not entirely sure what people mean by wraparound, looping, etc., so:
Wraparound - by this, I mean that if a mine is located on an edge, it increments the numbers on the opposite side.  Also, if you click a blank bubble that goes off screen, then it continues on the other side.
This should be easy-ish to implement.

Map looping - by this, I mean that if the entire minefield map would continue to draw itself to the side and corners over and over, giving the illusion that the minefield has no boundary.  DJ suggested this idea, but while it would be cool, it would also be incredibly disorienting for the player and difficult for me to code.

Pointer-moving-to-the-other-side - Currently without a snappy name, this feature would let your pointer move to the other side if you hit a boundary and keep going.  This feature existed in some of my earlier screenshots, but was removed after the large minefield sizes along with time constraints made it more difficult.
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 #190 on: September 18, 2010, 12:36:00 pm »
I guess wraparound might be best then, since looping looks like it might be too hard.

Offline whitevalkery

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 129
  • Rating: +10/-10
  • DCS7 Beta tester
    • View Profile
Re: Axe Minesweeper
« Reply #191 on: September 18, 2010, 01:32:58 pm »
i just sent you a pm :)
i hope that has the correct information though :/

not really sure what most people mean by wrap around either...
though i would thinking that something like map looping is quite unnecessary...

the first one... it seems quite interesting... though once again... not necessary lol



Used to be Schoolhacker...

SirCmpwn

  • Guest
Re: Axe Minesweeper
« Reply #192 on: September 18, 2010, 01:35:48 pm »
Pointer-moving-to-the-other-side - Currently without a snappy name, this feature would let your pointer move to the other side if you hit a boundary and keep going.  This feature existed in some of my earlier screenshots, but was removed after the large minefield sizes along with time constraints made it more difficult.

As for a name, how about cursor snapping? :P

Offline whitevalkery

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 129
  • Rating: +10/-10
  • DCS7 Beta tester
    • View Profile
Re: Axe Minesweeper
« Reply #193 on: September 18, 2010, 01:40:03 pm »
Pointer-moving-to-the-other-side - Currently without a snappy name, this feature would let your pointer move to the other side if you hit a boundary and keep going.  This feature existed in some of my earlier screenshots, but was removed after the large minefield sizes along with time constraints made it more difficult.
As for a name, how about cursor snapping? :P
i say we keep that part as is...
since everything works now... so why fix it? :/

EDIT: oops... i accidentally posted in his quote
« Last Edit: September 18, 2010, 05:16:00 pm by whitevalkery »



Used to be Schoolhacker...

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Axe Minesweeper
« Reply #194 on: September 18, 2010, 04:09:04 pm »
Well I think I'm just gonna put my two cents in.

I feel like the idea of wrap around is a little taboo in Minesweeper. I just think it will mess with people who go in expecting to play a normal Minesweeper game but then when a number on the edge says four but they can only find two touching ones, it might mess with them and think the game is flawed. Even if you put it in a Readme.txt file there is no guarantee people will read it. Also the wrap around expansion is a little odd too because that would be completely new and odd to some people. Like I know for a fact those would mess with me unless I really focused and remembered those things.

As for what you were calling map looping. I like this idea, though not in the context you were saying. I think you should be able to scroll out to the end of the map and then when you go one more over it wraps back to the first row/column.

Code: [Select]
1234  1234
123X  X234
1234  1234
1234  1234

That's what I mean. It'll be odd if you do:

Code: [Select]
1234  2341
123X  234X
1234  2341
1234  2341

I could be wrong, but that's what it sounded like you were saying.

What ever you do though I think it'll be great. This has been an amazing project so far :) Keep up the good work and can't wait to see progress :)
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)