Questions tagged [php]

PHP is a general-purpose programming language that is especially suited for web development.

Filter by
Sorted by
Tagged with
1
vote
1answer
75 views

How do I wrap my web browser game as a standalone for Steam?

I've got a PHP/Java based game, which runs in the browser. However, I want to submit this game to Steam. Now Steam doesn't allow web-based games unless they come in some kind of wrapper. How can I ...
0
votes
1answer
25 views

Timed Events in a Unity WebGL game with a PHP / MySQL Server

I want to make an online WebGL game with Unity with button based interaction. So far I have my login and registration system, with some tables in MySQL to deal with that kind of stuff. Next I need ...
0
votes
1answer
142 views

How can I send a live notification when a user gets leveled up?

This question is about how to implement a live notification if the user gets leveled up. My leveling system consists of 100 levels, so every time a user levels up, a notification will pop up into ...
0
votes
1answer
54 views

World Boss System in Web Browser MMO using PHP

I am trying to create a world boss system using PHP. But I am having a problem with how to account for all the damage while updating the health of the boss in real-time. The current damage process is ...
2
votes
1answer
99 views

How can I avoid writing a class for each of my 800 different items?

I have a webgame written in PHP and using MariaDB for the database. I'm currently looking into ways of improving core systems. One example would be items. Currently, there is a table ...
-1
votes
1answer
576 views

Retrieve multiple images from MySql database via Unity C#

We could say that we are beginners, We can consult and show our data (text) from Mysql but the images don´t show in Unity. Need some help! We hace tried almost everything! We can someone help us. in ...
10
votes
3answers
3k views

Why PHP over C# for PBBG? [closed]

I am a C# developer and wanted to start a hobby project building a persistent browser based game (PBBG). I work with C#, MSSQL and Angular and thought I would use those techniques for my hobby project ...
1
vote
0answers
48 views

How can I give to player points with ajax but secured? [duplicate]

I have a virtual world game that I developed with jQuery, AJAX and PHP. Virutal World like club penguin. Now, I want to add a game into the virtual world - like bubbles or whatever. The main problem ...
2
votes
1answer
84 views

Feasible to do all game logic on PHP server?

For the turn-based browser Flash RPG I'm working on, I'm keeping all player stats in a MySQL database, with PHP as the go-between, for the sake of persistence and to prevent cheating by memory editing....
0
votes
1answer
75 views

Better way than url-encoded query stings to pass data from PHP to Flash?

For the turn-based browser Flash RPG I'm working on, I'm using url-encoded query stings to pass data from PHP to Flash. Basically, Flash posts a request to PHP, then PHP pulls some data from a MySQL ...
0
votes
1answer
83 views

Calculate Player Level in PHP

So in my program, I currently know how much Experience a player has. I was using this formula to figure out what level the Player was: ...
1
vote
0answers
128 views

Steam web API won't work with new domain

Following code works perfect on localhost (even using LightOpenID('localhost')). "mysite.com" is replaced with current site in real script. But for some reason this ...
1
vote
0answers
170 views

How come serverless functions are so much more expensive than a VPS hosting my PHP API?

I'm working on an online turn-based game. I will have a server, but it will be used strictly for storing match data and relaying it to the match's participants (or spectators). For simplicity, no game ...
1
vote
1answer
160 views

Attack Algorithm/Forula [closed]

So I'm making a simple RPG game and I'm currently stuck on creating an attacking module for it. I need to create a simple attack algorithm but I'm really not very good at it. Each character has 3 ...
0
votes
1answer
88 views

Get range of hexagon based on specified center

I have this method to get the cells inside a given N range: ...
0
votes
1answer
156 views

Finding cells within range on a hexagonal grid

I'm looking for a way to get the cells based on a N range. But no luck. I'm converting Row Column offset to Cube Coordinate system QR -> XYZ ...
3
votes
1answer
119 views

Place hexagons together

