NaaLaa
Bombsweeper - Printable Version

+- NaaLaa (https://www.naalaa.com/forum)
+-- Forum: NaaLaa (https://www.naalaa.com/forum/forum-1.html)
+--- Forum: NaaLaa 7 Questions (https://www.naalaa.com/forum/forum-3.html)
+--- Thread: Bombsweeper (/thread-37.html)

Pages: 1 2


RE: Bombsweeper - Marcus - 03-22-2024

(03-22-2024, 02:08 AM)1micha.elok Wrote: The second version of Bombsweeper ....

I remember, last year, the first version of Bomb Sweeper - N5 to N7 at this thread https://naalaa.com/forum/thread-14.html ...
At that time, I tried to learn the logic behind the game : 

Step 1. Make a skeleton of the program, i.e : Initialization, Main Program, Functions Collection
Step 2. Make a simple grid as a platform for Bomb Field
Step 3. Add bombs randomly inside the Bomb Field
Step 4. Detect a cell with a bomb
Step 5. Calculate number of close bombs for each cell
Step 6. Mark the bomb when you press mouse button

Now, it's time for me to revisit the code and continue to learn with the remaining steps ....  Big Grin

The only interesting part of the game is the (very unoptimized) Sweep function. It's just a "flood fill" thing, but you can use the same idea to find movement paths, a way to walk from point A to B in a maze. When I was a kid I was super impressed of how, in a game like "Dune 2" (Amiga) , you could click on a spot on the map and a tank or dude would go to that spot, moving around all obstacles. It was like a holy grail for me. That and raycasting.


RE: Bombsweeper - 1micha.elok - 03-22-2024

(03-22-2024, 06:07 AM)Marcus Wrote: The only interesting part of the game is the (very unoptimized) Sweep function. It's just a "flood fill" thing, but you can use the same idea to find movement paths, a way to walk from point A to B in a maze. When I was a kid I was super impressed of how, in a game like "Dune 2" (Amiga) , you could click on a spot on the map and a tank or dude would go to that spot, moving around all obstacles. It was like a holy grail for me. That and raycasting.

DUNE 2 was a very popular game in 1990s .... very interesting that we can make a strategy game (Dune 2) with the Sweep function .... mmm.... Dune 2 remake in Naalaa 7 ?? ... lol ....

I see that A Dune 2 Clone ( Dune Legacy ) is available on sourceforge and it's worth to try for the sake of sweet old memory.

Big Grin Big Grin Big Grin