Jump to content

School Project , new to Phaser


Yupoong
 Share

Recommended Posts

Dear readers,

I have a problem, well not a problem, but I need help. At first I want to say that English is not my main language and if I make mistakes you should correct me.

I'm also new to phaser and programming, but I am willing to learn.

So for school i need to make a game linked with a database (login, score, money) on a website.

What I was thinking is some kind of Plants VS Zombies, but then with 1shooter at the bottom, move him sideways to kill the zombies and try to keep them away from the under border.

What I have already is the background, the moving "soldier" and that he can shoot. I also have an enemy sprite but for some way he doesn't want to load ... .

I don't know how to spawn the enemies in like 5 /6 lines from top. And that they will walk down, like LEVEL1: kill 5 zombies LEVEL2: kill 10 , and each level you earn money for more damage, but the zombies will become better and better.

So it would be a great help if somebody could explain this for me, not only in code but also in words, like I said i'm new in coding and want to learn. 

 

In the attachment you will find a zip of my game, my main language is DUTCH, so the commentaries are in DUTCH, but my code is in English. If i need to explain something i wrote, just ask :)!

 

Thanks for everyone who wants to help! I'll try to answer as soon as possible !

STAY CODING AND LEARNING !!

PhaserCode.rar

Link to comment
Share on other sites

Are you looking to do something like a vertical shooter but lock the y axis? When you say lines, are you talking about pixels or some arbitrary distance based on something? Typically I would suggest spawning them off screen and then bringing them into the screen to prevent popping(sprites just magically popping onto the screen). At that point you can just start their path to the player. As far as connecting to a backend. I am going to be releasing a plugin in the next couple days to help with talking to a RESTful API after I get a few things cleaned up and commented.

Link to comment
Share on other sites

Yeah I like what you suggest there, but how can they come in the screen? by putting the positon of Y higher? And i don't really know what you mean with the restful API.

And indeed the shooter already shoots to the top, there are 3 enemies that are on position, but not when a timer starts or something, and my collision doesn't work yet ..

I need a lot more but even the basic is hard

Link to comment
Share on other sites

Quote

Yeah I like what you suggest there, but how can they come in the screen? by putting the positon of Y higher?

Yes, place them outside the screen.

 

Quote

So for school i need to make a game linked with a database (login, score, money) on a website.

Quote

And i don't really know what you mean with the restful API.

I mean exactly this.

 

Quote

And indeed the shooter already shoots to the top, there are 3 enemies that are on position, but not when a timer starts or something, and my collision doesn't work yet ..

I need a lot more but even the basic is hard

Do you have something specific you want to do? As far as collision you need to setup physics.

Link to comment
Share on other sites

Hello,

I have recently started using Phaser too. If you are familiar with Udemy.com learning site there is a free Phaser video tutorial that covers all the basics. There are also many examples like https://phaser.io/examples/v2/sprites/out-of-bounds showing how to spawn/respawn enemies outside the screen and many more. There you can find basic solutions for many ideas for your game. 

Good luck!

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...