January 21, 2021, 02:24:10 AM

Author Topic: 2D Turrets and Zombie hordes in Random maps.  (Read 1338 times)

Offline Pakz

  • Full Member
  • ***
  • Posts: 195
    • My homepage
2D Turrets and Zombie hordes in Random maps.
« on: August 03, 2017, 07:01:43 PM »
I spend about a day working on this. I used some various older code and tried to make it work, which took a while(bugs and tweaking)

A random map is created of random width/height and filled with a number of turret. Zombies are spawned into the map and as times goes by more and more. The turrets turn towards the nearest zombie and shoot. They also shoot an invisible bullet to see if it hits a wall or not. They have random properties like turnspeed and reload speed.

I made no attempt to create graphics for it. I might put the code in a mojo3d project in the future.

The code is on my github (pakz001) in the monkeyx repository or on my monkey step by step blog.

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 2587
  • I mostly code at night... Mostly.
    • SyntaxBomb - Indie Coders
Re: 2D Turrets and Zombie hordes in Random maps.
« Reply #1 on: August 03, 2017, 10:59:27 PM »
Very nice, it's pretty hypnotic just watching it. Kinda reminds me of the turrets blasting all the aliens in Aliens Special Edition :)
Mac mini ( 2018 / 2020 ), 3 GHz 6-Core Intel Core i5, 16 GB 2667 MHz DDR4, 1TB NVMe, eGPU Radeon Pro 580 8 GB, LG Ultragear 27GL83A-B 27 Inch
Commodore VIC-20, 1.1Mhz MOS 6502 CPU, 5KB RAM, VIC ( 6560 ) GPU

Until the next time...


SimplePortal 2.3.6 © 2008-2014, SimplePortal