Vallar's Recent Forum Activity

  • I could not see that images.

    Sorry about that, I fixed the images. Should be fine now

  • To build a network game on some new platform, the 1at thing is to make a chatroom and now you've made it. And next you can try to build a 2-player version (one uses wasd, the other uses arrow keys) with several sub systems implemented. Then you'll think about how to organize a room/world, ramp up Max players numbers gradually.

    Every network game has different bottlenecks and you'll never know what they are before you implement part of it. Moreover, those problems are usually resource dependent which means money can solve your problems ,usually. For example, Counter Strike has 20 for its max players, while a text turn-based mud allows more than 200. If the designer pays for a better server, those numbers could be change.

    No matter you choosed MP or firebase, you'll need a always-on Host/Server build by C2. By far this architecture is in unknown water, I never heard anyone who had run this kind of system for some time. If you have any info or news, we'll certainly be happy to hear that.

    I don't have other book or article to recommend currently, I'll be aware of this topic and share some info if I find something.

    Start your prototype today!

    Thanks a lot for the advice and the encouragement. You are right on all accounts. At the moment I am trying to recreate the chat app using Firebase. While I understand little of it, I tried on my own and wasn't able to reach much. But looking at BigMap V3 example I was duplicated the exact same actions (using my own settings) but I am unable to get messages to display.

    Here are the two actions:

    Rex's actions:

    Mine:

    Currently, I am able to list all users without a problem. Change a user's display name on the Firebase database and pull it to display it (aside from the normal register and login).

    I thought at first it might be something with Construct 2 so I tested my actions offline and they work normally (not using Firebase to send and receive messages). Any idea what I am doing wrong?

    NOTE: I am posting here as I think if I post another thread it will be spammy and since we are on the same topic I thought it is better to use this thread.

  • You can try to make a prototype to lower down risk with limiting your goal to about 50 people simultaneously online. Then think about how to scale it up in later versions.

    I found some points to address in the last discussions:

    1. C2 MP uses webrtc, which might be blocked by some firewall.

    2. You will need more knowledge about how to make a network game before you going from arcade/console games to network game.

    Here is one book of my favorite (written in Japanese, Chinese version is also available)

    http://www.amazon.co.jp/%E4%B8%AD%E5%B6 ... B0050QL3S2

    3. Anyways, a 50 to 100 player would be a good starting point.

    Thanks for your reply. That is the target actually, start with a MVP to see how far I can go then think about scaling it.

    I have read my way through the C2 MP tutorials and I understand the basics, and duplicated the Chat example too. As for the book recommendation, unfortunately that page is completely in Japanese and I couldn't understand anything (I am guessing the book isn't available in English). I don't read either languages would there be any book in English that you can recommend? Perhaps even tutorials or something that can assist with using Construct 2 even?

    Thank you very much in advance.

  • Thanks for the motivation boost . I just sometimes find it hard to start. I did try the local storage idea, but it seems local storage is controlled by the browser and limited to 5MB and in some cases to 50MB which I believe won't be enough for this type of game. Unless I am mistaken. I'll try further and see what can come up with though.

    rexrainbow is there any chance of a guide or a tutorial that exists somewhere on how you did that CAPX with Firebase? The persistent world demo?

    EDIT: I am thinking a real time MUD might be a bit complicated, perhaps something like Kingdom of Loathing is easier to make using Firebase and Construct 2?

  • and jomo thanks for your replies guys.

    I read in another thread (I think it was called the Multiplayer Discussion Thread or some such) that the MP plugin while it is P2P, at the end of the day there is a host (server) and a peer. So essentially there is a server, albeit not quite authoritative but from the discussion it seems you can make it so.

    On the other hand, what I was thinking if I use the MP is perhaps create the "server" part where it stores locally the values that needs to be synced like a login similar to the below tutorial:

    https://www.scirra.com/tutorials/276/wh ... ct2/page-2

    That is one method for it. However, another method I was thinking is using the Local Storage plugin to store the information that should be synced on the server machine. That server machine would have the game running all the time and within the game there is a check if the server machine is online and is the one currently being host. If that checks out, the data is pulled/pushed using the Local Storage plugin.

    Another way I am thinking of is to store the data in Array as mentioned by you oosyrag and use broadcast message when the a part of the array is altered and broadcast that alteration only. That way I don't have to get into the whole .AsJSON getting long = more bandwidth (not quite sure how all of this will pan out though).

    Since they are all theories and ideas, how feasible they are or even logical is something I am unsure of. It seems legit in my mind but perhaps I am lacking some knowledge that renders what I am saying impossible. Any thoughts or insights?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The whole of MMO/MUD is very - very complex.

    Here is a demo I made before, to sync the position of players (only). It does not have inventory system...

    Big map ( Capx )

    - Enter display name at top text box, then click a character at bottom 5 characters to enter map.

    - press arrow-key to move left/right/top/down, or dragging left/right/top/down to move.

    - Online players will be shown at bottom with name and current position.

    - You might try open more than one page to test it.

    I agree MUDs are very complex -- I am not going to argue. Although, it seems people recommend to start with them when creating multiplayer games to learn. That said, this is more of a pet project I had in mind for a while and wanted to sink my teeth into something complex.

    I have tried your demo and it looks amazing. I have looked into the CAPX but some of it went over my head. However, I saw that you can add a parent to the database in Firebase by using different ItemMonitor plugin into the layout (or so I understood from your CAPX).

    This, however, had me question my choices; for a beginner with databases, multiplayer and servers, would you recommend using Multiplayer plugin or Firebase? I am trying to do something similar to:

    http://revelationgame.blogspot.com.eg/ or this image http://www.godwars2.org/images/plugin_v115_3.png

    Any info, guidance or tutorials are much, much appreciated

  • oosyrag Thanks again for your reply.

    After reading around the forums for a while now about this, it seems there is an issue with the length of the string from the .AsJSON. If it is long then it would waste bandwidth so it may not be feasible with longer arrays. However I am unsure which length is considered long and therefore wasting bandwidth, I can't find a mention of that anywhere.

    Any comments on that part?

    [quote:5cewj1xp]

    Regarding Firebase, sorry I'm not too familiar with the specifics so I can't help you much with details. I just have an idea of the general concept of using it, and haven't worked with it myself yet.

    I went into the web environment for Firebase and went through the Databse and found that while the structure is as follows:

    appname

    -parent

    --child1

    --child2

    You can actually have children of children and multiple subchildren too but you can't have multiple parents (or so I understand it) so you can have something like this:

    appname

    -parent

    --child1

    ---subchild

    ---subchild1

    ---subchild2

    --child2

    ---subchild

    ---subchild2

    ----subchild of a subchild

    ----subchild of a subchild

    -----more subchildren of subchildren

    I am unsure why we can't have multiple parents, can have this tree structure like that, It also can be imported and exported as JSON. In theory if that is the case, so instead of arrays and multiplayer object one can use that database as the structure as you mentioned before. I am just missing the link in my mind on how one can structure this and make it work in a multiplayer (bearing in mind the JSON feature if that is useful).

    Also, I am hoping for someone that worked with both could reply and give us some insight on the matter. Perhaps rexrainbow can shed some light on how can we use Firebase in a MUD like situation, even? Should I ask this same question in another part of the forums?

  • oosyrag Thanks for your reply. Just to note, the MUD I am trying to create has some graphics in it, not pure text -- albeit the graphics are mostly squares moving on top of a tiled (simple squares with some colors on it) background. To give a proper picture, imagine a very simple map in a game -- that is the graphical part. Along with inventory and character sheet.

    Since I don't have much experience with Firebase, what I understand from this tutorial:

    https://www.scirra.com/tutorials/5015/g ... h-firebase

    The database is structured like the below with the "parent" part is the Subdomain provided in the ItemTable plugin:

    [quote:q6naj2lp]appname

    -parent

    -- key1: value

    -- key2: different value

    So let's say I go through with Firebase, then I would need a "parent" called let's say "player" to store all player data; location, skills, inventory, etc... Another parent would be then required for mobs, another parent for stores within the game and so on.

    But the way I understand it, I can't "add" a parent but only "change" the current parent so I can't have a structure like this:

    [quote:q6naj2lp]-appname

    --player

    ---locx

    ---locy

    --mob

    ---locx

    ---locy

    --store

    ---item1

    ---item2

    On the other hand if I go with the multiplayer plugin, I won't have logins, so there are no accounts and I can't have dedicated players? Unless I am missing something...

    [quote:q6naj2lp]Generally speaking, if you can organize it properly, keeping all information that needs saving in an array would allow for a relatively simple import/export system via Save and Load Array as JSON (which is simply a standard format for saving certain types of information).

    I am sorry that just went over my head. I understand the part where you say that I would store all required data in an array (possibly 3 dimensional? X being the parent in the above example Y being the child and Z being the value of that child). But the JSON part, that I don't understand how can that be done.

  • Hello,

    I am going through the endeavor of creating an online text based game (think a simplified game like A Dark Room) but would like to incorporate some multiplayer aspects to it. After trying many of the tutorials and guides around, I decided on Firebase with Rex's plugins. I was able to create the registration and login system and everything is going fine.

    A simple chat system is also in place (part of the multiplayer features I wanted to add). However, I am unsure how to link between Firebase and the multiplayer aspects of the game?

    How do I save player stats, positions, progress, etc... so that when the player logs back in (from anywhere) he can continue from where he left off (just like MUDs used to do)?

    NOTE: I am generally new to servers and Firebase, I do understand the multiplayer concepts, networking (basic and a bit advanced topics) and I am fairly familiar with Construct 2. I am not familiar with things related to AJAX, Node.JS, etc... that side of Construct I am not proficient with. I would welcome any guides, tutorials, readings, videos, etc... that would assist me to get from where I am to the final product.

    Thank you very much in advance.

  • ,

    Thanks a lot for your help and assistance. This helps a lot! ^_^ Hope your game is going well

  • Thanks a lot guys for your reply. I am checking the example you linked Doesn't seem the easiest but I'll see if I can get around to replicating that.

    LaDestitute that video did the trick, thanks a lot. And thanks again for your help

  • arcab072081 - Yes, I am guessing the collision is detected after the ball moves out of the collision area.

    For the solution of the third problem; that was my initial setup but it didn't work at all. I tried Set Angle towards Position, Set Angle Towards Target, Set Angle, Set Angle of Motion, Set Angle of Motion + Bullet Behavior property "Set Angle". I tried the Rotate towards, Rotate object, etc... nothing worked. :/ Not sure if I am trying something complex, but nothing works so far.

    Thanks for the suggestion though.

    - No, I am not using Bounding Boxes, I actually set the collision to a "Circle" of sorts. The raycasting method you are mentioning, I don't quite fully understand, sorry. You also said you have an example, may I know where can I find said example? I might be able to understand with it, yes.

    For the second solution; yes, the ball is a breakout kind of ball, no direct control. So I would have an event that looks like the below:

    Move At Angle:

    Angle =angle(Paddle.X, Paddle.y, Ball.X, Ball.Y)

    Distance = 1 (this is custom depending on what speed I want?).

    I tried that it worked beautifully, thanks a lot.

    Thanks a lot for trying to help on the third, it has been busting my brain over the past 2-3 days. I tried every combination of angles I could find and setting every angle action in the sheet and trying it out with different things and nothing worked. I am guessing it should be simple but I am not sure why it isn't working.

Vallar's avatar

Vallar

Member since 24 Mar, 2014

None one is following Vallar yet!

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

14/44
How to earn trophies