[Game] Bulldozer

Post your working scripts, libraries and tools
User avatar
TheDewd
Posts: 1031
Joined: 19 Dec 2013, 11:16
Location: USA

[Game] Bulldozer

05 Jun 2018, 09:42

Bulldozer
Bulldozer is an AutoHotkey recreation of the original Bulldozer 1, Bulldozer 2, and Bulldozer 3 games created by John 'FlyMan' Hattan (The Code Zone).

Bulldozer 1 first appeared in 1994 on the CD-ROM game compilation "24 Games for Windows 95" developed by The Code Zone for Expert Software, Inc. Bulldozer 2 became available in 2000 on "Arcade Magic", also developed for Expert Software, Inc. Bulldozer 1 & Bulldozer 2 were re-released in 2003 on "Blazing Games", a compilation of fifty games developed for Cosmi Europe, Ltd. Bulldozer 3 was completed in 2002, but remained unavailable until the 2008 release of Bulldozer which included all 180 levels from the Bulldozer game series. The 2008 version was created with Adobe Flash and is available on a variety of desktop and mobile platforms. Bulldozer is a variation of the popular Sokoban puzzle game.

The object of Bulldozer is to push all of the rocks to the targets. Move the bulldozer using the keyboard's WASD or arrow keys. The bulldozer can only push one rock at a time, and it cannot pull rocks. You will advance to the next level when each rock has been placed on a target.

:arrow: All credit goes to John Hattan for the original idea of the Bulldozer game series. This project was an exercise in GDI+ and string manipulation, and is intended to pay tribute to the game I played in my youth.

Image Image


Image Download
Revision 14 (2018-08-31)

Code: [Select all] [Expand] [Download] (Bulldozer.ahk)GeSHi © Codebox Plus


Image All revisions can be found on the BulldozerAHK Github repository.


Image Screenshots
Image Image Image


Image Themes
ImageBulldozer Color (Bulldozer 1)
Image

ImageBulldozer Monochrome (Bulldozer 1)
Image

ImageMonochrome (TheDewd)
Image

ImageMonochrome Black (TheDewd) *Transparent - See the background color
Image

ImageMonochrome White (TheDewd) *Transparent - See the background color
Image

ImageMonochrome Black (Inverted) (TheDewd) *Transparent - See the background color
Image

Image8-bit Fantasy (TheDewd) [Resource]
Image

ImageRacecar 1 (TheDewd) [Resource]
Image

ImageRacecar 2 (TheDewd) [Resource]
Image

ImageChip's Challenge (TheDewd) [Resource]
Image

ImageMario (TheDewd) [Resource]
Image

ImageZelda (TheDewd) [Resource]
Image

ImageNeko (TheDewd) [Resource]
Image

ImageMario Bros. (TheDewd) [Resource]
Image

ImageKid Icarus (TheDewd) [Resource]
Image

ImageAhkban (SpeedMaster)
Image

ImageNeon Rainbow (TheDewd)
Image

ImageTanks (TheDewd) [Resource]
Image

Image Submit your themes to have them featured here! Image
Last edited by TheDewd on 31 Aug 2018, 16:20, edited 93 times in total.
Image Bulldozer - Sokoban inspired game from 1994 recreated in AutoHotkey.
User avatar
Nextron
Posts: 1208
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win7 x64 AHK: Unicode x32

Re: [GAME] Bulldozer

05 Jun 2018, 09:47

TheDewd wrote:Please share any suggestions for improvement!

Pics! :monkeysee:
User avatar
TheDewd
Posts: 1031
Joined: 19 Dec 2013, 11:16
Location: USA

Re: [GAME] Bulldozer

05 Jun 2018, 09:51

Nextron wrote:
TheDewd wrote:Please share any suggestions for improvement!

Pics! :monkeysee:

Updated first post with screenshot. I plan to add more information later. I just wanted to go ahead and share the game so far.
Image Bulldozer - Sokoban inspired game from 1994 recreated in AutoHotkey.
User avatar
jeeswg
Posts: 4962
Joined: 19 Dec 2016, 01:58
Location: UK

Re: [GAME] Bulldozer

