create account

HTML5 Game Development with Phaser Lesson 8 - Randomly generating enemeies by magicmonk

View this thread on: hive.blogpeakd.comecency.com
· @magicmonk · (edited)
$7.55
HTML5 Game Development with Phaser Lesson 8 - Randomly generating enemeies
#### 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/>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authormagicmonk
permlinkhtml5-game-development-with-phaser-lesson-8-randomly-generating-enemeies
categoryutopian-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}}
created2018-01-27 11:43:06
last_update2018-01-27 18:23:57
depth0
children4
last_payout2018-02-03 11:43:06
cashout_time1969-12-31 23:59:59
total_payout_value6.077 HBD
curator_payout_value1.475 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,040
author_reputation1,102,191,972,451,682
root_title"HTML5 Game Development with Phaser Lesson 8 - Randomly generating enemeies"
beneficiaries
0.
accountutopian.pay
weight2,500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id32,718,041
net_rshares1,104,508,220,614
author_curate_reward""
vote details (54)
@amosbastian ·
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)**
properties (22)
authoramosbastian
permlinkre-magicmonk-html5-game-development-with-phaser-lesson-8-randomly-generating-enemeies-20180127t182656511z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2018-01-27 18:26:57
last_update2018-01-27 18:26:57
depth1
children1
last_payout2018-02-03 18:26:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length407
author_reputation174,473,586,900,705
root_title"HTML5 Game Development with Phaser Lesson 8 - Randomly generating enemeies"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id32,803,285
net_rshares0
@magicmonk ·
thanks
properties (22)
authormagicmonk
permlinkre-amosbastian-re-magicmonk-html5-game-development-with-phaser-lesson-8-randomly-generating-enemeies-20180128t100543110z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-01-28 10:05:45
last_update2018-01-28 10:05:45
depth2
children0
last_payout2018-02-04 10:05:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length6
author_reputation1,102,191,972,451,682
root_title"HTML5 Game Development with Phaser Lesson 8 - Randomly generating enemeies"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id32,964,877
net_rshares0
@garokee ·
$0.02
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 :)
👍  
properties (23)
authorgarokee
permlinkre-magicmonk-html5-game-development-with-phaser-lesson-8-randomly-generating-enemeies-20180127t171840461z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"users":["magicmonk"],"app":"steemit/0.1"}
created2018-01-27 17:18:36
last_update2018-01-27 17:18:36
depth1
children0
last_payout2018-02-03 17:18:36
cashout_time1969-12-31 23:59:59
total_payout_value0.018 HBD
curator_payout_value0.004 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length350
author_reputation774,034,998,212
root_title"HTML5 Game Development with Phaser Lesson 8 - Randomly generating enemeies"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id32,789,284
net_rshares3,105,226,540
author_curate_reward""
vote details (1)
@sequentialvibe ·
Thanks for posting these! These tutorials explain a lot about the games of my wasted youth!
👍  
properties (23)
authorsequentialvibe
permlinkre-magicmonk-html5-game-development-with-phaser-lesson-8-randomly-generating-enemeies-20180127t132114638z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-01-27 13:21:18
last_update2018-01-27 13:21:18
depth1
children0
last_payout2018-02-03 13:21:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length91
author_reputation57,998,358,747,720
root_title"HTML5 Game Development with Phaser Lesson 8 - Randomly generating enemeies"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id32,738,384
net_rshares2,070,151,026
author_curate_reward""
vote details (1)