Just made it with some more investigation thanks to this site: Hexagonal grid math, but the hexagons have a little bit spacing horizontally. Here is the code: ...
1
vote
1answer
432 views

How to program an experience-based levelup system where experience carries over to the next level?

I'm new into programming, and i've tried to do a system of level up. Here it is : ...
1
vote
1answer
213 views

How to cache tile map?

I am trying to write a strategy game with PHP, and basically I have a 1d based tile map (grass, dirt, sand, castles, etc.) stored in a database. Now where is 40k records, from x1y1 to x200y200 and I ...
3
votes
2answers
238 views

PHP Quest System: Push or Polling?

I want to build a quest system in PHP. My idea so far was to create quests based on a class and write two functions for every quest: One is checking if its activated, the other will check the progress....
1
vote
1answer
1k views

Unity3D: Facebook login into the game + Verification on Server Side

I don't need to know the specific code required for that, but I want to understand at high level how can I implement that and what SDKs I have to use to achieve that. Facebook PHP SDKs: Ok If I want ...
0
votes
1answer
532 views

unable to send or update data into my mysql database using unity

I am trying to save user scores into my data base so i have deveoped backend on php and mysql datbase. All the things are complete but having issues to send or receive data through my unity WWW class. ...
-1
votes
3answers
2k views

How do I make a highscore database for Unity?

I have been looking around, but I haven't found the perfect answer, yet. I want to to send scores from Unity to a database, without a username, and display the high scores in the highscore menu. How ...
5
votes
3answers
227 views

Calculate resources real-time. Sockets or not?

I'm currenly developing a game in Javascript. It's a Single Page Application so every change should be pulled from the server without page refresh. I'm currently wondering how I should handle the '...
1
vote
0answers
80 views

PHP development for online games [closed]

I am not pro on programming and games but i had developed an online browser-based game with php . Now i am creating a game like a chess that it do not needs an live-stream and FPS data exchanges. I ...
1
vote
3answers
119 views

Protecting/Handling game data

I have been working on a web based game, in which involves a lot of javascript/PHP. My question is what is the most secure way to handle any data being passed between the two languages? At this ...
1
vote
1answer
319 views

Designing PHP RPG game: Should I use multiple classes for each type of item or a single table?

I'm making a text-based role playing game written in PHP. I have a hard time figuring out how to handle items in game - there will be a few types of objects (weapon, machine, tool, building etc) each ...
1
vote
2answers
196 views

TCG Board Architecture

While I was, sort of, studying the various TCGs around, concepts, similarities, differences and how they could be implemented, if designed to be in a virtual environment (e.g. PC game) I obviously ...
0
votes
1answer
2k views

Accessing a database with a php script from Unity mobile game

So I am attempting to keep track of some user data in my game that I am creating in Unity 3d. I am using Unity's WWW class to do this. I am following this tutorial: http://wiki.unity3d.com/index.php?...
1
vote
0answers
226 views

displaying leaderboard [closed]

Basically what i wish to ask: *A game is developed for android platform, is on google store and its leader board (scores etc.) are on Google server. Can we display the top scores from there on a ...
0
votes
1answer
139 views

PHP browser game energy recover time [closed]

I would like to create something very simple. A browser game, where user can waste its energy and ability points. Unlike other games here there won't be no levels. So energy and ability points restore ...
0
votes
3answers
703 views

How do I keep a PHP server running forever?

I'm making a web game RTS, it's mostly create units, manage resources, attack with army, and level up factories. I have created the basics of the game using Javascript, PHP, and MySQL databases. I use ...
-4
votes
3answers
347 views

Should I create an MMORTS game with server side coding? [closed]

I have gone through many articles on the internet and got to a final conclusion that their is almost no way to protect the game (it can be hacked or its code can be extracted from its APK) and should ...
1
vote
1answer
87 views

Peer to Peer world download

I am creating a multiplayer JavaScript game with a PHP central server. Each user will be able to move around in a 3D world, with other users and NPCs. It came to my attention that SQL is not going to ...
3
votes
2answers
90 views

