PHP Game Tutorial (2021) aka GrindFest
- Sharlenwar
- Posts: 523
- Joined: Mon May 28, 2012 7:14 pm
PHP Game Tutorial (2021) aka GrindFest
Okay, so this is basically the place I want to use to record the game I'm working on. I really like the idea of creating a device agnostic game and so hopefully I can achieve something like this. This is something that I'm working on, an hour here, hour there. Maybe even if I have only 30 minutes, I find myself doing a bit more work on this idea I've had for a while. So, if you are interested, then keep on reading and as a caveat to everything, I have no formal training in any type of coding. I did go to college, and I took Oracle with some earth sciences. I have done other projects in the past, most successful was when Ultima Online came out, people created various private servers using different engines. From TUS, Grayworld, Sphere, PoL, RunUO, etc. I coded in their various scripting languages and even contributed to the communities. There even was tools that people created. This all eventually fizzled out, as any great community of people do, it has it's era. Sure, there are remnants, pockets of people who continue to work with it. For me, life happened, have a family, and so time for me is precious. There are moments when I can work on a game, and it is in that calm I find that this is one of the best ways to do it. What I enjoyed from the UO era, was the fact that I could have a server running, and other people could build in the game world, create events, etc. Thus, this is where we are in time. 2018, and after doing a bit of checking around, there isn't really anything new, other than the typical engines that existed before everything went crazy on me. Thanks for taking the time to read, if you are still following this huge block of text, then I applaud you. Many get lost. This is my journey to teach myself PHP/mySQL/JavaScript/HTML. The end of this project will yield a complete game that people could take, import the database, and begin messing around with it. Hey Halls, I apologize if this steps on your toes, I hope it doesn't. I just want to use this place as a way to keep working on something. I will update this thread with progress and post up how it's going.
Constructive criticism is very welcome here as long as it's informative.
Thanks for taking the time to read this and I hope someone out there will get use out of this.
(Dec 22/2020): With COVID-19 affecting the world, I've somehow have had the spark to update this project and get it rolling here. I placed the date of 2021 into it as it's merely a number and 2021 just had that ring to it. Updated the title, updated the link, and have posted up an update. Thanks again!
Constructive criticism is very welcome here as long as it's informative.
Thanks for taking the time to read this and I hope someone out there will get use out of this.
(Dec 22/2020): With COVID-19 affecting the world, I've somehow have had the spark to update this project and get it rolling here. I placed the date of 2021 into it as it's merely a number and 2021 just had that ring to it. Updated the title, updated the link, and have posted up an update. Thanks again!
Last edited by Sharlenwar on Mon Feb 15, 2021 8:14 pm, edited 2 times in total.
Deep within the Void of Quasion, a creation.
**My Corner of the Web**
***NEW***GrindFest - My own PHP/MySQL game!
Sharlenwar's Adventures
Torn-City - Massively multiplayer online text based RPG
**My Corner of the Web**
***NEW***GrindFest - My own PHP/MySQL game!
Sharlenwar's Adventures
Torn-City - Massively multiplayer online text based RPG
- Sharlenwar
- Posts: 523
- Joined: Mon May 28, 2012 7:14 pm
Re: PHP Game Tutorial (2018)
PHP Game Tutorial - 2018
This project is a tutorial that is being built for the Indie Resource community. It's to help me learn PHP/HTML/MySQL/JavaScript by building a persistent browser based game. The aim for this is the final project will have a framework that other people will be able to work with. I'm tempted at using GitHub for this, but time will tell. This will also be the shell of my real project that will utilize the Isogenic engine. This is for practice using all of the mentioned languages. As we all know, you need to practice before you can work on that one idea that you want to go all the way with. So hopefully someone out there will find this useful and potentially learn something, maybe even let me learn something. Everything is being built with the following resources/tools:
Economy
The economy will be 100% driven by players. Settlements will require resources that the players must supply. Structures will slowly decay and so will need to be repaired or they will become derelict. Which can then be either destroyed for some resources,or rejuvenated if players come across it again. This keeps resources leaving the system in a meaningful way. Players will be able to create portals to speed up travel between locations.
Buildings
Buildings can be built by players and then can be made public if they wish. All buildings will require a large quantity of resources, thus players may allow other players to donate to their structure, if the structure is deemed as public. Buildings begin as Private, and during the building process, players may choose public. Once this happens, it must remain
public use. All buildings will have decay, so inactive places will disappear.
They will be built solely by players. They will be able to build teleporters that other players may use. This is how the world will get developed by the player base. This way the game could play as a single player or multiplayer. These will be able to be upgraded with various industry if there are enough resources nearby.
Skills
We just need a few skills, as these are just examples of what could be done.
Only need a few, mostly for an example.
As in any game, the world needs to seem vast. We will be creating a large map, strictly 2D to keep things simple. There are plans to utilize the Isogenic engine for this aspect, to explore, harvest, fight, etc. In the example, we will keep to something more simple yet large. The map will have various biomes that can represent different areas with different resources in each biome.
Crafting
Everything in the game will need to be crafted out of raw materials found in the world. Players will be able to create their own level/tier style weapons. This version will have some very basic materials.
determine the materials to use and the basic starting stats of the items.
Factions
Of course players will be able to work together through Factions. This is so that players can share a place to pool resources together. From items to resources.
Action Points (AP)
We are going to do something a bit different, from the moment you create your account and log in to play, you will accumulate AP. You will use AP from everything to harvesting, encounters, building, crafting, etc. Which means you only have a certain number of possible actions before you need to let some recharge, or you may use tokens to regenerate a set
amount. You'll find these in some games, where there is a maximum that you can regenerate. Say you stay offline for a set amount of time, then you will have earned a lot of points to utilize to be able to catch up to those who regularly play.
Tokens
This is a basic form of special currency in this version of the game. These could be earned through the game at various stages. This is an example of the special currencies in many mobile games.
Forums
The game system will utilize forums as well that will be powered through MySQL and PHP. One
could take an existing framework like phpBB, or Invision. When I was trying to integrate the
two together, there was always difficulty. Here I would like to learn how to build some forums
with a bit of a back end. Plus the "Reporting" system could utilize a forum that could be accessible
by various players with elevated permissions.
This is more of a stretch, but who knows, I'm putting it in here so I don't forget.
Back-End
The entire game will have a back-end that players with elevated privileges can access to
administer to game. From creating items, monsters, levels, etc. This will all be open to various
levels.
This project is a tutorial that is being built for the Indie Resource community. It's to help me learn PHP/HTML/MySQL/JavaScript by building a persistent browser based game. The aim for this is the final project will have a framework that other people will be able to work with. I'm tempted at using GitHub for this, but time will tell. This will also be the shell of my real project that will utilize the Isogenic engine. This is for practice using all of the mentioned languages. As we all know, you need to practice before you can work on that one idea that you want to go all the way with. So hopefully someone out there will find this useful and potentially learn something, maybe even let me learn something. Everything is being built with the following resources/tools:
- Notepad++ - https://notepad-plus-plus.org
- Bitnami WAMP - https://bitnami.com
- GitHub Desktop - https://desktop.github.com
- Phaser - https://phaser.io/
- Isogenic Engine - https://www.isogenicengine.com
- Open Game Art - https://opengameart.org
Economy
The economy will be 100% driven by players. Settlements will require resources that the players must supply. Structures will slowly decay and so will need to be repaired or they will become derelict. Which can then be either destroyed for some resources,or rejuvenated if players come across it again. This keeps resources leaving the system in a meaningful way. Players will be able to create portals to speed up travel between locations.
Buildings
Buildings can be built by players and then can be made public if they wish. All buildings will require a large quantity of resources, thus players may allow other players to donate to their structure, if the structure is deemed as public. Buildings begin as Private, and during the building process, players may choose public. Once this happens, it must remain
public use. All buildings will have decay, so inactive places will disappear.
- Settlement Monument - These lock the surrounding tiles for development. Each building increases cost in coins.
- Bazaar - Globe Player Market - item's purchased from a different bazaar will have shipment costs.
- Furnace - Used for smelting
- Forge - Used for crafting metal items
- Carpenter's House - Use for crafting wood items
- Apothecary - Place for healing and crafting healing items
- Portal - For quick travel to locations of interest
They will be built solely by players. They will be able to build teleporters that other players may use. This is how the world will get developed by the player base. This way the game could play as a single player or multiplayer. These will be able to be upgraded with various industry if there are enough resources nearby.
Skills
We just need a few skills, as these are just examples of what could be done.
- Harvesting
- Crafting
- Combat
- Defense
Only need a few, mostly for an example.
- Hitpoints
- Mana - We'll have a few simple spells (Fireball)
- Defense - for combat
- Power - for combat
As in any game, the world needs to seem vast. We will be creating a large map, strictly 2D to keep things simple. There are plans to utilize the Isogenic engine for this aspect, to explore, harvest, fight, etc. In the example, we will keep to something more simple yet large. The map will have various biomes that can represent different areas with different resources in each biome.
Crafting
Everything in the game will need to be crafted out of raw materials found in the world. Players will be able to create their own level/tier style weapons. This version will have some very basic materials.
- MetalOre - To smelt in a furnace
- MetalIngot - Refined from MetalOre
- Wood - For carpentry to make lumber
- Lumber - For tools
- Herbs - Potions
determine the materials to use and the basic starting stats of the items.
Factions
Of course players will be able to work together through Factions. This is so that players can share a place to pool resources together. From items to resources.
Action Points (AP)
We are going to do something a bit different, from the moment you create your account and log in to play, you will accumulate AP. You will use AP from everything to harvesting, encounters, building, crafting, etc. Which means you only have a certain number of possible actions before you need to let some recharge, or you may use tokens to regenerate a set
amount. You'll find these in some games, where there is a maximum that you can regenerate. Say you stay offline for a set amount of time, then you will have earned a lot of points to utilize to be able to catch up to those who regularly play.
Tokens
This is a basic form of special currency in this version of the game. These could be earned through the game at various stages. This is an example of the special currencies in many mobile games.
Forums
The game system will utilize forums as well that will be powered through MySQL and PHP. One
could take an existing framework like phpBB, or Invision. When I was trying to integrate the
two together, there was always difficulty. Here I would like to learn how to build some forums
with a bit of a back end. Plus the "Reporting" system could utilize a forum that could be accessible
by various players with elevated permissions.
This is more of a stretch, but who knows, I'm putting it in here so I don't forget.
Back-End
The entire game will have a back-end that players with elevated privileges can access to
administer to game. From creating items, monsters, levels, etc. This will all be open to various
levels.
Last edited by Sharlenwar on Wed Feb 14, 2018 7:18 pm, edited 3 times in total.
Deep within the Void of Quasion, a creation.
**My Corner of the Web**
***NEW***GrindFest - My own PHP/MySQL game!
Sharlenwar's Adventures
Torn-City - Massively multiplayer online text based RPG
**My Corner of the Web**
***NEW***GrindFest - My own PHP/MySQL game!
Sharlenwar's Adventures
Torn-City - Massively multiplayer online text based RPG
- Sharlenwar
- Posts: 523
- Joined: Mon May 28, 2012 7:14 pm
Re: PHP Game Tutorial (2018)
I'm going to try and be transparent throughout this process. So I'm going to put up a link to the files on Google Drive and have them available for download here.
Feel free to download them, have them working in your development environment. Cruise through the files, coding, let me know if I've messed up anywhere. Let me know how I can improve anything. The ultimate goal is to learn throughout this process and to keep me motivated at working on a project. I plan to finish this all the way, so that at least there is a decent example of something out there.
Feel free to download them, have them working in your development environment. Cruise through the files, coding, let me know if I've messed up anywhere. Let me know how I can improve anything. The ultimate goal is to learn throughout this process and to keep me motivated at working on a project. I plan to finish this all the way, so that at least there is a decent example of something out there.
Last edited by Sharlenwar on Tue Dec 22, 2020 8:04 am, edited 2 times in total.
Deep within the Void of Quasion, a creation.
**My Corner of the Web**
***NEW***GrindFest - My own PHP/MySQL game!
Sharlenwar's Adventures
Torn-City - Massively multiplayer online text based RPG
**My Corner of the Web**
***NEW***GrindFest - My own PHP/MySQL game!
Sharlenwar's Adventures
Torn-City - Massively multiplayer online text based RPG
- Sharlenwar
- Posts: 523
- Joined: Mon May 28, 2012 7:14 pm
Re: PHP Game Tutorial (2018)
[reserved]
Deep within the Void of Quasion, a creation.
**My Corner of the Web**
***NEW***GrindFest - My own PHP/MySQL game!
Sharlenwar's Adventures
Torn-City - Massively multiplayer online text based RPG
**My Corner of the Web**
***NEW***GrindFest - My own PHP/MySQL game!
Sharlenwar's Adventures
Torn-City - Massively multiplayer online text based RPG
- Sharlenwar
- Posts: 523
- Joined: Mon May 28, 2012 7:14 pm
Re: PHP Game Tutorial (2018)
[reserved]
Deep within the Void of Quasion, a creation.
**My Corner of the Web**
***NEW***GrindFest - My own PHP/MySQL game!
Sharlenwar's Adventures
Torn-City - Massively multiplayer online text based RPG
**My Corner of the Web**
***NEW***GrindFest - My own PHP/MySQL game!
Sharlenwar's Adventures
Torn-City - Massively multiplayer online text based RPG
- hallsofvallhalla
- Site Admin
- Posts: 12023
- Joined: Wed Apr 22, 2009 11:29 pm
Re: PHP Game Tutorial (2018)
Sounds VERY interesting. I would consider Phaser over Isogenic. Do not get me wrong Isogenic is an amazing library but it has a massive learning curve. Phaser is constantly being developed and hundreds of examples and tutorials. Large community
- Sharlenwar
- Posts: 523
- Joined: Mon May 28, 2012 7:14 pm
Re: PHP Game Tutorial (2018)
Yeah, I've taken a look at Phaser. Not sure what to think, looks much better now. I'll have to take a peek at that and maybe add that to the list of resources. Reason I chose Isogenic was just how easy it is to get up and running with it. There are plenty of examples to reverse engineer and that lets me learn. Plus I would love to see the developer continue progress with it.
But yeah, I'll take a look at Phaser and see if I can do what I need with it as well.
But yeah, I'll take a look at Phaser and see if I can do what I need with it as well.
Deep within the Void of Quasion, a creation.
**My Corner of the Web**
***NEW***GrindFest - My own PHP/MySQL game!
Sharlenwar's Adventures
Torn-City - Massively multiplayer online text based RPG
**My Corner of the Web**
***NEW***GrindFest - My own PHP/MySQL game!
Sharlenwar's Adventures
Torn-City - Massively multiplayer online text based RPG
- hallsofvallhalla
- Site Admin
- Posts: 12023
- Joined: Wed Apr 22, 2009 11:29 pm
Re: PHP Game Tutorial (2018)
Well if you feel comfortable with Isogenic then do not let me persuade you otherwise. Its a great choice. It just has the steeper learning curve so thought I would suggest an alternative.
- Sharlenwar
- Posts: 523
- Joined: Mon May 28, 2012 7:14 pm
Re: PHP Game Tutorial (2018)
I'm surprised you would think it has a higher learning curve. Not sure where that comes from. I'm currently working through some Phaser tutorials. I don't really care what I use, whether it's Isogenic or Phaser, they all do the trick that I'm looking for. I guess it depends on how well multiplayer is handled in Phaser vs. Isogenic. Isogenic uses node.js I think, from poking around the files. If I can do multiplayer with Phaser, then it doesn't really matter. I will add it to the list here though, as I consider it a good option from the little bit I've used it here today.
Thanks for your input Halls, thus why I decided to post this stuff here and get a decent game put up. Time to drink some more java and get back to coding!
Thanks for your input Halls, thus why I decided to post this stuff here and get a decent game put up. Time to drink some more java and get back to coding!
Deep within the Void of Quasion, a creation.
**My Corner of the Web**
***NEW***GrindFest - My own PHP/MySQL game!
Sharlenwar's Adventures
Torn-City - Massively multiplayer online text based RPG
**My Corner of the Web**
***NEW***GrindFest - My own PHP/MySQL game!
Sharlenwar's Adventures
Torn-City - Massively multiplayer online text based RPG
- Sharlenwar
- Posts: 523
- Joined: Mon May 28, 2012 7:14 pm
Re: PHP Game Tutorial (2018)
So yeah, after taking a look at Phaser, I can see it doing what I need it to. I guess it's down to preference and what engine people want to use. I'm leaning towards Isogenic as I like how that works out of the box versus Phaser. Phaser to me is the same thing, just different with a lively community. I have more "specific" ideas to try out and again, Isogenic will get me there. Phaser, with a bit of work, will get me there too.
I'm moving forward with Isogenic as I've been playing with that for the past month here before starting this project up. Switching to Phaser can be done, but you are going to need to convince me. The examples aren't too great either. Plus after looking through the forums, I find it difficult to find information relating to connecting to databases like mySQL. Then again, I'm just a hobbyist developer.
I'm moving forward with Isogenic as I've been playing with that for the past month here before starting this project up. Switching to Phaser can be done, but you are going to need to convince me. The examples aren't too great either. Plus after looking through the forums, I find it difficult to find information relating to connecting to databases like mySQL. Then again, I'm just a hobbyist developer.
Deep within the Void of Quasion, a creation.
**My Corner of the Web**
***NEW***GrindFest - My own PHP/MySQL game!
Sharlenwar's Adventures
Torn-City - Massively multiplayer online text based RPG
**My Corner of the Web**
***NEW***GrindFest - My own PHP/MySQL game!
Sharlenwar's Adventures
Torn-City - Massively multiplayer online text based RPG