Giter Club home page Giter Club logo

pokeclicker's Introduction

GitHub package.json version (branch)
GitHub package.json version (branch)
Build Status
Discord

PokéClicker

A game about catching Pokémon, defeating gym leaders, and watching numbers get bigger.

You can try out the current state at https://www.pokeclicker.com/

You can reach out on discord to discuss your ideas and how to implement them: https://discord.gg/a6DFe4p

Note

PokéClicker is still in development!

Developer instructions

Guidelines

  • Make sure the build script is a success. We won't test Pull Requests that fail the building script.
  • We won't accept balance Pull Requests, unless it's from a developer or Code Contributor (Discord roles).
  • Pull Requests adding new translatable content should link to a Pull Request in the translation repo adding your new strings. See the Developer instructions on that repo for more info.
  • Split Pull Requests into smaller Pull Requests when possible. It will make it easier for us to review, and easier for you if something's needs to be changed or is rejected.

Editor/IDE setup

We have an EditorConfig and linting configured, to help everyone write similar code. You will find our recommended plugins for VSCode below, however you should be able to find a plugin for other IDEs as well.

Building from Source

First make sure you have git and npm available as command-line utilities (so you should install Git and NodeJS if you don't have them already).

Open a command line interface in the directory that contains this README file, and use the following command to install PokéClicker's other dependencies locally:

npm run clean

Then finally, run the following command in the command line interface to start a browser running PokéClicker.

npm start

Tip

Changes to the sourcecode will automatically cause the browser to refresh.
This means you don't need to compile TypeScript yourself. Gulp will do this for you 👍

Use Google cloud shell (alternative)

Google Cloud Shell

npm clean-install
npm start

Click the Web Preview Button and select port 3001 from the displayed menu.
Cloud Shell opens the preview URL on its proxy service in a new browser window.

Deploying a new version to Github Pages

Important

Before deploying, check that the game compiles and starts up without errors.

Then run the following:

npm run website

This will populate the /docs folder.

After this command completes you can now publish this to your GitHub pages branch using:

npm run publish

Which by default will push to the master branch

pokeclicker's People

Contributors

aegyo avatar amative1 avatar apple096 avatar bainegames avatar corgionneptune avatar crobat4 avatar cypherx avatar datacrusade avatar davmillar avatar dennism1997 avatar dependabot[bot] avatar drakay avatar eatpant2nd avatar farboo171 avatar fujnw avatar hlxii avatar imgbot[bot] avatar ishadijcks avatar jaaslet avatar jk13pclick avatar luchodreamer avatar luqdragon avatar osherwott avatar pixlsteam avatar qwertypop04 avatar redsparr0w avatar regiscoaxans avatar tkatchen avatar ultima1990 avatar umbraloptimatum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pokeclicker's Issues

Amount of route kills shown continues growing past 10

Expected Behavior

After 10 route kills, the info at the top should say 10/10

Current Behavior

The info says the exact route kills /10

Possible Solution

setting the data-bind to text: Math.min(10, Player.routeKillsObservable()) will work, however it will continue to check every time you defeat a pokemon, so I think there is a better solution than this.

Old save converter to keep shinies

The converting part should be easy: Just take in the save file (which is a base64 encoded JSON file) and convert it.

I'm not really sure how we wanna make the shinies appear for the players. I have thought of several options. For example, if you had a shiny squirtle:

  1. You keep seeing shiny squirtles until you catch one
  2. You get the squirtle at the start of the game (or after you get your first starter or something)
  3. There is a pokemon lab somewhere on the map where you can receive your shinies (or convert them?)

Let me know what you guys think!

Support multiple regions

  • Create a johto svg map
  • Decide when it is possible to go to a new region
  • Adapt code so that multiple regions is possible (not that much work i think)

Create a chat system

We want the chat system to support:
Must have:

  • Chat roles
  • Login (something like passport-js)
  • Ignore list
  • pick username at sign-up

Should have:

  • Emoticons
  • Private messages
  • Multiple Rooms

Balancing for a playable game

Final things we need to balance before the beta

  • Main battling system with type effectiveness
  • Key items unlocking the game
  • Money gain from battling
  • Exp gain from battling
  • Dungeon token gain and dungeon cost
  • Oak item xp gain and bonuses
  • Breeding time
  • Gym health and xp gain
  • Fill in the shops and item prices
  • Balance Pokéball gain

Create a JSON object to save the player variables

Since Player is now a static class, we can't simply convert it to JSON and save it in the localstorage.
A seperate save and load function need to be written in a SaveFileHelper class to create a plain js object that can be converted like described.

include html inside html

Right now, all html is inside the same file, which leads to a big mess.

What would be better, is some sort of include system, where you can include html files inside other html files.
Me and @Ishadijcks don't know anything about this though. Does anybody have an idea?

Pre-load images of pokémon so they don't flicker on first load

I looked into using sprites, but I'm not sure that's possible with Knockout.
Here is the code for loading the image:

<div data-bind="ifnot: Battle.catching">
    <img data-bind="attr:{ src: '/assets/images/pokemon/' + Battle.enemyPokemon().id() + '.png' }"/>
</div>

<div data-bind="if: Battle.catching">
    <img data-bind="attr:{ src: '/assets/images/pokeball.png' }"/>
</div>

Pretty happy with it, so I'd rather keep it how it is.
I tried this as a pre-loader, but it didn't work:

    let img = new Image();
    img.src = '/assets/images/pokeball.png';
    for(let i = 1; i<150; i++) {
        img.src = '/assets/images/pokemon/' + i + '.png';
    }

Make a help tab?

Heyo, sorry for the two week inactivity, cousin got married and never informed you all.

I suppose we make a help tab to clearly explain some of the things that need to be explained.

Inside the help tab we can have a navigation bar with each of the things needing help with, a shards tab, underground tab, whatever.

Create templates for submitting issues

If we create templates for all sorts of issues, we can make sure that they contain the right information.
Each label would have its own template, so submitting a bug would require different information than submitting an improvement.

The caught pokemon gets shown too soon

This revolves around the catching of pokemon. By animation I mean the pokeball that appears when catching

Expected Behavior

The pokemon gets added to the list at the end of the animation

Current Behavior

The pokemon gets added at the start of the animation

Possible Solution

Add pokemon to caught list after animation ends

Achievements

So as with every game, this game needs achievements.
Achievements are awesome.
I want to implement around 500 of them, because that's cool.
I haven't found a way to do it efficiently yet, but I want each achievement to give a bonus to money/exp gain. Having all achievements will give you a +100% bonus.

Below we can compile a list of all possible achievements.
It is possible for some stats to appear multiple times.

  • Gain money 100/1,000/10,000/100,000/1,000,000/10,000,000

  • Gain tokens 100/1,000/10,000/100,000/1,000,000

  • Gain quest points 100/1,000/10,000/100,000

  • Gain diamonds 100/1,000/10,000

  • Capture Unique Pokémon 1/10/20/30/40/50/75/100/151

  • Capture Shiny Pokémon 1/10/20/30/40/50/75/100/151

  • Defeat Pokémon 100/1,000/10,000/100,000/1,000,000 times.

  • Capture Pokémon 100/1,000/10,000/100,000/1,000,000 times.

  • Click 10/100/1,000 times.

  • Find items 1/10/100/1,000/10,000 times.

  • Have Pokemon Attack: 100/1,000/5,000/10,000/25,000

  • Dig items 1/10/100/1,000/10,000 times.

  • Dig deeper 1/10/100/1,000 times.

For each Pokeball

  • Get Pokeballs 1/10/100/1,000/10,000/100,000

Each gym and E4:

  • Defeat 1/10/100/1,000 times.

Each dungeon:

  • Clear 1/10/100/1,000 times.

Each route:

  • Defeat 100/1,000/10,000 Pokemons.

  • Hatch eggs 1/10/100/1,000/10,000 times.

The game gets very slow when you have many Pokémon caught

Expected Behavior

Having many Pokémon should have none (minimal) impact on the speed of the game.

Current Behavior

When having a lot of Pokémon, the game becomes less responsible as it probably has to calculate something a lot of time.

Possible Solution

Find out what is calculating so often and improve it.

Steps to Reproduce

  1. Catch 30 Pokémon
  2. Click on enemies, notice the delay before the pokéball shows
  3. Clear your caught Pokémon list
  4. Notice the delay is gone

Port the underground system from the previous version

  • Port most of the code from the old version.
  • Create a class for UndergroundItem.
  • Create a class for Underground.
  • Make sure fossils can be bred.
  • Add daily deals.
  • Perhaps create rewards that tie in with the main game (ancient berries or something)

List of all events that should trigger a tutorial by professor Oak or have a (?) tooltip

  • Intro
    Explain the basic of the game, give the Pokédex and explain what your goal is.

  • Gym
    Explain that gyms are time based and that you earn badges.

  • Dungeons
    Explain how to navigate through dungeons and how the boss works.

  • Shards
    After first prestige explain how you get them and how their effects work.

  • First random quest
    Explain the rewards, how to complete and skip them.

  • Chat unlock
    Explain how to create an account for the chat, and how to treat human beings

  • Underground
    Explain how to get energy and what the rewards are

  • Breeding
    Explain how to breed, what the bonuses are and when you get your items back.

  • Safari zone

  • Shops

  • Farm

Finish Towns

  • Create a Town class
  • Finish the list with towns
  • Create a Special town for the indigo platform
  • Create a shop class placeholder

How to create an observable number array with knockout?

Player.routekills needs to be observable so we can show how many kills the player has on this route.
Updating the value does not work however.

Things I tried:

private static _routeKills: KnockoutObservableArray<number> = ko.observableArray<number>();

public static initializeRouteKills(){

        let routeKill: KnockoutObservable<number> = ko.observable(0);
        Player.routeKills.push(routeKill);
    }

"TS2349: Cannot invoke an expression whose type lacks a call signature."

private static _routeKills: KnockoutObservable<number[]> = ko.observable(Array.apply(null, Array(GameConstants.AMOUNT_OF_ROUTES)).map(Number.prototype.valueOf, 0));

   public static addRouteKill(){
        Player.routeKills()[Player.route()]++
    }

This correctly adds a number to the list, but it doesn't update the observer for some reason.

Please help :(

Towns should have color indicators

Towns should have color indicators, for when they are unlocked and you are in them

Current Behavior

All towns have the same color

Improved Behavior

  • When you are able to move into a town, it becomes another color (eg. orange)
  • When you are in a town, the color becomes another color (eg. green).

Reason for change

Improves clarity

Possible Solution

make a calculatecssclass method in the maphelper

Create the shard system and type effectiveness.

The shard system worked pretty well in the old version, except with dual types the multipliers become way too high. So I suggest changing the multipliers to the following:

Not very effective: 0.5x --> 1.5x
Normal: 1.0x --> 2.0x
Very effective: 1.5x --> 2.5x

Each in steps of 10 that increases in cost.

  • Players gain 1 shard of each type the enemy Pokémon has.
  • Clearer explanation of how the type bonuses work.
  • Shard cost and step size should be in GameConsts.
  • The player should contain a 17x3 array that contains how many upgrades the player has bought for each effectiveness type, all costs and bonuses can be calculated from this array.
  • Port the type match up chart from the old version.
  • A TypeHelper class should have a method calculateDamage() that takes a CaughtPokemon and an EnemyPokémon to calculate the damage the individual Pokémon does. Player.calculatePokemonAttack calls this function in a loop

Create Key items

The player needs to acquire the key item to unlock a feature.
In GameConsts add an enumerator KeyItem with all names of the key items.
Each feature we create will have a KeyItemRequirement of type GameConsts.KeyItem, and a method hasAccess() the checks if the player has the KeyItem

@Aegyo you created something like this that I haven't fully looked at, can it be easily ported?

In the menu drawer, the Key item button should display a bag looking interface that gives information about each key item. I'll create the interface.

List of key items:

Name Feature Where to get it Item
Shard case Shards First prestige http://www.serebii.net/itemdex/sprites/lenscase.png
Dungeon pass Dungeons Found on route 1
Underground key Underground Bought for 10 quest points http://www.serebii.net/itemdex/sprites/basementkey.png
Safari ticket Safari Zone Fuchsia City gym defeat http://www.serebii.net/itemdex/list/keyitem.shtml
Hatchery Breeding Pewter city gym defeat
Name needed Mom First level 100 Pokémon Moms letter
Teachy TV Oak explain At the start http://www.serebii.net/itemdex/sprites/teachytv.png
Name needed Garden First seed drop http://www.serebii.net/itemdex/sprites/wailmerpail.png

Create breeding

  • Create a class for Eggs.
  • Add an attribute to CaughtPokémon to indicate that it's currently breeding.
  • Add a spot on the map where the player can access the breeding screen.
  • Port most of the code from the old version.
  • Maybe a small breeding counter that is visible on the main screen.

Buy multiple not working

Whenever you buy multiple items from the shop you obtain one but spend the amount of money as if buying multiple

Dungeon map overlay

Dungeon maps look pretty basic right now, maybe we can make some overlay where there is a background behind the dungeon, which depends on the type of dungeon (forest, cave, etc.) or even make one specific per dungeon.

Should a new Pokémon be generated every time the player goes to a new route?

It makes farming for shinies/final Pokémon much easier.

  • One option could be to only let the player move when the enemy is below x% health.

  • Or we could queue the moving action for when the net Pokémon is defeated/captured, but this might make moving around the map kind of clunky.

  • What we also could do is store the route that a Pokémon is spawned on in the battlePokémon, and let the player move around freely, without spawning a new Pokémon. When the enemy is defeated the kill counts towards the old route, and a pokemon with stats from the current route is spawned.

Let me know what you think!

Recreate the region map from scratch

The old map is kind of wonky and created with draw.io, and exported to svg.

       <rect id="route_17" fill="#0412d9" height="27.3" stroke="none" transform="rotate(90,163.45,262.15)"
                  width="162.7" x="81.6" y="249.5"></rect>
            <g id="route_17" transform="translate(137.5,255.5)scale(0.7)rotate(90,36.5,9.5)">
                <switch>
                    <foreignobject height="19" pointer-events="all"
                                   requiredfeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
                                   style="overflow:visible;" width="73">
                        <div>
                            <div>
                                <font>Route 17</font>
                            </div>
                        </div>
                    </foreignobject>
                    <text fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle" x="37" y="16">
                        [Not supported by viewer]
                    </text>
                </switch>
            </g>

Which is pretty ugly for just a simple route.
This can easily be optimized, but I don't want to do it by hand.
If anyone has a better idea for drawing html objects on an image that can be updated I'd be glad to hear it!

Countdown before gyms

Gyms start immediately now, which might be a bit confusing. Maybe we can make a countdown timer for it (could be as simple as Ready -> Go)

Let the player battle the rival

We could make some random events where you battle the rival. His pokemon depend on your starter and how fare you progressed in the game

Design the Pokéball selection interface

Currently it looks like this:
image

The idea is that the player can select which Pokéball to use for new and Caught Pokémon.

It's really confusing to use with the numbers in the bottom, so I'm looking for something better.

Thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.