oh noes! teh codez!

News and important info, general banter, and suggestions for 5punk

Moderator: Forum Moderators

Post Reply
Joose
Turret
Turret
Posts: 8090
Joined: October 13th, 2004, 14:13
Location: The house of Un-Earthly horrors

oh noes! teh codez!

Post by Joose »

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.
Woo Elephant Yeah
Heavy
Heavy
Posts: 5433
Joined: October 10th, 2004, 17:36
Location: Bristol, UK
Contact:

Post by Woo Elephant Yeah »

I suggest you speak to the PHP Elephant, failing that, I have no clue whatsoever.

/shite with MySQL & PHP

Image
Dog Pants
Site Moderator
Site Moderator
Posts: 21653
Joined: April 29th, 2005, 13:39
Location: Surrey, UK
Contact:

Post by Dog Pants »

Holy shitballs! You're way too clever.

The only help I can give you is encouragement.



*encourages* :thumbsup:
wyrd
Polar Bear
Polar Bear
Posts: 275
Joined: March 23rd, 2005, 0:21
Location: in the navy...
Contact:

Post by wyrd »

you though of setting up a cron task to do stuff?
Joose
Turret
Turret
Posts: 8090
Joined: October 13th, 2004, 14:13
Location: The house of Un-Earthly horrors

Post by Joose »

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!


:x

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.
amblin
Zombie Spanger
Zombie Spanger
Posts: 2663
Joined: October 22nd, 2004, 11:50

Post by amblin »

.
Last edited by amblin on May 6th, 2014, 13:35, edited 1 time in total.
Joose
Turret
Turret
Posts: 8090
Joined: October 13th, 2004, 14:13
Location: The house of Un-Earthly horrors

Post by Joose »

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?
Vowles
Sir Didymus
Sir Didymus
Posts: 376
Joined: November 9th, 2004, 10:26
Location: Uk,Bristol
Contact:

Post by Vowles »

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?
amblin
Zombie Spanger
Zombie Spanger
Posts: 2663
Joined: October 22nd, 2004, 11:50

Post by amblin »

.
Last edited by amblin on May 6th, 2014, 13:35, edited 1 time in total.
Joose
Turret
Turret
Posts: 8090
Joined: October 13th, 2004, 14:13
Location: The house of Un-Earthly horrors

Post by Joose »

Right, turn based it is. Yes! then i can just run a cron job every hour to calculate the results of everything! winner!


I hereby declare my undying love to you all!

/gos back to designing tech trees.
Vowles
Sir Didymus
Sir Didymus
Posts: 376
Joined: November 9th, 2004, 10:26
Location: Uk,Bristol
Contact:

Post by Vowles »

Yay!

(And I just made myself a new avatar :D )

and omfg

101 POSTS WOOO (1 Late but hey)
TezzRexx
Dr Zoidberg
Dr Zoidberg
Posts: 4072
Joined: February 8th, 2005, 15:54
Location: BURMINGHUM, England
Contact:

Post by TezzRexx »

I would also like to give encouragement, since as i'm not too sure about anything I've just read.

and woo to mr. vowles and his new chav strike avatar! :D
spoodie
Site Moderator
Site Moderator
Posts: 9246
Joined: February 6th, 2005, 16:49
Location: Essex, UK

Post by spoodie »

sounds interesting but over my head too, have some of these

Image

but if you have any questions about cron I should be able to help, not that there's a lot to it, cron is pretty simple
Renegatus
Shark
Shark
Posts: 263
Joined: January 19th, 2005, 16:20
Location: Wolverhampton
Contact:

Post by Renegatus »

Dog Pants wrote:Holy shitballs! You're way too clever.

The only help I can give you is encouragement.



*encourages* :thumbsup:
Pfffffffft, ha ha ha! Tea-on-monitor moment.
Roman Totale
Robotic Bumlord
Robotic Bumlord
Posts: 8475
Joined: October 24th, 2004, 0:27
Location: Manchester, UK

Post by Roman Totale »

13 replies and so far no-one has suggested CIIJASIIE?

I am disgusted.
Vowles
Sir Didymus
Sir Didymus
Posts: 376
Joined: November 9th, 2004, 10:26
Location: Uk,Bristol
Contact:

Post by Vowles »

CIIJASIIE?

Be this witch craft and now I've read the word Iam hexed unless I send this to 15 people?
Grimmie
Master of Soviet Propaganda
Master of Soviet Propaganda
Posts: 7672
Joined: February 5th, 2005, 19:00
Location: Birming-humm, England
Contact:

Post by Grimmie »

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!
shot2bits
Zombie
Zombie
Posts: 2082
Joined: February 7th, 2005, 17:40
Location: england

Post by shot2bits »

Roman_Totale wrote:13 replies and so far no-one has suggested CIIJASIIE?

I am disgusted.
well u just fulfillied that task then didnt you, and everything bout coding went WOOSH!!!
Woo Elephant Yeah
Heavy
Heavy
Posts: 5433
Joined: October 10th, 2004, 17:36
Location: Bristol, UK
Contact:

Post by Woo Elephant Yeah »

No no no people, it's now officially CIIJA5IIE*

Cover it in jam and 5punk in it's eye
Renegatus
Shark
Shark
Posts: 263
Joined: January 19th, 2005, 16:20
Location: Wolverhampton
Contact:

Post by Renegatus »

Woo Elephant Yeah wrote:No no no people, it's now officially CIIJA5IIE*

Cover it in jam and 5punk in it's eye
Ooh, sticky. Reminds me of a Teddy Bear's Picnic I once went to. I read the sign wrong - it turned out to be Teddy's Erotic Bare Picnic.
Post Reply