Giter VIP home page Giter VIP logo

tonygustafsson / lostseas-php Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 0.0 86.33 MB

This is a totally free pirate-influenced, web based game (no signup needed). You will travel from town to town, and encounter many ships on the Caribbean Sea. Accumulate riches, ships and new crew members. Try to level up and be promoted!

PHP 94.05% HTML 0.28% JavaScript 3.77% SCSS 1.90%
browser-game game pirates progressive-web-app pwa

lostseas-php's Introduction

About me

I've been into coding for 20+ years. :neckbeard: Tried a bunch of different languages, tried backand and frontend. Nowadays I tend to focus most of my time on Frontend development since it's just more fun (challenging). That means my days consists of TypeScript, JavaScript, performance optimization, accessibility, SEO, React, Svelte and bug fixing.

The projects in my repos doesn't really reflect what I produce on a professional level. There is lots of POCs, tests, demos and just old crap. But I'm sure you could find something useful if you look long enough ;) I'm just very pro open source, and it's my philosofy that all code should be open and free. Including mine.

Other interests are photography, cooking/baking, Linux, meditation, blockchains/smart contracts and tech overall. 💻

TypeScript   JavaScript   React   Svelte   VSCode   CSS   Bitcoin    Ethereum

lostseas-php's People

Contributors

tonygust avatar tonygustafsson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

lostseas-php's Issues

Add log book entry types and filters

The log book right now just list everything that has happened. It would be great if the missions could have different entry types like ie 'revenue', 'mission' and 'barter goods'.

In the log book we could then filter these with a select box and even link to a specific log filtering. Example from the mission page we could link to mission history as a filter.

Add different feel for each town

Each town should have it's own touch and feel. With individual images and maybe places to visit. The game get's boring if everything is the same. Different prices for items are a given. Maybe different music as well.

Today there is different images depending on the nation. It was easier to implement since there are 4 nations, but 12 towns.

Add game to Google Play Store

Since it's a Progressive Web App it would be fun to get it out on Google Play Store. It requires a sum of money though, and probably some knowledge about Android Studio which I do not have yet.

Add interactive ocean map

The plan is that the ocean map should show your ships position live. When changing town, it would travel from town to town without hitting land. I see no need to actually move the ship with keyboard and touch at the moment.

It should take different amount of time/weeks to reach the destination, and it will cause an actual time to wait until you get there. The user could of course check out inventory and such while he waits. We are not talking many seconds here or the user will be bored.

I just want to give the user a feel of time passing.

Add map view in towns

Right now you can only see the map when you are out on the ocean. You should be able to plan your trips even if you are in a town. So we should present the map in a view and point out your ship.

Add helpful guide

I'm afraid that new users doesn't really know what to do next. We should add a guide - maybe a helpful parrot by your side. He should talk to you when you start out playing and show you what everything is without disturbing. He should always be available if you don't really know what you should do.

Today there are some pointers when you get to a town. It informs you what you could sell, what you should buy, if the governor would have a word with you and such. This should also be merged with this feature.

Swap fronend to SvelteJS

The current frontend is built from scratch. I have chosen not to use a library such as bootstrap since I want total control. And I don't want the game to feel like every other page. I am using some of the same classes as bootstrap though since they are practical to work with. This will be approved upon over time.

The thing I want to change is the way stuff are changed depending on the backend state. Right now we have manipulateDom.js that takes the backend response and make differences in the frontend. But it's easy to make mistakes and we should really start using SvelteJS or React instead.

Add missions

Multiple missions should be allowed at once, and each mission can have multiple progress steps. It will be stored as JSON in game table as column ‘missions’.

Missionlib

  • IsMissionOpportunity: A random_int telling Main.php controller if the user should be presented with an opportunity or not. Only once per town visit, so that the user cannot just click around and trigger multiple missions. Maybe a chance in once per 30.
  • CreateMission: Randomized types, could be to visit places and talk to people, or to come back when certain things is valid (like giving someone 10 bottles of rum).
  • GetMissions: Get all missions in an array of objects.
  • GetMission: Get all info about the current mission (if needed)
  • IsMissionTaskTriggered: Check if the town and place should trigger an event. Needs to check all missions and all progress steps. Maybe not that performant. We should help the controllers at least by giving them game['mission_step_town'] and game['mission_step_place'] to avoid needing to check all missions on all places the user visits.

GUI

Have a mission label in the Inventory underneath the Title and Level. Even if there are no missions active.

When clicked upon, a special mission page will show current missions. Old missions are cleared from the database, and only viewable in the log book. I think it would be too much info for the JSON object to keep them all. Should be clear what step is the next.

JSON example

missions: [
    {
        progress: [
            {
                description: 'Please go to the my uncle in San Juan, he his an accountant at the bank there.',
                town: 'sanjuan',
                place: 'bank',
                done: false
            },
            {
                description: 'I know that guy. unfortionally the item has moved to Montenique. I think he is at the tavern.',
                town: 'sanjuan',
                place: 'bank',
                done: false
            },
            {
                description: 'Here you go, you are welcome. Go back to X and tell him hi from me.',
                done: false,
                town: 'sanjuan',
                place: 'bank',
                lastTask: true,
                rewardAmount: 1000,
                rewardItem: 'doubloons'
            },
        ]
    }
]

Add better greeting phrases

All places in town have a greeting phrases that is randomized. They are not good enough atm. And they are not well placed in the GUI. My plan was for all images in places should show a human beeing instead of just a room. I want the phrases to seem to come from the greeter.

Add user market place

In the market there can also be exchanges between players. I could choose to sell 10 cannons for 1000 doubloons and when someone buys it I get the reward.

Swap backend to something modern

Today we are using PHP and CodeIgniter 3 framework. I see some problem with this.

  • It's old and outdated. There are a CodeIgniter 4 out which is better but all features and libs are not ported yet.
  • I would probably want to stop using PHP and go with NodeJS instead. Easy to run on cloud services as well.
  • It should communicate through REST API only.

Some steps have been taken already to using the backend as an API but much more is needed.

Add interactive ship fights

Instead of just winning or loosing a battle, it should be interactive. Probably not in a real time fashion where you point your ship, but more like RPG where you choose your next step. Your active cannons might change during the fight, and you might want to flee in the middle of the fight.

Add rare items

It would be fun to find rare items here and there that can be traded or sold. Like a golden egg or a stupid parrot.

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.