#### What Will I Learn? - You will learn how to generate enemies at random locations on the screen. - You will learn how to generate enemies with a consistent time gap in between each enemy. - You will learn how to prevent enemies being generated at the same location as the player. - You will learn how to check for collisions between any of the enemies and the bullets. #### Requirements - Any text editor, preferably one with syntax highlighting for HTML & CSS (e.g. Adobe Dreamweaver, Notepad ++). - Any web browser (preferably Google Chrome). - I used the Windows operating system but you should be able to do this in Mac. - You can test your files locally or you can upload to a server and test. If you want to upload to a server, you will need Web hosting as well as an FTP client to upload files (Adobe Dreamweaver has FTP functionality built in). - You need to have downloaded Phaser (this was explained in lesson 1). #### Difficulty - Intermediate You should already have some understanding of Javascript as the Phaser library is built on Javascript. You should already have done the previous tutorials in Phaser. #### Description In this series of lessons, we are going to code our first HTML5 / Javascript game, using the Phaser library. The source code of this lesson (and subsequent lessons as they are uploaded) can be viewed on Github at: https://github.com/Bulletproofmonk/PhaserGameTutorial #### Video Tutorial https://youtu.be/-YChVEIW10U #### Curriculum <ul> <li><a href="https://utopian.io/utopian-io/@magicmonk/html5-game-development-with-phaser-lesson-1-setting-up-game-dimensions" rel="noopener">Phaser Lesson 1: Setting up Game Dimensions</a></li> <li><a href="https://utopian.io/utopian-io/@magicmonk/html5-game-development-with-phaser-lesson-2-importing-sprites" rel="noopener">Phaser Lesson 2: Importing Sprites</a></li> <li><a href="https://utopian.io/utopian-io/@magicmonk/html5-game-development-with-phaser-lesson-3-moving-object-with-arrow-keys" rel="noopener">Phaser Lesson 3: Moving object with arrow keys</a></li> <li><a href="https://utopian.io/utopian-io/@magicmonk/html5-game-development-with-phaser-lesson-4-animation-with-spritesheets" rel="noopener">Phaser Lesson 4: Animation with spritesheets</a></li> <li><a href="https://utopian.io/utopian-io/@magicmonk/html5-game-development-with-phaser-lesson-5-collision-detection-with-arcade-physics" rel="noopener">Phaser Lesson 5: Collision Detection with Arcade Physics</a></li> <li><a href="https://utopian.io/utopian-io/@magicmonk/html5-game-development-with-phaser-lesson-6-groups-of-objects" rel="noopener">Phaser Lesson 6: Groups of Objects</a></li> <li><a href="https://utopian.io/utopian-io/@magicmonk/html5-game-development-with-phaser-lesson-7-firing-bullets" rel="noopener">Phaser Lesson 7: Firing bullets</a></li> </ul> <br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@magicmonk/html5-game-development-with-phaser-lesson-8-randomly-generating-enemeies">Utopian.io - Rewarding Open Source Contributors</a></em><hr/>
author | magicmonk | ||||||
---|---|---|---|---|---|---|---|
permlink | html5-game-development-with-phaser-lesson-8-randomly-generating-enemeies | ||||||
category | utopian-io | ||||||
json_metadata | {"community":"utopian","app":"utopian/1.0.0","format":"markdown","repository":{"id":9393759,"name":"phaser","full_name":"photonstorm/phaser","html_url":"https://github.com/photonstorm/phaser","fork":false,"owner":{"login":"photonstorm"}},"pullRequests":[],"platform":"github","type":"video-tutorials","tags":["utopian-io","tutorial","video","gamedev","education"],"users":["magicmonk"],"moderator":{"account":"amosbastian","time":"2018-01-27T18:23:58.449Z","flagged":true,"reviewed":false,"pending":false}} | ||||||
created | 2018-01-27 11:43:06 | ||||||
last_update | 2018-01-27 18:23:57 | ||||||
depth | 0 | ||||||
children | 4 | ||||||
last_payout | 2018-02-03 11:43:06 | ||||||
cashout_time | 1969-12-31 23:59:59 | ||||||
total_payout_value | 6.077 HBD | ||||||
curator_payout_value | 1.475 HBD | ||||||
pending_payout_value | 0.000 HBD | ||||||
promoted | 0.000 HBD | ||||||
body_length | 3,040 | ||||||
author_reputation | 1,102,191,972,451,682 | ||||||
root_title | "HTML5 Game Development with Phaser Lesson 8 - Randomly generating enemeies" | ||||||
beneficiaries |
| ||||||
max_accepted_payout | 1,000,000.000 HBD | ||||||
percent_hbd | 10,000 | ||||||
post_id | 32,718,041 | ||||||
net_rshares | 1,104,508,220,614 | ||||||
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
spiry-btc | 0 | 411,510,805 | 25% | ||
ausbitbank | 0 | 166,534,514,512 | 1% | ||
fundurian | 0 | 48,428,374,448 | 31% | ||
joythewanderer | 0 | 183,773,115,929 | 40% | ||
magicmonk | 0 | 140,673,384,842 | 100% | ||
justyy | 0 | 133,615,710,065 | 23.09% | ||
dapeng | 0 | 4,346,963,084 | 2% | ||
oleg326756 | 0 | 1,005,428,199 | 1.86% | ||
happyukgo | 0 | 435,776,137 | 23.09% | ||
bring | 0 | 1,873,120,070 | 100% | ||
lydiachan | 0 | 13,434,316,732 | 40% | ||
sequentialvibe | 0 | 1,035,755,335 | 1% | ||
world-travel-pro | 0 | 23,766,947,416 | 35% | ||
teamaustralia | 0 | 3,443,362,438 | 9% | ||
centerlink | 0 | 36,716,441,872 | 10% | ||
susanli3769 | 0 | 68,363,634,604 | 100% | ||
visky | 0 | 92,703,045 | 100% | ||
travelgirl | 0 | 34,950,714,160 | 30% | ||
fisnikk | 0 | 614,704,838 | 100% | ||
ratticus | 0 | 4,437,582,463 | 12% | ||
robinlee | 0 | 110,543,628 | 23.09% | ||
catwomanteresa | 0 | 30,898,890,192 | 40% | ||
ety001 | 0 | 780,017,862 | 23.09% | ||
rainyapril | 0 | 135,072,860 | 23.09% | ||
liangfengyouren | 0 | 1,517,711,711 | 50% | ||
shengjian | 0 | 5,414,005,331 | 23.09% | ||
kangnajiang | 0 | 121,218,865 | 23.09% | ||
geass | 0 | 142,690,861 | 23.09% | ||
mrsquiggle | 0 | 51,379,030,434 | 15% | ||
superbing | 0 | 1,976,487,914 | 23.09% | ||
dailyfortune | 0 | 1,461,792,602 | 23.09% | ||
dailystats | 0 | 2,777,353,670 | 23.09% | ||
qurator | 0 | 103,532,035,128 | 3.1% | ||
juicy-shark | 0 | 5,422,968,275 | 50% | ||
jianan | 0 | 129,242,746 | 23.09% | ||
daxiang | 0 | 53,722,399 | 23.09% | ||
cnsteem | 0 | 253,049,151 | 1% | ||
cryptwo | 0 | 7,190,708,216 | 70% | ||
ewq | 0 | 923,608,482 | 100% | ||
hdmed.dev | 0 | 168,946,232 | 100% | ||
moobear | 0 | 781,331,307 | 23.09% | ||
maiyude | 0 | 5,577,685,526 | 23.09% | ||
nean | 0 | 129,309,742 | 23.09% | ||
liuye | 0 | 90,567,987 | 23.09% | ||
foodielifestyle | 0 | 330,566,853 | 23.09% | ||
woolfe19861008 | 0 | 107,561,856 | 23.09% | ||
dailychina | 0 | 2,037,404,172 | 23.09% | ||
cutemachine | 0 | 6,806,092,801 | 100% | ||
chelsea.bear | 0 | 2,079,441,926 | 5% | ||
vincenthan | 0 | 129,510,947 | 23.09% | ||
dongfengman | 0 | 116,757,047 | 23.09% | ||
serenazz | 0 | 3,519,701,408 | 23.09% | ||
yedda | 0 | 122,932,746 | 23.09% | ||
shentrading | 0 | 336,198,743 | 23.09% |
Your contribution cannot be approved because it does not follow the [Utopian Rules](https://utopian.io/rules). >Contents already shared anywhere else may still be rejected if submitted in Utopian. Utopian.io is a place for new and original content and your videos are from August, 2015. You can contact us on [Discord](https://discord.gg/uTyJkNm). **[[utopian-moderator]](https://utopian.io/moderators)**
author | amosbastian |
---|---|
permlink | re-magicmonk-html5-game-development-with-phaser-lesson-8-randomly-generating-enemeies-20180127t182656511z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"} |
created | 2018-01-27 18:26:57 |
last_update | 2018-01-27 18:26:57 |
depth | 1 |
children | 1 |
last_payout | 2018-02-03 18:26:57 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 407 |
author_reputation | 174,473,586,900,705 |
root_title | "HTML5 Game Development with Phaser Lesson 8 - Randomly generating enemeies" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 32,803,285 |
net_rshares | 0 |
thanks
author | magicmonk |
---|---|
permlink | re-amosbastian-re-magicmonk-html5-game-development-with-phaser-lesson-8-randomly-generating-enemeies-20180128t100543110z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"app":"steemit/0.1"} |
created | 2018-01-28 10:05:45 |
last_update | 2018-01-28 10:05:45 |
depth | 2 |
children | 0 |
last_payout | 2018-02-04 10:05:45 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 6 |
author_reputation | 1,102,191,972,451,682 |
root_title | "HTML5 Game Development with Phaser Lesson 8 - Randomly generating enemeies" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 32,964,877 |
net_rshares | 0 |
An amazing video you made @magicmonk and I appreciate it a lot that you have shared with us your knowledge about HTML5. This is very helpful for developers who are a starter in making games using HTML5. It's actually a very good post and you are doing great on the video tutorial. Thanks for sharing this information with us. Keep up the good work :)
author | garokee |
---|---|
permlink | re-magicmonk-html5-game-development-with-phaser-lesson-8-randomly-generating-enemeies-20180127t171840461z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"users":["magicmonk"],"app":"steemit/0.1"} |
created | 2018-01-27 17:18:36 |
last_update | 2018-01-27 17:18:36 |
depth | 1 |
children | 0 |
last_payout | 2018-02-03 17:18:36 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.018 HBD |
curator_payout_value | 0.004 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 350 |
author_reputation | 774,034,998,212 |
root_title | "HTML5 Game Development with Phaser Lesson 8 - Randomly generating enemeies" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 32,789,284 |
net_rshares | 3,105,226,540 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
magicmonk | 0 | 3,105,226,540 | 2% |
Thanks for posting these! These tutorials explain a lot about the games of my wasted youth!
author | sequentialvibe |
---|---|
permlink | re-magicmonk-html5-game-development-with-phaser-lesson-8-randomly-generating-enemeies-20180127t132114638z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"app":"steemit/0.1"} |
created | 2018-01-27 13:21:18 |
last_update | 2018-01-27 13:21:18 |
depth | 1 |
children | 0 |
last_payout | 2018-02-03 13:21:18 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 91 |
author_reputation | 57,998,358,747,720 |
root_title | "HTML5 Game Development with Phaser Lesson 8 - Randomly generating enemeies" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 32,738,384 |
net_rshares | 2,070,151,026 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
magicmonk | 0 | 2,070,151,026 | 1% |