KAZESUI'S PROFILE

Doing Super Programming
on Super Computers
for Super Performance
The Curse of Cpt. Lovele...
Nautical-themed cephalopod-pirate-based action-shmup.

Search

Filter

Minesweeper Flags

Good to hear that you got it working

From skimming through the wiki definition of fisher-yates algorithm, it doesn't really sound like a variation of it, with it rather just being a shuffling method which use the same trick. There are other algorithms which use the same trick as well, so one cannot exactly attribute it to fisher-yates.

and yeah, let's say event on tile 1 checks if switch 1 is on and if yes turn a temporary switch on, while event on tile 2 does checks if switch 2 is on and if so turns the same temporary switch on. By doing this, you could use "call event" to figure out if one of the events has it's switch activated, which saves you for tons of branching.

Minesweeper Flags

The easiest way would be to use the eventID, yes. by using events of ID 1 to 25 and switches 1 to 25 for flags, you could simply use get event ID and the "switch on" by variable reference, yes.

Doing it the other way is perfectly possible as well, but requires more branches and stuff. i.e. add 1 to pointer if going right (if possible), add 5 to pointer if going down (if possible) and so on.

Either way, for practicality, you might want to make a page in each event which allows you to check if "their switch" is on, since you can unfortunatly not reference a switch to find out it's value for a branch.

Minesweeper Flags

depends if you actually have any use for the coordinates themselves. I don't know how you handle every aspect of the minigame so hard to tell, as in the regular mine sweeper, flags are pretty much only there for the ease of using the shortcut buttons to open all the nearby cells which you've implicit told can't be mines.

If there's no need to store the coordinates, I'm unsure if there'd be any need to "give the flags" specific numbers, since you could make the "flag event" trigger on switch 1 to 25 (for a grid of 5x5) and then address the switch by a pointer to on or of directly by relating it to the eventID. This would mean you wouldn't have to worry about any gaps, since the only thing mattering would be the counter preventing you from setting too many flags.

Minesweeper Flags

Not entirely certain how your setup is working in detail. Do you put a "flag event" onto the tiles you mark? or is the flag contained within the tile event itself?
I'm pretty certain that you can avoid a hell of a lot of branches by using pointers or similar means, but exactly how depends on exactly how it works of course.

if the flag event is on of it's own, then it could be as simple as

- geteventID of tile with flag
- use eventID to determine which flag it is
- use the counter to determine the highest valued flag in the field
- set the coordinates of the flag you want to delete to that of the highest valued flag, and move it there
- move the highest value flag out of visibility and reduce the counter by one.

using the eventID, you could also figure what to add/subtract from that value to point the variables storing their coordinates to handle it more elegantly as well.
i.e. flag 1 has ID 31 and flag 1 x is stored in variable 11 and flag 1 y in variables 21. you can then take the ID, subtract by 10, store the y coordinate into where the variable is pointing, subtract by 10 again and store the x coordinate the same way.

Minesweeper Flags

The problem with the gaps isn't all that hard to fix efficiently. You can do that by swapping the positions of the flags upon trying to remove a flag. Imagine having placed all 5 flags and you want to remove flag #2



Swapping the positions of the flags and then removing the flag of highest value ensures that the counter will always point to the next flag, while all other flags will stay at the same positions.

[Rm2k3] Panorama maps

you have to multiply the the tile dimensions by 16 to find out what he dimensions of the panorama needs to be.

e.g. for a 20x15 map, the panorama needs to be 320x240 pixels

An Official *English* Version of 2k3 Approaches!

Feeling inclined to sign this myself, considering how much I've used the program. Whether I'd actually buy it would depend somewhat on the price though.

Move Event Issues [2k3]

Phasing needs to be activated BEFORE jumping if you want to jump to some impassable tile.

Another Portal Walkthrough

I added a picture which "might" be easier to understand than the clusterfuck of an explanation given up there. Red Lines denote where you move, and the yellow ones where you shoot, with the circles being portals you open.

Random key [rm2k3]

Is the key supposed to have any special function aside from being unique? If not, then simply assigning a random value from 0 to 9,999,999 ought to be as good enough.