Uploaded January 2024 | Updated November 2026, 17 hours ago
Every mobile game needs to have 3 main elements: fullscreen, touch controls & optimized code, that runs well on a variety of devices. We will do all of that, and we will 1) build a BLANK REUSABLE BOILERPLATE project and 2) in the advanced section we will add graphics, animation & sounds to turn it into an ANIMATED SPACE HORROR game. Scary noises included.
OBJECT POOL DESIGN PATTERN allows us to reuse objects, rather than constantly creating new ones and destroying the old ones. This approach will improve the performance of the codebase, because it solves problems with automatic memory allocation and garbage collection processes.
STATE DESIGN PATTERN allows us to separate behaviors of the object into separate code blocks, giving us the ultimate control over each individual state, while at the same time making the code easier to read, maintain and debug.
Let's learn how to implement both of these design patterns in a real project using JavaScript & HTML Canvas.
๐ฝ Download Project Art assets ๐ฝ
Background horizontal: frankslaboratory.co.uk/downloads/136/background1920x1080.png
Background vertical: frankslaboratory.co.uk/downloads/136/background1080x1920.png
Simple crew member: frankslaboratory.co.uk/downloads/136/crew.png
Beetlemorph 100x100px frames: frankslaboratory.co.uk/downloads/136/beetlemorph100x100.png
Lobstermorph 100x100px frames: frankslaboratory.co.uk/downloads/136/lobstermorph100x100.png
Crew members sprite sheet: frankslaboratory.co.uk/downloads/136/crewSprite.png
Phantommorph 100x100px frames: frankslaboratory.co.uk/downloads/136/phantommorph100x100.png
Sounds (right click and 'Save link as'):
New game: frankslaboratory.co.uk/downloads/136/newgame.mp3
Boom 1: frankslaboratory.co.uk/downloads/136/boom1.mp3
Slide: frankslaboratory.co.uk/downloads/136/slide.mp3
Boom 2: frankslaboratory.co.uk/downloads/136/boom2.mp3
Boom 3: frankslaboratory.co.uk/downloads/136/boom3.mp3
Boom 4: frankslaboratory.co.uk/downloads/136/boom4.mp3
Win: frankslaboratory.co.uk/downloads/136/win.mp3
Lose: frankslaboratory.co.uk/downloads/136/lose.mp3
Scream: frankslaboratory.co.uk/downloads/136/scream.mp3
(if you can't download the files, try to use a different browser or VPN to change your country, also leave a comment so I can fix it)
Playlist: youtube.com/playlist?list=PLYElE_rzEw_tw6scwjv96oEABmnMSQoQW
๐ Tutorial Contents ๐
Beginner project:
00:00:00 Build mobile games JavaScript and HTML Canvas.
00:01:08 Project setup
00:03:05 Make everything responsive
00:09:20 Enemy class
00:17:19 Object pool design pattern
00:20:55 Periodic triggers
00:27:45 Mouse controls
00:29:15 Collision detection
00:37:05 Touch events
00:38:43 Game text
00:45:46 Start & restart
00:49:21 Fullscreen games
Advanced project:
00:53:29 Simple crew members
00:54:59 Simple enemy type
00:59:23 Sprite animation
01:03:44 Animation timing
01:07:52 Debug mode
01:10:01 Enemy variety
01:14:31 Randomized space crew
01:18:18 State management in games
01:22:46 State design pattern
01:38:10 Sounds and final details
Source code:
Checkpoint 1 (00:16:21): frankslaboratory.co.uk/downloads/136/source_code_1.zip
Checkpoint 2 (00:52:46): frankslaboratory.co.uk/downloads/136/source_code_2.zip
If you want to SUPPORT me you can use the links below and get some one my EXTENDED classes! :)
udemy.com/course/learn-creative-coding-with-vanilla-javascript/?referralCode=7C560D4661C5C59262BB
udemy.com/course/learn-game-development-with-javascript/?referralCode=69874A38D543D7F510F2
udemy.com/course/creative-coding-deep-dive-for-beginners/?referralCode=F43E8FCE60957A64DF4A
udemy.com/course/build-animated-physics-game-with-javascript/?referralCode=B4482AF631243104650B
udemy.com/course/learn-html-canvas-pixels-particles-physics/?referralCode=F7977062A4BC964A1F5E
udemy.com/course/remake-retro-games-with-javascript/?referralCode=2ACCA21F16FE78E631F7
udemy.com/course/learn-html-canvas-advanced-text-effects/?referralCode=4C5821D2D04048CC4A01
Get Skillshare FREE for 1 month:
skillshare.com/en/r/profile/Frank-Dvorak/507488567?gr_tch_ref=on&gr_trp=on
The description of this video may contain affiliate links, which means that if you buy one of the products that I recommend, I'll receive a small commission without any additional cost for you. This helps to support the channel and allows me to continue making videos like this. Thank you for the support!
#frankslaboratory
Every mobile game needs to have 3 main elements: fullscreen, touch controls & optimized code, that runs well on a variety of devices. We will do all of that, and we will 1) build a BLANK REUSABLE BOILERPLATE project and 2) in the advanced section we will add graphics, animation & sounds to turn it into an ANIMATED SPACE HORROR game. Scary noises included.
OBJECT POOL DESIGN PATTERN allows us to reuse objects, rather than constantly creating new ones and destroying the old ones. This approach will improve the performance of the codebase, because it solves problems with automatic memory allocation and garbage collection processes.
STATE DESIGN PATTERN allows us to separate behaviors of the object into separate code blocks, giving us the ultimate control over each individual state, while at the same time making the code easier to read, maintain and debug.
Let's learn how to implement both of these design patterns in a real project using JavaScript & HTML Canvas.
๐ฝ Download Project Art assets ๐ฝ
Background horizontal: frankslaboratory.co.uk/downloads/136/background1920x1080.png
Background vertical: frankslaboratory.co.uk/downloads/136/background1080x1920.png
Simple crew member: frankslaboratory.co.uk/downloads/136/crew.png
Beetlemorph 100x100px frames: frankslaboratory.co.uk/downloads/136/beetlemorph100x100.png
Lobstermorph 100x100px frames: frankslaboratory.co.uk/downloads/136/lobstermorph100x100.png
Crew members sprite sheet: frankslaboratory.co.uk/downloads/136/crewSprite.png
Phantommorph 100x100px frames: frankslaboratory.co.uk/downloads/136/phantommorph100x100.png
Sounds (right click and 'Save link as'):
New game: frankslaboratory.co.uk/downloads/136/newgame.mp3
Boom 1: frankslaboratory.co.uk/downloads/136/boom1.mp3
Slide: frankslaboratory.co.uk/downloads/136/slide.mp3
Boom 2: frankslaboratory.co.uk/downloads/136/boom2.mp3
Boom 3: frankslaboratory.co.uk/downloads/136/boom3.mp3
Boom 4: frankslaboratory.co.uk/downloads/136/boom4.mp3
Win: frankslaboratory.co.uk/downloads/136/win.mp3
Lose: frankslaboratory.co.uk/downloads/136/lose.mp3
Scream: frankslaboratory.co.uk/downloads/136/scream.mp3
(if you can't download the files, try to use a different browser or VPN to change your country, also leave a comment so I can fix it)
Playlist: youtube.com/playlist?list=PLYElE_rzEw_tw6scwjv96oEABmnMSQoQW
๐ Tutorial Contents ๐
Beginner project:
00:00:00 Build mobile games JavaScript and HTML Canvas.
00:01:08 Project setup
00:03:05 Make everything responsive
00:09:20 Enemy class
00:17:19 Object pool design pattern
00:20:55 Periodic triggers
00:27:45 Mouse controls
00:29:15 Collision detection
00:37:05 Touch events
00:38:43 Game text
00:45:46 Start & restart
00:49:21 Fullscreen games
Advanced project:
00:53:29 Simple crew members
00:54:59 Simple enemy type
00:59:23 Sprite animation
01:03:44 Animation timing
01:07:52 Debug mode
01:10:01 Enemy variety
01:14:31 Randomized space crew
01:18:18 State management in games
01:22:46 State design pattern
01:38:10 Sounds and final details
Source code:
Checkpoint 1 (00:16:21): frankslaboratory.co.uk/downloads/136/source_code_1.zip
Checkpoint 2 (00:52:46): frankslaboratory.co.uk/downloads/136/source_code_2.zip
If you want to SUPPORT me you can use the links below and get some one my EXTENDED classes! :)
udemy.com/course/learn-creative-coding-with-vanilla-javascript/?referralCode=7C560D4661C5C59262BB
udemy.com/course/learn-game-development-with-javascript/?referralCode=69874A38D543D7F510F2
udemy.com/course/creative-coding-deep-dive-for-beginners/?referralCode=F43E8FCE60957A64DF4A
udemy.com/course/build-animated-physics-game-with-javascript/?referralCode=B4482AF631243104650B
udemy.com/course/learn-html-canvas-pixels-particles-physics/?referralCode=F7977062A4BC964A1F5E
udemy.com/course/remake-retro-games-with-javascript/?referralCode=2ACCA21F16FE78E631F7
udemy.com/course/learn-html-canvas-advanced-text-effects/?referralCode=4C5821D2D04048CC4A01
Get Skillshare FREE for 1 month:
skillshare.com/en/r/profile/Frank-Dvorak/507488567?gr_tch_ref=on&gr_trp=on
The description of this video may contain affiliate links, which means that if you buy one of the products that I recommend, I'll receive a small commission without any additional cost for you. This helps to support the channel and allows me to continue making videos like this. Thank you for the support!
#frankslaboratory






