Slide 1

Slide 1 text

PIXELS & TACTICS @amfeng

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

I REALLY LIKE (J-) RPGS

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

WHAT GOES INTO A GAME?

Slide 12

Slide 12 text

DESIGN PATTERNS

Slide 13

Slide 13 text

COMPOSE EVERYTHING

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

Crafty.c("Walkable", { Walkable: function(speed) { this.addComponent("Collision"); this.bind("EnterFrame", function() { if (paused()) return; if (obstacle() || outOfBounds()) return; // Move the sprite this.playAnimation(this.direction); this.move(this.direction, speed); })

Slide 16

Slide 16 text

Crafty.c("StrollingEntity", { StrollingEntity: function() { this.direction = randomDirection(); this.bind("EnterFrame", function() { // Possibly change direction if (chanceToSwitchDirection()) { this.direction = randomDirection(); } } } });

Slide 17

Slide 17 text

spawnedMonster .Walkable(5) .StrollingEntity() .Battleable()

Slide 18

Slide 18 text

Crafty.c("AggroEntity", { AggroEntity: function(player) { this.direction = randomDirection(); this.bind("EnterFrame", function() { if (playerInRange()) { this.direction = toPlayer(player); } else if (chanceToSwitchDirection()) { // Change direction this.direction = randomDirection(); } } } });

Slide 19

Slide 19 text

aggroMonster .Walkable(10) .AggroEntity(player) .Battleable()

Slide 20

Slide 20 text

grandmaNPC .Walkable(2) .StrollingEntity() .Interactable(dialog)

Slide 21

Slide 21 text

player .Walkable(5) .PlayerControl()

Slide 22

Slide 22 text

*-FACTORIES

Slide 23

Slide 23 text

var Fox = function() { this.hp = 10; this.damage = 10; } var WaterFairy = function() { this.hp = 4; this.damage = 6; } var fox = new Fox(); var waterFairy = new WaterFairy();

Slide 24

Slide 24 text

var Monster = function(attrs) { // Set attrs } var fox = new Monster({ hp: 4, damage: 6 });

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

var MonsterFactory = function(csv) { this.data = createMap(csv); } MonsterFactory.prototype.create(type) { var attrs = this.data[type]; return new Monster(attrs); }

Slide 27

Slide 27 text

// During game initialization factory = new MonsterFactory(csv); // And then later factory.create("fox");

Slide 28

Slide 28 text

SEPARATE VIEWS FROM LOGIC

Slide 29

Slide 29 text

THINGS I LEARNED (AND I AM STILL LEARNING)

Slide 30

Slide 30 text

...ASSETS ARE HARD

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

(https://opengameart.org)

Slide 36

Slide 36 text

(https://gamedevmarket.net)

Slide 37

Slide 37 text

(http://pixanna.nl/products)

Slide 38

Slide 38 text

GAME DEV IS INFINITE

Slide 39

Slide 39 text

THANK YOU! LMK IF YOU END UP BUILDING A GAME (: @amfeng @jamescshieh