Author Topic: [C] Minesweeper  (Read 13609 times)

0 Members and 1 Guest are viewing this topic.

Offline Siapran

  • LV3 Member (Next: 100)
  • ***
  • Posts: 58
  • Rating: +28/-1
  • Space Dwarf
    • View Profile
[C] Minesweeper
« on: January 19, 2014, 07:22:43 pm »
I started this project a while ago with Eiyeron, and never actually got to complete it... until today that is.
here is the updated project: dropbox link (v0.9)

screenshot:

Spoiler For Full map:
video:


control explanations:

~ Arrow keys: move around
~ SHIFT: open box
~ ALPHA: toggle flag
~ MENU: exit

Right now the minesweeper has the following features:
~ scroll able grid
~ recursive opening of empty spaces
~ authomatic opening of safe zones (if you shift click on a already opened spot, and that you have placed an appropriate number of flags around that spot, the game will open the 8 adjacent non-flagged spots)
~ saving and loading gamestate from storage memory (gamestate is saved as "mines.dat")

Features to come:
~ alternative skins (already sprited)

The game isn't complete yet, but it's closer to it than when I unboxed it a few hours ago.
have fun!


(v0.5) UPDATE/HOTFIX:

~ fixed keys blocked by GetKey
~ added part of the GUI
~ game no longer loads save by default
~ F5 to save current state

(v0.6) UPDATE:

~ added timer
~ added mine count
~ added icon

(v0.9) UPDATE

~ game autoloads and autosaves on launch and exit (F5 and F6 don't do anything anymore)
~ exit keys are MENU or EXIT
~ the game now handles victory and failure
~ the game is now complete for v1.0
~ the game's code needs some cleanup
~ the game

(v0.9.1) UPDATE

~ fixed timer
~ SH4 compatibility
« Last Edit: January 22, 2014, 09:19:11 am by Siapran »

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: [C] Minesweeper
« Reply #1 on: January 20, 2014, 12:25:46 am »
This looks pretty nice! Is it SH3-compatible?

Offline Siapran

  • LV3 Member (Next: 100)
  • ***
  • Posts: 58
  • Rating: +28/-1
  • Space Dwarf
    • View Profile
Re: [C] Minesweeper
« Reply #2 on: January 20, 2014, 02:30:10 am »
yes, currently it only works with SH3 (can't remember how to fix for SH4)

To make this clear, I owe most of this project to Eiyeron: he's the one that made the structure, I merely adapted some functions I had made in BASIC for my old minesweeper, added ergonomic keys and the saves.
« Last Edit: January 20, 2014, 02:54:14 am by Siapran »

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: [C] Minesweeper
« Reply #3 on: January 20, 2014, 04:08:29 am »
Source will be cleaned and GITed for readability and making others learn tricks/methods from it. That's mainly how I learn C from PierrotLL's games.

Offline Siapran

  • LV3 Member (Next: 100)
  • ***
  • Posts: 58
  • Rating: +28/-1
  • Space Dwarf
    • View Profile
Re: [C] Minesweeper
« Reply #4 on: January 20, 2014, 04:08:44 am »
(v0.5) UPDATE/HOTFIX:

~ fixed keys blocked by GetKey
~ added part of the GUI
~ game no longer loads save by default
~ F5 to save current state
« Last Edit: January 20, 2014, 08:25:50 am by Siapran »

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: [C] Minesweeper
« Reply #5 on: January 20, 2014, 07:59:44 am »
Looking nice, good to see some casio programs!
The only casio i have is the fx-9750G plus and i have no idea how to connect to pc.... :/

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Siapran

  • LV3 Member (Next: 100)
  • ***
  • Posts: 58
  • Rating: +28/-1
  • Space Dwarf
    • View Profile
Re: [C] Minesweeper
« Reply #6 on: January 20, 2014, 08:24:55 am »
(v0.6) UPDATE:

~ added timer
~ added mine count
~ added icon
« Last Edit: January 20, 2014, 09:03:19 am by Siapran »

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: [C] Minesweeper
« Reply #7 on: January 20, 2014, 11:42:19 am »
Looking nice, good to see some casio programs!
The only casio i have is the fx-9750G plus and i have no idea how to connect to pc.... :/
Have you tried FA-124? It's the best software to transfer files to FXes. Do you have the Casio's cable, or do that calc have an USB port?

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: [C] Minesweeper
« Reply #8 on: January 20, 2014, 12:03:53 pm »
Looking nice, good to see some casio programs!
The only casio i have is the fx-9750G plus and i have no idea how to connect to pc.... :/
Have you tried FA-124? It's the best software to transfer files to FXes. Do you have the Casio's cable, or do that calc have an USB port?
No casio cable, no usb port :(

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: [C] Minesweeper
« Reply #9 on: January 20, 2014, 12:18:59 pm »
So, I'm sorry, but you won't get any Addins if they were compatible (that, I don't know, it seems your calc is too old). YOu can still open basic programs with FA-124 and write at hand the source.

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: Re: [C] Minesweeper
« Reply #10 on: January 20, 2014, 12:48:50 pm »
Also the 9750G and G+ have a different processor (4 MHz I think, and are much slower than the 9750GII.

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: [C] Minesweeper
« Reply #11 on: January 20, 2014, 12:50:20 pm »
Ah, if it's that processor, Sorry Soru but you won't have any addin at all.

Offline Siapran

  • LV3 Member (Next: 100)
  • ***
  • Posts: 58
  • Rating: +28/-1
  • Space Dwarf
    • View Profile
Re: [C] Minesweeper
« Reply #12 on: January 20, 2014, 01:19:48 pm »
you can still grab the SDK and try it out on the emulator: SDK
Install the SDK, open the project file, and run the game!
« Last Edit: January 20, 2014, 01:21:10 pm by Siapran »

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: [C] Minesweeper
« Reply #13 on: January 20, 2014, 01:30:42 pm »
So, I'm sorry, but you won't get any Addins if they were compatible (that, I don't know, it seems your calc is too old). YOu can still open basic programs with FA-124 and write at hand the source.
meh, i wouldn't want to do that :/
Also the 9750G and G+ have a different processor (4 MHz I think, and are much slower than the 9750GII.
Well, the plus must be there for something :P

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Siapran

  • LV3 Member (Next: 100)
  • ***
  • Posts: 58
  • Rating: +28/-1
  • Space Dwarf
    • View Profile
Re: [C] Minesweeper
« Reply #14 on: January 20, 2014, 05:50:56 pm »
(v0.9) UPDATE

~ game autoloads and autosaves on launch and exit (F5 and F6 don't do anything anymore)
~ exit keys are MENU or EXIT
~ the game now handles victory and failure
~ the game is now complete for v1.0
~ the game's code needs some cleanup
~ the game

video incoming :3

« Last Edit: January 21, 2014, 04:55:38 am by Siapran »