johnsrd01's Recent Forum Activity

  • c2community.ru/forum/viewtopic.php found this on the Russian community... however i know there is one here but cant find the download link try searching in the completed addons list

    also there is this post

    and im guessing ur sudden interest in agar.io is because of the upwork project? you should not do it in C2... its limiting ur options for future development.. and being a part of that thing ...

    however can be done with a server database create ur own normal server using Ajax with a custom script that saves characters locations... rooms made... etc ... and its done. you can rent a cheap server for startup so u will run 24/7 for a few months at a low cost... but ul need more advanced knowledge in php and MySQL but its possible anything that comes with complexity wont be easy... even if u use a easy to code program... at some point youl need actual knowledge or a skill set in something

    Thanks for the reply.

    I've found it. Find ThePhotons in members and look at his forum activity.

    As for Agar.io, I don't actually know what project you're talking about. I've only played that game once a few weeks ago, I just used it as an example. I don't play it.

    I've been playing with databases, and implemented a few solutions. But I'm still looking, you know, an easy solution is the best one! I'm looking for the limit.

  • Photon is probably your best bet with construct2, they even have a plugin floating around here for C2. Works pretty well. You pay for what you use.

    Thanks for the reply.

    I've only read the front page so far. Seems good, but let me quote. "All Photon Cloud products are based on a client-to-server architecture, the most stable solution for multiplayer games! In peer-to-peer architectures clients often cannot connect due to NAT punch-through issues." How is WebRTC going to fit into that?

    Also can you show me that C2 plugin? I can't find it.

  • So, I was thinking. Let's assume, you create an Agar.io type of game (completely feasible) with C2. Let's also assume it becomes a hit, and 200,000 players play (want to play) it at any moment, ~100 players per server. I'm perfectly aware, that getting such success is no everyday thing, I'm just playing with some ideas.

    Now, I've seen Ashely say that right now, the only way to host multiple rooms is to open multiple browser tabs. Perfectly fine for a game with a small user base. But let's see what I said. 200,000 / 100 = 2000. You would need to open TWO THOUSAND browser tabs. Even for a game that maybe only 10,000 people play any moment, you'd still need to open 100 tabs. That's just not practical. And remember, 100 players per room is a relatively big number. And of course I'm talking about a dedicated server.

    Isn't here any way right now two accomplish dynamic room/server creation/handling?

    I understand WebRTC is still a relatively new technology, and not very common for games. Obviously, one way of making it more widespread is making games using it. I'm also aware, this not not a shortcoming of C2 itself. I don't see any obstacle to creating a very successful non-multiplayer game using C2. I can still see a potential in it though, but what I just described doesn't sound too good.

    Any thoughts?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Further tests:

    • Timer set to 10 seconds --> triggers in 15 seconds
    • set to 20 --> triggers in 30
    • Tried not starting the Timer from a function --> nothing
    • Tried writing my own timer, subtracting dt every tick --> same result

    Only happens when I host the room on the computer running the game at 20 FPS. Reason for that is, it's an older computer with integrated graphics, and no WebGL support. When my more powerful computer hosts the room (60 FPS), everything works fine.

  • Hey,

    I have noticed that a Timer that is set for 4 seconds triggers correctly on a computer running the game at 60 FPS, but it only triggers after like 6 (six) seconds when run at 20 FPS.

    How is this?

    Edit: I didn't mention it, but I was talking about a multiplayer game. I tested it in a not multiplayer game, and it works just fine. Is there a problem with the Timer in multiplayer? Only the host starts the timers, reacts when the timers trigger, and updates the peers.

  • Okay, so I've learned that contextmenu events don't work in Firefox on disabled elements. My Textboxes must be disabled for them to look like text, because otherwise there's a caret and in-game RMB events don't fire.

    I'm gonna wait a little more, maybe somebody knows the magic trick, but I can foresee an increase in my memory usage because of Spritefonts... I use different font faces, styles, sizes, colors, etc. Shit.

  • johnsrd01

    Try this one:

    Thanks man, exactly what I was looking for!

  • Thanks for the replies, but still not working. Context menu still appears in Firefox when I right click a Textbox.

    I don't mind if Shift + RMB brings up the context menu, as I'm not trying to defend against content theft, since this is not the right way to do it. It's easy to work around it. I'm talking about simple right click on a Textbox. I use CSS user-select: none, but that only prevents highlighting the text.

    I've tried a couple of other scripts as well, none of them seem to work. And yes, I'm using the latest Firefox.

    Other ideas?

  • Hey,

    I have a game that makes excessive use of right click and has a bunch of transparent UI (text) elements on the screen. Now, those "Text" objects are really stylized Textbox objects. I use the Advanced Textbox plugin + some extra CSS. This is because making Text look the same on all browsers is a nightmare, and Spritefont isn't flexible enough for my needs.

    I know C2 prevents context menu from opening on right click, but that's not the case with Textboxes apparently. I've added a little Javascript using the Browser object:

    document.oncontextmenu = document.body.oncontextmenu = function() {return false;}

    Works fine in Chrome and Opera, but NOT IN FREAKING FIREFOX.

    How do I disable context menu from appearing in Firefox when right clicking a Textbox?

  • So, I as I said, SpriteFont is not an option.

    What about using TextBox and styling it using "Set CSS Style" action to make it look like simple Text? Because TextBox positions correctly.

    Is there any reason (performance, compatibility, something like that, not because it's a funny workaround) not to do it?

  • IN CASE NOTHING ELSE WORKS:

    Or an awful solution could be if you use the "name" property of the browser object and -> if firefox -> reposition texts.

    It even hurt writing this all down

    Haha, that would be madness.

    Uninstalled both browsers using Revo uninstaller, reinstalled them, still nothing. Tried Rex's Tag Text plugin, same issue. With that, I have yet another problem: it only positions correctly horizontally if I use left alignment, or if I use Firefox, where it works fine. There's something funny going on on my computer...

  • Thanks for the reply Borgi.

    I've heard that too, but I don't think it would be this severe.

    Interesting thing is that I used a Google web font, and after disabling it and using default Arial they are now positioned correctly, aside from the minor rendering differences you mentioned. But I don't really want to use Arial.

    Spritefonts aren't really an option for my game though.

johnsrd01's avatar

johnsrd01

Member since 31 Jul, 2015

None one is following johnsrd01 yet!

Trophy Case

  • 9-Year Club

Progress

9/44
How to earn trophies