oh noes! teh codez!
Moderator: Forum Moderators
-
Joose
- Turret

- Posts: 8090
- Joined: October 13th, 2004, 14:13
- Location: The house of Un-Earthly horrors
oh noes! teh codez!
Ok, those of you with good memories may remember the "Haxxor!" thing i was working on. Well, Ive been beavering away silently, and its...er...changed almost beyond recognition. Ahem.
The original idea of "an MMO played through a web browser" is still very much there. However, its no longer a hacking game. Basically this is due to:
a)it was turning into "Uplink: Online" at a rapid pace, and I wanted to do something a little more original
b)I had hit a slight problem, in that although i could easily model one person hacking into a system, two people hacking the same system made everything suddenly very, very complicated. which ruled out PvP entirelly. Which was shit.
So now the grand plan is....not very original either, frankly. Well, its a fairly original idea made of shitloads of unoriginal ideas. Basically, its going to be Civ in space with real people. ish.
But rather than harking on about game dynamics that may never happen, on to the point of this post:
Ive got a slight coding problem. Ive thought of a solution, but im sure theres a better way that i just havent thought of. The problem is this:
The whole game is powered by php/mySQL. So events in the game can only be resolved when someone goes on to a page, or reloads it, and the php is re-run. This is not a problem for most things, since I can kind of "fake" it; for instance, if the event is a ship travelling from a to b, then when it leaves a, a note is made of when it will reach b. The next time the player logs on after the ship reaches b, it will update and everything will be happy.
the problem arises, again, when two or more people are involved.
For instance, say i sent my battleship to blow up your space station. It will arrive and fight in three hours. I log off, and log on again in 4 hours, to find i won. hurrah!
But what if, after two hours, you sent some ships to defend it. If the result was calculated when i sent my ships, your defensive ships would be ignored. If the result is not calculated till you log on, then what if you dont log on? if the result waits till i log on again, you wont know whats happened to your ships in a fight thats already happened! argh!
The only solution i have thought of so far is to keep track of what events every item in the game is involved with. So in the previous example, me sending my ship will initiate a "fighting event", which will be tagged on to my ship and your station. You sending your ships to the station will cause them to be tagged on to the event too. If you move them away before the event takes place, they will be moved out of the event. the first time an involved player logs on after the event, the result is calculated and everyone is let know.
This will work, but seems a little complicated. Considering the fact that a player is in control of a space faring empire, with populations, special characters, ships, stations, planets etc that could all be involved in events, it could all get a bit much.
If anyone out there has any flashes of inspiration, let me know. The thought of coding that bit of the game is making me want to cry.
The original idea of "an MMO played through a web browser" is still very much there. However, its no longer a hacking game. Basically this is due to:
a)it was turning into "Uplink: Online" at a rapid pace, and I wanted to do something a little more original
b)I had hit a slight problem, in that although i could easily model one person hacking into a system, two people hacking the same system made everything suddenly very, very complicated. which ruled out PvP entirelly. Which was shit.
So now the grand plan is....not very original either, frankly. Well, its a fairly original idea made of shitloads of unoriginal ideas. Basically, its going to be Civ in space with real people. ish.
But rather than harking on about game dynamics that may never happen, on to the point of this post:
Ive got a slight coding problem. Ive thought of a solution, but im sure theres a better way that i just havent thought of. The problem is this:
The whole game is powered by php/mySQL. So events in the game can only be resolved when someone goes on to a page, or reloads it, and the php is re-run. This is not a problem for most things, since I can kind of "fake" it; for instance, if the event is a ship travelling from a to b, then when it leaves a, a note is made of when it will reach b. The next time the player logs on after the ship reaches b, it will update and everything will be happy.
the problem arises, again, when two or more people are involved.
For instance, say i sent my battleship to blow up your space station. It will arrive and fight in three hours. I log off, and log on again in 4 hours, to find i won. hurrah!
But what if, after two hours, you sent some ships to defend it. If the result was calculated when i sent my ships, your defensive ships would be ignored. If the result is not calculated till you log on, then what if you dont log on? if the result waits till i log on again, you wont know whats happened to your ships in a fight thats already happened! argh!
The only solution i have thought of so far is to keep track of what events every item in the game is involved with. So in the previous example, me sending my ship will initiate a "fighting event", which will be tagged on to my ship and your station. You sending your ships to the station will cause them to be tagged on to the event too. If you move them away before the event takes place, they will be moved out of the event. the first time an involved player logs on after the event, the result is calculated and everyone is let know.
This will work, but seems a little complicated. Considering the fact that a player is in control of a space faring empire, with populations, special characters, ships, stations, planets etc that could all be involved in events, it could all get a bit much.
If anyone out there has any flashes of inspiration, let me know. The thought of coding that bit of the game is making me want to cry.
-
Woo Elephant Yeah
- Heavy

