[GAME] Bulldozer

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

[GAME] Bulldozer

05 Jun 2018, 09:42

Bulldozer
Bulldozer is a clone of the original Bulldozer 1, Bulldozer 2, and Bulldozer 3 games created by John Hattan (The Code Zone).

Bulldozer 1 first appeared on CD-ROM in 1994 on "24 Games for Windows 95" released by Expert Software, Inc. Bulldozer 2 was included in "Arcade Magic", also released by Expert Software, Inc. Bulldozer 3 was completed in 2002, but remained unreleased until the game creator bundled all 180 of the Bulldozer levels together in the 2008 release of Bulldozer. 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.

Image Image


Image Download
Revision 12 (2018-08-14)

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


All revisions can be found on the BulldozerAHK Github repository:
Image https://github.com/westoncampbell/BulldozerAHK/


Image Screenshots
Image Image Image


Image Themes
Image8-bit Fantasy (TheDewd) [Resource]
Image

ImageRacecar 1 (TheDewd) [Resource]
Image

ImageRacecar 2 (TheDewd) [Resource]
Image

ImageBulldozer Color (Original)
Image

ImageBulldozer Monochrome (Original)
Image

ImageBulldozer Monochrome (TheDewd)
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

ImageMonochrome Black (TheDewd) *Transparent - Use your own background color!
Image

ImageMonochrome White (TheDewd) *Transparent - Use your own background color!
Image

ImageMonochrome Black (Inverted) (TheDewd) *Transparent - Use your own background color!
Image

Image Submit your themes to have them featured here! Image
Last edited by TheDewd on 14 Aug 2018, 15:41, edited 69 times in total.
User avatar
Nextron
Posts: 1166
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:
The more I know:
The more I know,
I know nothing.
User avatar
TheDewd
Posts: 979
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.
User avatar
jeeswg
Posts: 4784
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: 979
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.
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: 204
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: 1212
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: 3095
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: 3063
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: 979
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.
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: 979
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
just me
Posts: 5431
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: 421
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: 979
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!
burque505
Posts: 517
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: 357
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: Asmodeus, Crimson7, Qriist and 25 guests