05 Jun 2018, 10:50

- Game looks phenomenal cheers. The 2 things to mention are that it flashes black each time you move, and that you can't hold down the arrow keys, you have to press repeatedly. But all of the key stuff is done, cheers again.
User avatar
TheDewd
Posts: 1031
Joined: 19 Dec 2013, 11:16
Location: USA

Re: [GAME] Bulldozer

05 Jun 2018, 11:10

jeeswg wrote:it flashes black each time you move

You're correct! The issue only occurs for me when using the classic Windows interface. On Windows 7/Windows 10 using themed interface the issue is non-existent. I'm currently implementing a working solution to this for the next update by using BitBlt.

jeeswg wrote:you can't hold down the arrow keys, you have to press repeatedly

I disabled the repeat initially to allow the script time to fully update the background image and other things so that the player doesn't notice the "lag" between updates.
Last edited by TheDewd on 05 Jun 2018, 22:32, edited 1 time in total.
Image Bulldozer - Sokoban inspired game from 1994 recreated in AutoHotkey.
need4speed
Posts: 41
Joined: 22 Apr 2016, 06:50

Re: [GAME] Bulldozer

05 Jun 2018, 15:57

wow, impressive. :thumbup:
you could add an small animation and play a sound when a level is completed.
User avatar
SpeedMaster
Posts: 211
Joined: 12 Nov 2016, 16:09

Re: [GAME] Bulldozer

05 Jun 2018, 19:44

Nice and concise game script. :thumbup:
The game plays well on windows 7 (no flickering background exept on windows 10)
This game is almost identical to the original. :clap:
Thanks for sharing.
tmplinshi
Posts: 1242
Joined: 01 Oct 2013, 14:57

Re: [GAME] Bulldozer

06 Jun 2018, 01:09

It's getting harder for me from level 10, then I look at how many levels.. 61 maps! oh no.. you are wasting my time.. Nice script.

No flickering background on windows 10 x64.
Helgef
Posts: 3151
Joined: 17 Jul 2016, 01:02
Contact:

Re: [GAME] Bulldozer

06 Jun 2018, 02:51

Impressive stuff :shock: :clap: . Less impressive, I failed level 2 twice :facepalm:

Thanks for sharing, cheers.
User avatar
nnnik
Posts: 3199
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: [GAME] Bulldozer

06 Jun 2018, 02:55

I have yet to completely read the entire source but it looks promising.
You should probably rather draw an entire picture and display the whole game as one picture instead of using seperate picture controls.
Recommends AHK Studio
User avatar
derz00
Posts: 495
Joined: 02 Feb 2016, 17:54
GitHub: derz00
Location: Middle of the round cube

Re: [GAME] Bulldozer

06 Jun 2018, 06:39

excuse my ignorance of games, but what does this password do?
try it and see
...
User avatar
TheDewd
Posts: 1031
Joined: 19 Dec 2013, 11:16
Location: USA

Re: [GAME] Bulldozer

06 Jun 2018, 06:53

derz00 wrote:excuse my ignorance of games, but what does this password do?

There is a "Level Select" menu item in the "Game" menu in the menubar, or press F3. Enter the password to load a specific level.
Image Bulldozer - Sokoban inspired game from 1994 recreated in AutoHotkey.
User avatar
derz00
Posts: 495
Joined: 02 Feb 2016, 17:54
GitHub: derz00
Location: Middle of the round cube

Re: [GAME] Bulldozer

06 Jun 2018, 07:12

OK that makes sense :)

Good job on the game. Level 6 took me about 6-8 tries. The rest were pretty easy except I lost my motivation at level 10 :) Now I wish I had noted the password for that level.
try it and see
...
User avatar
TheDewd
Posts: 1031
Joined: 19 Dec 2013, 11:16
Location: USA

Re: [GAME] Bulldozer

07 Jun 2018, 16:12

Updated: Background flicker should now be eliminated.

Revision 3 (2018-06-07)
  • Changed background image update process to prevent flickering
Image Bulldozer - Sokoban inspired game from 1994 recreated in AutoHotkey.
just me
Posts: 5458
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: [GAME] Bulldozer