- Posts: 5433
- Joined: October 10th, 2004, 17:36
- Location: Bristol, UK
- Contact:
-
Joose
- Turret

- Posts: 8090
- Joined: October 13th, 2004, 14:13
- Location: The house of Un-Earthly horrors
doesnt cron work at specific times or time intervals though? even if i got it to check for events every 5 mins, someone could easily change something and change it back in between checks.
Unless...could I alter the time the cron task takes place via php?
actually, that could end up with several million cron tasks.
shitflakes!

EDIT: thanks for the idea though, not thought of cron, as ive not really used it before. time to investigate.
Unless...could I alter the time the cron task takes place via php?
actually, that could end up with several million cron tasks.
shitflakes!
EDIT: thanks for the idea though, not thought of cron, as ive not really used it before. time to investigate.
Last edited by Joose on August 4th, 2005, 16:13, edited 1 time in total.
-
Joose
- Turret

- Posts: 8090
- Joined: October 13th, 2004, 14:13
- Location: The house of Un-Earthly horrors
Ive just had a wonderfull idea. Possibly.
Turn based! If i make it so there is a set amount of "turns" per day, this whole problem goes away! Possibly not so good, game play wise, but a hell of a lot easier to program.
What do people think? Would a game of conquest be made shite by being turn based? And how many turns per day?
Turn based! If i make it so there is a set amount of "turns" per day, this whole problem goes away! Possibly not so good, game play wise, but a hell of a lot easier to program.
What do people think? Would a game of conquest be made shite by being turn based? And how many turns per day?
Nope, Most of the best Browser based MMO's work this way. Tried and tested proof of work-age and enjoyability allowing for a complexitiy of the actions of the client.
..... and Good Luck I once helped run a MMO and dyamm....I give it up (Free open source one edited and messed then uploaded
)
Thats an idea, Download some Open Source MMO's (Code Beach? google?) and lookie what they do?
..... and Good Luck I once helped run a MMO and dyamm....I give it up (Free open source one edited and messed then uploaded
Thats an idea, Download some Open Source MMO's (Code Beach? google?) and lookie what they do?
-
Roman Totale
- Robotic Bumlord

- Posts: 8475
- Joined: October 24th, 2004, 0:27
- Location: Manchester, UK
-
Grimmie
- Master of Soviet Propaganda

- Posts: 7672
- Joined: February 5th, 2005, 19:00
- Location: Birming-humm, England
- Contact:
CONGRATULATIONS: YOU ARE CLEVERERER THAN ME. =D
<img src="http://img.photobucket.com/albums/v241/ ... ombat1.jpg" alt="Image hosted by Photobucket.com">
GOOOOO JOOSE!
<img src="http://img.photobucket.com/albums/v241/ ... ombat1.jpg" alt="Image hosted by Photobucket.com">
GOOOOO JOOSE!
-
Woo Elephant Yeah
- Heavy

- Posts: 5433
- Joined: October 10th, 2004, 17:36
- Location: Bristol, UK
- Contact:








