Online Game using HTML Object - Theory

This forum is currently in read-only mode.
From the Asset Store
With this template you will learn how to use the GooglePlay Games native plugin
  • Interesting theory.

    I may have to resort to something like that if I can't find the CSX file for the experimental online plugin. I have the CAP but no CSX.

    I'm wondering how fast this method could be? Also... it may run in to issues if there are a lot of users online... trying to figure out what messages are supposed to be used for whose character on what IP address etc...

    I'm tearing my hair out just thinking about it D:

    ~Sol

  • I has an idea. How about making a simple local http->public socket relay thingy in c++/perl+perl2exe/whatever, and use the HTTP plugin to send the appropriate data to http://127.0.0.1/, and having the program send that data to a server through socket? Or you could use files or the command line plugin so you wouldn't need the HTTP plugin at all... (I am tempted to try this myself, a pong game or something wouldn't be too hard as a test...)

    EDIT: with the localhost http version, I assume speed isn't a problem if the server is on the same machine?

    EDIT2: That covers sending the data; not sure about receiving, perhaps files? Would temp files between the relay program and Construct be fast enough?

  • The simplest solution is probably for someone to write an online plugin

  • Interesting theory.

    I may have to resort to something like that if I can't find the CSX file for the experimental online plugin. I have the CAP but no CSX.

    I'm wondering how fast this method could be? Also... it may run in to issues if there are a lot of users online... trying to figure out what messages are supposed to be used for whose character on what IP address etc...

    I'm tearing my hair out just thinking about it D:

    ~Sol

    It wouldn't work for anything that needed to be quick (shoot-em-ups requiring perfect timing probably wouldn't handle well with it), but adventure types could be ok, little mini-mmo's and the like. Though I suppose it depends how fast construct could parse the IRC log file for updating character movement.

    You'd not have to worry about IP's. Parsing the output from IRC would get you the time, their name and then whatever info was in their message. Something like (super simple example). Since you can't have duplicate names on any one IRC server, it would cover the job of IP addresses, and of course something like nickserv could be used to protect your characters name.

    05:49:32:Frank:024:189:897324:hey guys whats up:

    Using : as a separator, you'd get

    hour,

    minute,

    second,

    username,

    X coords,

    Y coords,

    set of numbers which would set how the player looks (if there's a choice of appearance) and could show extra's like item carried or something too,

    message written, if any.

    As for the problem of slowdown with lots of users. I thought at the time of using different IRC channels for different locations. It was easy enough I recall to change channels via scripts (this was all tested in mIRC at the time). So as you move around different locations in your game, your disembodied internet soul does the same in IRC. You could even limit channels to a max number of users, this would give a message if the channel was full, which construct could look for and inform the user in the game that the place is full too.

    Private messages in IRC could work fine for private chatting among players in the game, and perhaps also trading of items too, and some kind of 1 on 1 dueling.

    Unfortunately it was all worked out as a graphical chat thing done on the cheap. So there was nothing worked out to handle NPC's or proper fighting. But thinking about that now, the simplest way would be IRC bots, as they would update everyone at the same time, just like the players would. Keeping themselves in synch with everyone in the area.

    Storing player data - inventory, progress etc. Could be handled by another bot, just like many of them do for those generally annoying IRC gamebots that keep players scores. The only problem is something like this would generally not be very secure, and likely very easy to cheat on, unless the player output used in IRC was encrypted somehow. But that would be cracked eventually too.

    -

    Another method, which would be much slower and really only of use for turn based games, would be using the Get and Post tools, and uploading movement and changes to a website. That would work as-is for a two player turn based game. Or using PHP and a cron job, it could be made to handle more players as well as fancier extra's.

  • The simplest solution is probably for someone to write an online plugin

    Been waiting on that for months :/

    Also, Dataflash... If you test anything out, I'd be keen to see how it works out. If it's plausible for something simple, it may work for something more complicated.

    Keys

    Hmmm well that sort of confirms the IRC idea... though I would have no idea where to start with something like that. It's been so many YEARS since I've used IRC I would have to relearn all of that stuff just to get a room going with reliable bots... which would then need programming scripts etc etc.

    I am still determined to find a way... I work with the tools I have... and since I don't have a proper tool, I will dodgy something together and make it work as good as it can.

    Thanks for your input everyone... I think I have enough information thusly to realise this won't be easy, but should at least be possible to some extent. If anyone gets all excited and starts playing with this idea themselves, please share any results you find so we can all learn from it.

    ~Sol

  • > The simplest solution is probably for someone to write an online plugin

    >

    Been waiting on that for months :/

    Also, Dataflash... If you test anything out, I'd be keen to see how it works out. If it's plausible for something simple, it may work for something more complicated.

    Keys

    Hmmm well that sort of confirms the IRC idea... though I would have no idea where to start with something like that. It's been so many YEARS since I've used IRC I would have to relearn all of that stuff just to get a room going with reliable bots... which would then need programming scripts etc etc.

    I am still determined to find a way... I work with the tools I have... and since I don't have a proper tool, I will dodgy something together and make it work as good as it can.

    Thanks for your input everyone... I think I have enough information thusly to realise this won't be easy, but should at least be possible to some extent. If anyone gets all excited and starts playing with this idea themselves, please share any results you find so we can all learn from it.

    ~Sol

    The mIRC part shouldn't be all that difficult. When I came up with it I only knew the very basics of scripting for it. So if I could understand it back then, you'd sail through it, lol. I do remember creating a bot that behaved so much like a human, people thought it really was. I was so proud hahaha. A quick search on google though appears to show it can do even more than what I mentioned. Making Dll's for it and the like. Chances are you could probably get damn close to real time online play.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Open Tibia uses HTML Objects and it works perfectly. The only thing that would give it unlimited ability is if you edit the Open Tibia source(c++) to remove whatever limitation you may experience, but for people without c++ experience, they still have a whole lot of options by just knowing HTML and can pretty much customize the game in hundreds of different ways.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)