Vallar's Forum Posts

  • I tried with a cell size of 0 and still it doesn't enter through the image and reach the center of the object. I believe the object is considered arrived once it touches the borders of the object set as "destination". I followed what you said and it works when I just use the On Arrived and change position.

    Another solution I thought of is instead of setting the destination to an object, I would set the destination to an X and Y position. Still it won't move the object till the PF object would be centered on the location, but it would be far nearer than the original general position of an object.

    Thank you very much for the help!

  • Did you check the origin point to see if it is the middle of the sprite? In the image editor. Each frame can also have different origin points as well, in case you are using multiple frames.

    It is the default origin point -- I didn't mess with it; so yes, it is in the middle. I have no animations, they are all place holder art.

  • Hello,

    So I am trying to get an object with the default Pathfinding behavior (no changes) to move over to the same location as an object but unfortunately it isn't happening. It is either moving over to the top or bottom of the object.

    Here is what is happening:

    Here is my CAPX:

    I tried to add to Buildings.X (Buildings.Width/2) so as to get it to go in the middle of the building and same for height. It didn't work out. Thing is, you see the small green square going to the top right, right? If I change the navel colored sprite (bottom one -- target sprite) to another different sprite, it goes to the top left (even if it is the same size but slightly above the current target). If I change the position to something else it might end up at the bottom right.

    Am I missing something? Or am I doing something wrong?

  • rexrainbow

    That is exactly what I did with your example, I changed everything with my own stuff and it didn't work.

  • I could log the received message in console log. It is worked. And you can see the message data in dashboard before you close the app web page.

    Here is the minimum capx of simplemessage plugin.

    When you say you saw the message in the console log is that in my CAPX? If so, do you have any idea why it isn't displaying the chat box?

    I tried your CAPX out and it produced an error as there is no API Key in the Firebase V3 for Firebase. So what I did is that I replaced all the information in the Authentication with my own project (API Key, Server Key, Storage Key, etc...) and tried to run the app. It ran, but still whenever I type anything it doesn't show up in the chat box. Would it be a problem with my Firebase?

  • I have no idea why it does not work, you might provide a very simple test capx to me to debug it.

    Sorry to be a bother and thanks a lot for your help. Here is the CAPX:

    https://www.dropbox.com/s/9hsbwo5akhlve ... .capx?dl=0

  • Action in event 3 is sending message only, it will trigger event 4 to display received message.

    Designer does not need to display message in event 3, because event 4 in sender will also be triggered. It is different from official MP, which the sender will not receive his message.

    I am not completely sure what do you mean. If you are referring to second action in the 3rd event:

    Set Text to Test_Message.Text

    That was a debug action I already removed where it sets a different text box from the chat box (a debug text box) to confirm that this event actually runs and that the problem is Firebase related not my C2 logic.

    Right now what I have is the same exact as what you see but all the "Test_T" lines with Set text to are all removed (they are only debug ones).

    Problem is, even if the sending should trigger receiving, that doesn't happen. Am I doing something wrong? I even went to the Firebase database and found NOTHING in it. The messages aren't added to the database at all.

  • 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.