08 Jun 2018, 05:04

Just one more: "Impressive, thanks for sharing!"

Your script doesn't run on AHK Basic. So you don't need those (A_PtrSize ? "UPtr" : "UInt"). You can safely use "UPtr" or "UPtr*/"UPtrP".

Some thoughts on BackgroundLoad():

  • As far as i can see the tile images will never be changed. So you need to load them into pTilemap only once when the script starts or the tile map will be changed (e.g. in OnLoad()) and destroy the current tile map in OnUnload().
  • Also, you can reuse the GDIP background image and its graphics. They also can be created in OnLoad() and destroyed in OnUnload(). (This would even allow to update only the tiles of interest, 3 at most.)
  • Code: [Select all] [Download] GeSHi © Codebox Plus

    	; Create brush
    DllCall("Gdiplus.dll\GdipCreateSolidFill", "UInt", 0XFF808000, (A_PtrSize ? "UPtr*" : "UInt*"), pBrush)
    ; Fill bitmap graphic with brush color
    DllCall("Gdiplus.dll\GdipFillRectangle", (A_PtrSize ? "UPtr" : "UInt"), G, (A_PtrSize ? "UPtr" : "UInt"), pBrush, "Float", 0, "Float", 0, "Float", 640, "Float", 384)
    ; Delete brush
    DllCall("Gdiplus.dll\GdipDeleteBrush", (A_PtrSize ? "UPtr" : "UInt"), pBrush)
    might be replaced by

    Code: [Select all] [Download] GeSHi © Codebox Plus

       DllCall("Gdiplus.dll\GdipGraphicsClear", "Ptr", G, "UInt", 0XFF808000)
brutus_skywalker
Posts: 179
Joined: 24 Dec 2016, 13:16
Location: Antarctica

Re: [GAME] Bulldozer

09 Jun 2018, 10:58

You Sir Most Certainly Are TheDewd , FREAKING AWESOME DUDE!
Outsourcing Clicks & Presses Since 2004.
User avatar
Gio
Posts: 450
Joined: 30 Sep 2013, 10:54
Location: Brazil

Re: [GAME] Bulldozer

09 Jun 2018, 13:04

Nice script, thanks for sharing :D

The level-select password system seems to be not working here. Rev 3. Windows 8.1 Single Language (64 bits).
"What is suitable automation? Whatever saves your day for the greater matters."
Barcoder - Create QR Codes and other Barcodes using only Autohotkey !!
User avatar
TheDewd
Posts: 1031
Joined: 19 Dec 2013, 11:16
Location: USA

Re: [GAME] Bulldozer

11 Jun 2018, 23:59

Revision 4 (2018-06-11)
  • Added levels from Bulldozer 2 and Bulldozer 3
  • Resized level area for compatibility with maps from Bulldozer 2/Bulldozer 3
  • Optimized level drawing to update changed tiles only
  • Redesigned 'Level Select' and 'About' menu item contents

Note: The passwords are different from the previous versions due to changing the formatting of the level data for compatibility with the larger maps added for levels 61-180. I apologize for any inconvenience.

I hope you all enjoy the game!
Image Bulldozer - Sokoban inspired game from 1994 recreated in AutoHotkey.
burque505
Posts: 545
Joined: 22 Jan 2017, 19:37

Re: [GAME] Bulldozer

12 Jun 2018, 07:27

:bravo: Wow, what a difference! It's really smooth, no flickering, repeat works great.
Those changes in BackgroundLoad(MapData) worked wonders.
Thanks for sharing this.
Regards,
burque505
rommmcek
Posts: 370
Joined: 15 Aug 2014, 15:18

Re: [GAME] Bulldozer

12 Jun 2018, 14:00

Great, great, great! Very smooth, some constellations are really not too easy!

P.s.: Level 24, wall seems to be rock (not bulldozer alone) permeable at least at coordinats 2,4; 3,6; 4,5; 4,7; where 0,0; being upper left corner.

Return to “Scripts and Functions”

Who is online

Users browsing this forum: Bill, robodesign, w0z and 29 guests