Log In  

Cart #25876 | 2016-07-25 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
16

Version 1.1 is now available!

Patch Notes 1.1

  • Slight edit to the mine on the title screen
  • Mouse support is now implemented
  • Left click or move the mouse to enable mouse controls
  • You can switch back to keyboard controls by pressing any of the usual buttons

Some finer details (like displaying the shocked face when clicking) are missing, but will be addressed in the next update.

EDIT: Known bug/glitch when right clicking on the web player, leading to the appearance of a "both pressed" message.

Cart #25835 | 2016-07-24 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
16

Hi there! This is my first ever "finished" game, a simple port of minesweeper. The code behind this is by no means the most efficient/effective/simple, but it gets the job done.

By default the game just uses the "beginner" difficulty, but you can change this in the first few lines of the source code. Custom difficulties work, but the menu for selecting them is in the very early stages so I have disabled that for now. Anything with more rows or columns than will fit on the screen will still be generated, but scrolling around is not yet implemented. Similarly, mouse support currently only draws a mouse selector, and cannot be used to reveal or flag tiles. Difficulty select (including custom difficulties), scrolling, mouse support, high-scores, ? tiles and the "double click technique" will be added in time.

Until then, if you have any questions, find any bugs, or have any tips, let me know @TanThetaEquals2

I hope you enjoy!

P#25836 2016-07-24 19:42 ( Edited 2016-07-26 21:57)

:: scgrn

Well done! I love the pseudo window / title bar.

P#25838 2016-07-24 21:42 ( Edited 2016-07-25 01:42)

Very nice! Can you add mouse support?

P#25849 2016-07-25 06:06 ( Edited 2016-07-25 10:06)

Thank you! mouse support is sort of half ready movAX13h, just got to add left and right clicks to the relevant functions, and find a way to check which tile the cursor is over (nothing too crazy).

Anyone got any ideas on how I can switch between keyboard and mouse, so they can't be used at the same time?

P#25851 2016-07-25 06:39 ( Edited 2016-07-25 10:39)

Totally, the menu bar is a great touch.

P#25860 2016-07-25 09:06 ( Edited 2016-07-25 13:06)

@ROFL-WAFFLES: what I've done in the past (not on PICO-8 but the concept is the same) is have a variable that says whether we are in controller mode or mouse mode. Whenever any controller button is pressed, switch to controller mode. Whenever any mouse input is received (i.e. when the position changes by an amount greater than some threshold, to prevent accidental bumps, or when a button is clicked), switch to mouse mode.

Use that "mode" variable to section off the two different types of input code, so that only one mode is ever used at a time.

EDIT: this is great btw :D

P#25864 2016-07-25 11:49 ( Edited 2016-07-26 00:19)

Mouse support is almost ready! Just have to figure out a way to prevent it registering clicks so rapidly (similar to how btn() and btnp() work), after that I can publish it here.

P#25873 2016-07-25 17:18 ( Edited 2016-07-25 21:18)
:: Rhys

Love it, all it could use is some audio! Didn't even know pico8 had mouse support <3_<3

P#25878 2016-07-25 21:50 ( Edited 2016-07-26 01:50)

How can you stop the right click menu from popping up?

P#25930 2016-07-26 17:06 ( Edited 2016-07-26 21:06)

Hi UrbanMonk, if you own the pico-8 software then you can use splore to play the game through that and you won't have that issue. I have made some changes that will be in the next update that allow the z and x keys to be used alongside the mouse, that should be live within a few days.

P#25932 2016-07-26 17:08 ( Edited 2016-07-30 14:49)

Perfect!

P#25936 2016-07-26 17:57 ( Edited 2016-07-26 21:57)

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2022-06-27 21:39:19 | 0.049s | Q:34