[GAME] Bulldozer

Post your working scripts, libraries and tools
User avatar
TheDewd
Posts: 959
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).

The object of the game is to push all of the rocks to the targets.

Enjoy all 180 levels!


Screenshots
Image

Screenshot (Level Select)

Screenshot (About)


Download
Revision 6 (2018-06-18)

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



Previous version can be found at the following:
https://github.com/westoncampbell/BulldozerAHK/tree/master/Releases
Last edited by TheDewd on 18 Jun 2018, 12:50, edited 19 times in total.
User avatar
Nextron
Posts: 1149
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: 959
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: 4595
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: 959
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: 190
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: 1193
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: 3033
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: 2966
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: 491
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: 959
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: 491
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: 959
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: 5425
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: 403
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: 959
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: 497
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: 355
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: No registered users and 10 guests