One big Instance or One instance for every moving entity?

I am creating a multiplayer JavaScript game with a PHP central server. Each user will be able to move around in a 3D world, with other users and NPCs. These NPCs will be controlled by the central ...
3
votes
1answer
153 views

What techniques are useful for modelling Character Actions via OOP? [duplicate]

I'm trying to rewrite a legacy php Browser-Based-Game so that it uses object oriented programming. I find it relatively easy to model concrete nouns, like: new Npc(), new Character(), new Account(), ...
-3
votes
1answer
278 views

handling wars in multiplayer browser game [closed]

I'm building a browser game about countries, cities, the user control his city, building it upgrading it, can fight other cities in the same country, elections and war between countries, peace, trade ...
1
vote
0answers
192 views

Security-minded design patterns / paradigm for client/server application

I am working on a client/server application and am starting to take it from proof-of-concept to actual implementation. The client is an Android application and the server is in PHP. In similar ...
1
vote
3answers
281 views

Browser-Based Game Design: Keeping track of NPC stats (Attack, Defense, Health, etc)

Hope this is a proper question to ask here. If not, I'd appreciate somebody pointing me to other game developer communities. Since I am creating my game by myself it'd be nice to communicate with ...
4
votes
4answers
2k views

In PHP, how do I implement multiplayer “rooms” for a turn-based game?

I'm working on a multiplayer checkers game. I want to let players choose another connected player and invite him to play. I have a working game engine and rendering, but I'm stuck on the multiplayer ...
4
votes
1answer
849 views

How to do monster AI movement and attacks server side?

I have my web based rpg game already created. Inventory management, equipment system, character stats, skill tree, and etc. It's almost complete. For the game world, I am creating a top-down rpg ...
0
votes
1answer
841 views

What is the correct way to authenticate a player with password from Unity to a php api server?

So, I have a game in Unity for mobiles that gives you the possibility to sign-up with username, email and password to unlock extra features. The datas are sent, through a POST request, to a PHP+MYSQL ...
2
votes
3answers
244 views

Formula for Planetary Alignment

I am attempting to create a game where there is a universe of two 16-bit addresses ranging from (-32768, -32768) to (32767, 32767), or in hexadecimal, each value can run from $8000 to $FFFF then 0 to $...
2
votes
1answer
13k views

Sending POST data with WWW in Unity C#

I would like to use Unity's WWW class to send a an HTTP request with POST data. So in my server, my PHP script can do something like $number = $_POST["NUMBER"]; ...
0
votes
0answers
256 views

Securing HTTP requests to online game server

I'm pretty new at making online games. Right now I'm trying to make an iPhone game. Each player has a profile in my server. I want to avoid username/password for authentication. Currently, as it ...
0
votes
1answer
293 views

How to approach players beeing overlapped by high isometric tiles?

I'm making a browser game wich is based on PHP, MySQL and Javascript. It has an isometric world where the player can move and see other players/NPCs. But if a tile in the foreground is so high that it ...
2
votes
2answers
1k views

Balancing Attack to Defense in a text based RPG [duplicate]

I understand that there is no correct or incorrect way of doing this, and its all down to a matter of trial and error in terms of perfecting the system. What I am after is some advice or even get ...
0
votes
1answer
287 views

Export session variables easily and permanently in php

I feel like I must be missing something simple, or misunderstanding sessions or cookies. I want to save all session variables and allow players to copy/paste a long string to load the game up from a ...
3
votes
2answers
1k views

Increasing resources overtime for a browser-based game [duplicate]

I've been interested in developing a browser game ala OGame or Ikariam etc. Basically, a menu is displayed with your resources and, overtime, they increase depending on how advanced are you in the ...
3
votes
3answers
112 views

Validating victory report to PHP leaderboards

I have decided to begin working on some sort of leaderboard server for my PC game. For starters, I decided to write some PHP scripts to handle it. The script doesn't actually receive a score - it ...