![Pure CSS Morph Effect | Awesome UI Hover Animations with CSS Clip Path Property
Today I will show you how to use CSS clip path property to create awesome morph effect transition animations on hover.
You can use this effect to design your website or to practice advanced CSS techniques even a beginner can learn. More tutorials, animations, effects and CSS tricks coming soon, please like and subscribe! :]
https://bennettfeely.com/clippy/
http://www.cssplant.com/clip-path-generator
Clip paths - basic fox:
clip-path: polygon(277px 16px,260px 42px,238px 43px,226px 21px,193px 6px,136px 0px,152px 50px,184px 79px,116px 154px,160px 138px,138px 178px,177px 172px,159px 234px,166px 271px,170px 308px,152px 391px,137px 420px,197px 417px,195px 388px,213px 337px,217px 380px,218px 418px,264px 419px,251px 393px,286px 391px,272px 419px,288px 419px,368px 417px,419px 369px,451px 283px,449px 190px,481px 176px,549px 184px,581px 213px,631px 208px,618px 115px,565px 60px,523px 42px,415px 27px,350px 80px,359px 224px,382px 302px,355px 381px,369px 315px,356px 242px,313px 167px,341px 182px,327px 136px,365px 145px,306px 78px,337px 53px,351px 26px,358px 5px,308px 7px);
Hover 1:
clip-path: polygon(277px 16px,260px 42px,238px 43px,226px 21px,193px 6px,136px 0px,152px 50px,184px 79px,116px 154px,160px 138px,138px 178px,177px 172px,159px 234px,166px 271px,170px 308px,152px 391px,137px 420px,197px 417px,195px 388px,213px 337px,217px 380px,218px 418px,264px 419px,251px 393px,286px 391px,272px 419px,288px 419px,368px 417px,419px 369px,451px 283px,449px 190px,481px 176px,524px 198px,546px 254px,596px 221px,583px 121px,546px 59px,473px 25px,387px 17px,328px 77px,359px 224px,382px 302px,355px 381px,369px 315px,356px 242px,313px 167px,341px 182px,327px 136px,365px 145px,306px 78px,337px 53px,351px 26px,358px 5px,308px 7px);
Hover 2:
clip-path: polygon(273px 16px,260px 42px,238px 43px,234px 22px,220px 2px,198px 7px,190px 37px,184px 79px,159px 102px,93px 145px,125px 192px,192px 181px,174px 237px,179px 274px,180px 314px,156px 369px,148px 407px,185px 407px,188px 361px,213px 337px,217px 380px,218px 418px,264px 419px,251px 393px,286px 391px,272px 419px,288px 419px,368px 417px,419px 369px,451px 283px,465px 236px,490px 201px,517px 260px,582px 283px,630px 234px,581px 197px,584px 85px,521px 14px,425px 8px,373px 87px,359px 224px,382px 302px,355px 381px,369px 315px,356px 242px,303px 164px,335px 159px,299px 131px,333px 132px,306px 78px,323px 39px,330px 18px,327px 4px,303px 5px);
Hover 3:
clip-path: polygon(277px 16px,260px 42px,238px 43px,226px 21px,193px 6px,136px 0px,152px 50px,184px 79px,116px 154px,160px 138px,138px 178px,177px 172px,159px 234px,166px 271px,170px 308px,145px 345px,143px 392px,183px 394px,173px 362px,213px 337px,217px 380px,218px 418px,264px 419px,251px 393px,286px 391px,272px 419px,288px 419px,368px 417px,419px 369px,451px 283px,449px 190px,481px 176px,524px 198px,546px 254px,596px 221px,583px 121px,546px 59px,473px 25px,387px 17px,328px 77px,359px 224px,382px 302px,355px 381px,369px 315px,356px 242px,313px 167px,341px 182px,327px 136px,365px 145px,306px 78px,337px 53px,351px 26px,358px 5px,308px 7px);
Hover 4:
clip-path: polygon(273px 16px,260px 42px,238px 43px,234px 22px,220px 2px,198px 7px,190px 37px,184px 79px,159px 102px,93px 145px,125px 192px,192px 181px,174px 237px,179px 274px,187px 324px,171px 367px,174px 405px,205px 408px,201px 372px,213px 337px,217px 380px,218px 418px,264px 419px,251px 393px,286px 391px,272px 419px,288px 419px,368px 417px,419px 369px,451px 283px,465px 236px,490px 201px,517px 260px,554px 332px,597px 278px,591px 205px,608px 86px,545px 16px,448px 2px,395px 67px,369px 164px,394px 299px,355px 381px,369px 315px,356px 242px,303px 164px,335px 159px,299px 131px,333px 132px,306px 78px,323px 39px,330px 18px,327px 4px,303px 5px);
Music:
Agressive Dubstep by Masteck Media | https://soundcloud.com/masteck_media
Music promoted by https://www.free-stock-music.com
Creative Commons Attribution-ShareAlike 3.0 Unported
https://creativecommons.org/licenses/by-sa/3.0/deed.en_US Pure CSS Morph Effect | Awesome UI Hover Animations with CSS Clip Path Property](https://i.ytimg.com/vi/AaTvB4uHhxc/mqdefault.jpg)



