Log In  


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

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
19

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!

19


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


Very nice! Can you add mouse support?


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?


Totally, the menu bar is a great touch.


@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


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.


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


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


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.


Perfect!


I tried it both ways and the mouse support makes it so much better! Great job!



[Please log in to post a comment]