Jump to content

[Book & Game] Goblin Run - Procedural endless runner


Tom Atom
 Share

Recommended Posts

Hi, I am proud to announce I finally finished my first Phaser book: Create procedural endless runner in Phaser with TypeScript. Book is one big tutorial on creating procedurally generated endless runner from setting up project to full game with various features like spikes, in-air bonus jumps, gold to gather.

Book.jpg

 Full game developed through the book can be played here: http://sbc.littlecolor.com/goblinrun

 GoblinRun02_small.png   GoblinRun04_small.png

 Currently, book is available at Gumroad. You can also read short blog post about it here: http://sbcgamesdev.blogspot.com/2016/09/phaser-book-on-making-procedural.html

 This book is not for absolute beginners, who are learning what is variable and how to make loop. It is for people who have some basic knowledge what is Phaser, how to make something simple with it and now want to make something “bigger”, what will be beyond simple how-to examples. All aspects of game are covered, including evergreen topic on scaling for various window sizes :):

Scale.png

 

Link to comment
Share on other sites

Just an FYI, but the link you included in the post has a typo. I was able to figure it out and give the game a play though.

Really polished looking game you have here! Definitely a good job done with the scaling too, which you mentioned. I know getting the scaling to work just the way I wanted it was a little tough the first time around, so I'm sure the book will be a valuable resource for those looking for help. I hope you have a lot of success with it!

Link to comment
Share on other sites

21 hours ago, lumoludo said:

Just an FYI, but the link you included in the post has a typo. I was able to figure it out and give the game a play though.

 Thanks a lot! Link is corrected.

21 hours ago, lumoludo said:

Really polished looking game you have here! Definitely ...

 Thanks again. In the beginning I was looking for universal scaling solution, but it is game what is in center. Game genre or gameplay determines what scaling strategy to use. And if you have clear picture how you want it work, then coding it is easy :)

 For book, my weakest point is marketing. Fortunately, it is listed at Phaser site shop page, which may bring some customers. So far, there is 15 sales, but I believe there will be more people interested in it ... especially now, when link is corrected and they can see what is result of coding in book :)

Link to comment
Share on other sites

@jamesgeorgedunn Hi, I think the best way would be to make score persistent across states changes. For it, add it into Preferences (Chapter 16, 17) and save it along with other settings. You can make more variables like last score, highest score,... You can then read it back anywhere in game.

 For displaying: if you want just to display number, then use Phaser.BitmapText. Or, if you also want gold icon like in game UI, you can reuse class ScoreUI. Just create instance of it and set its score property to desired value:

let scoreUI = new ScoreUI(this.game, this.world);
scoreUI.score = Preferences.instance.hiScore; // or last score ... whatever you want and added into prefs

 

 Another way would be to question Play state for score. You can add getter to get value of private property _score into Play state:

public get score(): number {
    return this._score;
}

 Then you can question it from other states like this:

let score = (<Play>this.game.state.states["Play"]).score;

 Score will be kept there until next game is started.

 

Hope, it helps...

Link to comment
Share on other sites

  • 2 years later...

@farhan selling / publishing is not covered in book. In fact, implementing sponsor APIs is usually very easy (despite the fact, every sponsor has different API). The hard part is to find sponsor interested in publishing your game and it is about writing emails... Also publishing on Google Play or Apple Appstore is easy - I used Cordova for this for some of our games and for ads I used Heyzap mediation (mediation between Heyzap, Chartboost, AdMob, Unity Ads).

While sponsor implementation is easy, hard part is to keep single codebase for many different sponsors. I am writing small series about making maintainable games with Phaser 3. Currently it has 5 parts: http://sbcgames.io/category/blog/

@Matty77 not sure, why... Some slightly adjusted versions of game were published by sponsors, who made deep testing. But, no matter how deep testing is, there is always at least one device, that does not work! Sounds like some kind of game development law ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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