15 posts
Posted 12 January 2014 - 07:14 PM
Thought to post also my simple Minesweeper game
(would've made own topic but it's not allowed yet).
Features:
- Play on big screen with your friends.
- Only supports advanced monitors, for touchscreen interface. Cannot play from terminal.
- Font and background coloring.
- Difficulty changeable via parameter from 0..1 (where 1 is field full of mines)
- Supports any amount of monitors. Characters are not scaled bigger by default, you need to change textscale value in code to do that. Also program restart required if you change monitors.
Missing:
- Cannot place flags, since i don't think the screen can recognize which mouse button you press in touchscreen event.
Pastebin:
http://pastebin.com/WJuZjJzrSpoiler
8543 posts
Posted 12 January 2014 - 11:17 PM
I've split this into a new post. Don't just go around posting on random topics because you don't have topic creation permissions.
1852 posts
Location
Sweden
Posted 13 January 2014 - 11:57 AM
The missing part there.. If this can be runned in the terminal then you can check if it's the right or left button that have been clicked.
local evt = { os.pullEvent() }
if evt[1] == "mouse_click" then
if evt[2] == 1 then -- Left mouse button
-- Code
elseif evt[2] == 2 then -- Right mouse button
-- Code
elseif evt[2] == 3 then -- Middle mouse button
-- Code
end
end
NOTE: This
doesn't work on monitors, Since you can only right click
7083 posts
Location
Tasmania (AU)
Posted 13 January 2014 - 04:42 PM
For monitors, you could either implement a button off to the side that toggles what the clicks do, or set up a system whereby a click places a flag and a double click reveals numbers.
15 posts
Posted 14 January 2014 - 10:39 PM
For monitors, you could either implement a button off to the side that toggles what the clicks do, or set up a system whereby a click places a flag and a double click reveals numbers.
I thought about making a button that toggles flag mode, but i would imagine it being a little awkward when more people are playing it at the same time. I imagine that this game would work in very big scale, like 30x20 monitors that could be played in bat morph form or other methods of steady flying. One wants to dig and other wants to place flag, and it makes a problem. He could remove the flag toggle just as you are placing one.. and *boom*.
Doubleclick is maybe possible, but timing in server play is not that great either. It would require a time table for the entire grid (or dynamic list of recent clicks), and would create a delay for digging.
But feel free to edit and publish new versions of the game, i felt that it is enough for my needs for now at least.
5 posts
Posted 20 January 2014 - 06:13 AM
This is cool. Nice to see games running on monitors. It makes the experience more like an actual display when playing with friends in SMP.
571 posts
Location
Some Fish Bowl in Ohio.
Posted 20 January 2014 - 02:19 PM
Me and my friend take turns hitting the screen, first one to set off a mine loses. :D/>
45 posts
Location
IA, USA
Posted 17 February 2015 - 11:15 PM
Cool. For the flags I know the event only can return the left click if on the computer screen but what if you use the monitor program ex "monitor right progName" will that work? and can it deteect left clicks in survival if it cant then that could be a cool new feature and im sure the developers can think of a way to make it work in creative like maybe monitors can only be broke from a "non-screen' side. But hey waht do I know?