dryas's Forum Posts

  • Hi,

    I can use the Ajax object to load local stored files (aka "projectfiles") with the "Request project file" function. I want to load level files and I don't want to make this part "hardcoded". With this function I need to select the file to load with a selectbox and can't build the filename dynamically... Is there an option to load this files by dynamically building the filename as a string? Something like:

    Ajax.load(stage & "_" & level & ".xml")

    Any clue?

    Best,

    Benny

  • Hi,

    we've had nearly the same discussion a few days ago:

    Maybe we should exchange some ideas?

    Best,

    Benjamin

  • Hi,

    Maybe someone has an example on using Pathfinding with the multiplayer part? Can't get it to work.

    Best,

    Benny

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello,

    I try to implement the Pathfinding behavior together with the multiplayer object. At the client side I submit the position where the user clicks on the map to the server. On the serverside I loop trough all player objects and set X/Y positions of the "find path". On the client side I can see that the player is moving, but the path only have one node and this is far on the right side of the map, miles away from the position where I've clicked. Any clue how to solve this?

    Best,

    Benjamin

  • Hi,

    UPDATE: Found a solution: https://www.scirra.com/forum/plugin-argv_t111372

    tomsstudio: Is it possible to start the nodewebkit with command line parameters? So for example that I can make something like this:

    ./server --level=woodworld_1 --instance=1[/code:32wogt3p]
    
    At the moment I have to start an own server for every "map" I want to run. In my game the user can create his own char and after that he can choose different "maps" on a gameworld where he can join to play the game. For this I have to run a server for every map which is available for the users. If (for example) each server can handle a maximum of 64 players I have to start a new instance of each map where new players are connected to... some kind of a load balancing... I only wonder how I can get the info to the server which map should be loaded. Maybe I should create some kind of a configuration file and load it via ajax? But command line paramters are nicer in this case I think...
    
    Best,
    
    Benny
  • Hello,

    thanks a lot for the answers, that get things become more clear to me.

    tomsstudio: I know about the problem. At the moment I'm trying some different solutions to get a basic system done that I can use as the base for the project. At the moment I have the client and the server in the same project, defining a global variable defining if the instance is running as server or as client. If it says it's the client and the instance becomes the host I throw an error message saying that the servers are down at the moment and the user should reconnect in a couple of minutes. But that means that I have to export all the time two versions of the project (server and client), but after all everything can be done in one project which should be easier to make changes in bigger projects on a later stage (hopefully).

    For the server I've done a special GUI which looks like this:

    [attachment=0:zwnxwl4n][/attachment:zwnxwl4n]

    I hope that I can solve the performance problems with this solution, but I'm not sure if Construct2 automatically remove the rendering of non visible objects. I have to test this...

    Refeuh: The main two reasons why I want to use dedicated servers is that I want to prevent cheating and that I want to make sure the server has a great connection which is mainly because it's located in a datacenter and not at the internet line of a user. In general Construct2 follows the "never-trust-the-client" principle which is great because it's some kind of an authoritative server model. That means that the clients are only "displaying" what's going on on the server and don't include own "logic" which could confuse the gameflow. If you have a serious gameplay like a MMOG where users can buy items, handle their own char etc. it would be a big problem if the server is running on a client machine because this client can always cheat the game by manipulating the local variables of the javascripts (remember that the exported game is not really encrypted or something). Also he can use some speed hacks etc. If I run a dedicated server on my own machine located in a datacenter, the clients are only displaying what has been calculated on the server, no matter if they hack their local client. It will always be overwritten by the data the server is sending. Thats in my opinion the better model to handle serious games.

    Best,

    Benny

  • Hi,

    one more! Does someone know if it's possible to start a browser from the linux shell without the need of a graphical environment for the use of the dedicated servers? Something like adding the parameter --no-gui on starting chromium and thats all?

    Best,

    Benny

  • Hello,

    first of all: WOW!!!! I've never seen an game engine where you can implement networking that easy! It's absolutely amazing work that you have done!

    But: For my project I need dedicated servers. This works by starting the first instance on the server which will become the host. It's fine for now, but I don't want to distribute the servercode to the users. It's impossible and a "No-Go" for me. To solve this issue I've thought about putting all server code in one event sheet and remove it from the client distribution. But this means I need to manually remove it all the time I want to release a New version. Would it be possible in a future version that you implement some kind of a "build" system where I can create some environments (e.g. "Client", "Server") and configure the event sheets and export options I want to be Integrated in this environment? I think this will not only help in this case but also on multi platform distributions.

    Best,

    Benny

  • yes!

  • Hi,

    it seems like the "gzip" support breaks the support for cocoonJS... When I launch the game cocoonJS gives me the following JS error:

    <font face="Courier New, Courier, mono">JavaScript Exception (Line 16857 File: 'c2runtime.js' Tag: 'script'): TypeError: 'undefined' is not a function (evaluating 'document.write(<script src="</font>

    If I go to this line I'll get this lines:

    <font face="Courier New, Courier, mono">document.write('<script src="zlib_and_gzip.min.js"></script>');

    cr.plugins_.Rex_JSONTMXImporter = function(runtime)

    {

         this.runtime = runtime;

    };</font>

    The file "zlib_and_gzip.min.js" exists in the game ZIP, but it seems to have a problem...

    Is it possible to get a older version of the plugin that doesn't support the gzip features?

    Best,

    Benny

  • Perfect, it works like a charm! ...and it helped me a lot to understand how it works. :-) Thanks!

    Best,

    Benny

  • Changed the link, should work now...

  • Hi,

    I have a small problem with my puzzle game I'm working on. You need to place some bombs on the playfield and then you need to press the play button to start the reaction (e.g. the bombs are exploding).

    If I place one bomb everything is working fine, but if I place two or more bombs only the first one explodes. How can I handle every bomb by their own? I need to, specially because the have different timers (defined as instance variables) when they should explode (e.g. after 2 seconds).

    Would it be possible that someone have a look at my capx? I really don't know how to handle it. :-(

    https://www.dropbox.com/s/uw3dk8ztn2x6lqn/test.capx

    Thanks in advance,

    Benny

  • Hi,

    awesome plugins! Just a small question. If I want to create a map with layered tiles (for example a grass tile on layer 0 (1,1) and a tree tile on layer 1 (1,1) so that they overlap) how can I do it? It doesnt work with the "createTile" method and a differenz "z" index. Any way todo it? I don't want to create tiles for every combination of ground and object (like fences, trees). Any way todo it?

    Best,

    Benny

  • Hi,

    I'm writing a puzzlegame where you need to place some items on a playfield. The game is controlled by touch controls. The playfield is some kind of a tilemap. If the user touches on some location of the tilemap he should add a new sprite directly located on top of the tile he has touched before, so that he can place some items on this "map".

    How can I do it? I'm not really sure how to find the location on the grid where the player has touched so that I can place the new sprite on it?!

    Thanks for any help,

    Benny