Creating a Simple Game Discussion

#1

Welcome to the discussion about this lecture. Here you can ask questions or post feedback about this specific lecture.

1 Like

#2

Excellent course so far, love the phaser library its fun!!!

I got lazy about typing that out over and over… but realized a loop works to keep me lazy.

for(i=10; i > 0; i–){
this.load.image(“run_frame_”+i, “assets/knight/run/Run (”+i+").png");
}
for(i=10; i > 0; i–){
this.load.image(“idle_frame_”+i, “assets/knight/idle/Idle (”+i+").png");
}

2 Likes

#3

nice, great idea, well done

1 Like

#4

its starting to get exciting here onwards!!

2 Likes

#5

Just finished the non blockchain gaming section… Excellent course so far…

I added in some other extra stuff today to make it better with some in game music… Death music when you fall off the platforms and a few other features to round it out before continuing on to the blockchain stuff… posted it up here with these updates… http://cclabs.io/knight

I also noticed an interesting game hack with the current code… If you jump off a bouncing BTC coin you can catch extra air and bounce off of it as if it were the ground…

2 Likes

#6

Hey guys, amazing to hear that you like the course, please leave a review if you have time, it helps a lot: https://www.facebook.com/pg/ivanontech/reviews/?ref=page_internal

0 Likes

#7

For those PC users who cannot open the server by using the command in the video, you can try
python -m http.server 8000

1 Like

#8

When you collect the first coin, the score remains Zero. Only after collecting a second coin it starts counting. score++ needs to come before the setText.

          score++;
          scoreText.setText("Score: " + score);
0 Likes

#9

If you have node.js you can simply run it by typing:

http-server

If you dont have the http-server package, First run:

npm install -g http-server
1 Like

#10

Thanks man! you sieved my day ^^

0 Likes

#11

@ivan I am a bit confused on how to use the api documentation. When I want to alter my collision box of the character I am looking up in the docu what the parameters are of the “knight.body.setSize(400,600,100,100);”

The docu says this (type Phaser.Physics.Arcade.Body) and only 3 params:

setSize( [width] [, height] [, center])

What am I missing?

1 Like

#12

I tried this too but it is not working for me. It says “unexpected token” right after the first “{”

0 Likes

#15

You could also use VSCode and use the integrated Live Server (right click index.html & select: open with Live Server) - or use a similar addon if you prefer to use Atom

0 Likes