Programming... the ultimate computer game

Anything Really. Just keep it clean!

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
JRL
Automation Wizard
Posts: 3524
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Programming... the ultimate computer game

Post by JRL » Tue Dec 11, 2012 10:28 pm

I haven't really finished this yet but I have posted a working version on Skydrive The game takes an image and breaks it up into multiple same sized tiles and scatters them about the screen. You then get to reassemble the image. Similar to a jigsaw puzzle. You can select any jpg, bmp, or png image from your computer, or you can select the Macro Scheduler Gear Head. The Gear Head image is 1000x1000 pixels so it might be too large for your screen.

A couple of issues I'm aware of.

- You can select too large an image. If the image doesn't fit on your desktop, you won't like the result
- You can select too small a tile. The game will last longer if you have lots of tiles but everything will take longer.
- Press F1 for some rudimentary help.
- Press F2 to toggle helper numbers.
- Press Esc to quit the game.

Some of this might make no sense until you try the game. I'd appreciate any feed-back.

Happy holidays,
Dick

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Wed Dec 12, 2012 1:19 am

Worked great for me, a macroscheduler programming tour de force :D

User avatar
CyberCitizen
Automation Wizard
Posts: 721
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Thu Dec 13, 2012 12:30 am

Love it, that's awesome. The only problem I have is that I am always missing a tile when it scrambles it. Tried multiple times with different images, I thing its opening the blue background to large and therefore opening off screen.
FIREFIGHTER

User avatar
Marcus Tettmar
Site Admin
Posts: 7393
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Dec 13, 2012 2:38 pm

The playing area takes up 1.5 times the width of my main monitor, so spanning monitors, and also appears to drop off the bottom, hiding some tiles.

Have tried smaller images but always the same. Would it be possible to make it maximise to fit within the bounds of the monitor? Or allow the playing area size to be set?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
JRL
Automation Wizard
Posts: 3524
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Thu Dec 13, 2012 3:24 pm

Thanks for the input. Sounds like Michael and Marcus are having similar issues. The code I've used to determine the desktop size is:

Code: Select all

  Let>SM_CXVIRTUALSCREEN=78
  Let>SM_CYVIRTUALSCREEN=79
  Let>SM_XVIRTUALSCREEN=76
  Let>SM_YVIRTUALSCREEN=77

  LibFunc>User32,GetSystemMetrics,VScrWidth,SM_CXVIRTUALSCREEN
  LibFunc>User32,GetSystemMetrics,VScrHeight,SM_CYVIRTUALSCREEN
  LibFunc>User32,GetSystemMetrics,VScrLeft,SM_XVIRTUALSCREEN
  LibFunc>User32,GetSystemMetrics,VScrTop,SM_YVIRTUALSCREEN

  MDL>Upper Left corner is: %VScrLeft%,%VScrTop%%crlf%Lower right corner is: %VScrWidth%,%VScrHeight%
This code was originally posted to the forum as a solution for determining desktop size on dual monitor systems. I've used it in 3 or 4 scripts that I've posted in the past and no one has complained before but then I don't usually request feedback. I have a single large monitor so I don't have multiples to test with. Is there a reason this does not work on multi monitor systems?

A solution might be to give the user playing field choice. Should be easy enough to do. I'll notify here when I get a new exe posted.

@Me_again. Happy its working for you.

Here's a challenge.

I don't have mugs or tee-shirts but I'll give 50 reputation points to the first person to post the correct method for acquiring the source code for the posted executable Puzzle.exe.

User avatar
Marcus Tettmar
Site Admin
Posts: 7393
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Dec 13, 2012 3:28 pm

That code gets the virtual screen size - that includes ALL monitors.

I'd say that in this case you don't want to be doing that. Imagine if someone has 6 monitors!

I'd use GetScreenRes to just get the resolution of the primary monitor.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
JRL
Automation Wizard
Posts: 3524
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Thu Dec 13, 2012 3:36 pm

That makes sense. I'll try that. Might also give an option for setting the play area.

I don't have to imagine 6 monitors. That's exactly how many big CRT monitors I had on my desk back a few years ago before KVMs became reasonably priced. Of course you mean all attached to one computer.

User avatar
Marcus Tettmar
Site Admin
Posts: 7393
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Dec 13, 2012 3:57 pm

Your desk must have been made of steel reinforced concrete! :-)

Thank goodness for lightweight LCDs.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
JRL
Automation Wizard
Posts: 3524
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Tue Dec 18, 2012 5:37 am

Made some changes this weekend. If anyone would like to try this script again. The image should be limited to 80% of the screen size no matter how large the original image was.

User avatar
CyberCitizen
Automation Wizard
Posts: 721
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Tue Dec 18, 2012 6:56 am

Much better, eg fits.

That being said I did have an issue once the puzzle had finished it wouldn't exist. I press Alt + F4 and it closes the window, however the clock / timer is still in the corner, I check task manager and puzzle.exe is in there twice.

On a side note I tried your other script but I had an issue with that as well.
Image
FIREFIGHTER

User avatar
CyberCitizen
Automation Wizard
Posts: 721
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Tue Dec 18, 2012 7:06 am

JRL wrote:I don't have mugs or tee-shirts but I'll give 50 reputation points to the first person to post the correct method for acquiring the source code for the posted executable
I have _Stop_Timer_.txt, gametimer.scp, PassTheTime.txt, Dialogtest.scp, CompileLine.txt

Still working on the other parts.
FIREFIGHTER

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Tue Dec 18, 2012 7:35 pm

CyberCitizen wrote:
JRL wrote:I don't have mugs or tee-shirts but I'll give 50 reputation points to the first person to post the correct method for acquiring the source code for the posted executable
I have _Stop_Timer_.txt, gametimer.scp, PassTheTime.txt, Dialogtest.scp, CompileLine.txt

Still working on the other parts.
It's a lot easier than that. You may want to review some of JRL's previous masterpieces :wink:

User avatar
JRL
Automation Wizard
Posts: 3524
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Wed Dec 19, 2012 4:07 am

CyberCitizen wrote:That being said I did have an issue once the puzzle had finished it wouldn't [exit.]
For some reason the Esc key doesn't work while the "Congratulations" message is displayed. I'm working on finding a solution.
CyberCitizen wrote:On a side note I tried your other script but I had an issue with that as well.
The message indicates the script couldn't find msrt.exe which is the Macro Scheduler compiler. If you don't have the compiler, this script will do nothing for you. if you do have the compiler, try putting a copy of msrt.exe in the same folder as your msched.exe file
Me_again wrote:It's a lot easier than that.
Yes it is. See the post that first described the "other script" in the puzzle skydrive folder.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts