Juanito-cnstrct2's Recent Forum Activity

  • If you want C2 to display a list of available servers, i.e. a lobby, you would have to code the display logic in C2 and then store the list of servers in a server where anybody can query the list.

    One way of accomplishing that is to create a server side app (php, asp.net, gae, etc) that receives http POST messages from c2 clients who want to host a game. The server side app will store the name of the server and its public ip.

    the servers side app would also accept Get messages from c2 clients who want to retrieve the list of available servers. The server side app would pull the list from its database. Because the list will have the ip of the servers, you can add logic to c2 to use that ip when the user chooses the server and clicks Connect.

    There are many ways of implementing lobbys, but i think the above would be the easiest for c2 users.

  • Thank you Zack0Wack0! this is a great plugin. I had to make some chnages to make it work and it worked really well. I created a simplistic shooter and it worked in chrome and my computers at home.

    The post with the capx is here.

  • Update 9/22/2012: Please try JohnnySheffield new plugin at http://www.scirra.com/forum/plugin-zack0wack0s-socketio-mod_topic56503.html. He updated the plugin to work with minify and other goodness. Thank you.

    Based on the work of Zack0Wack0, I was able to modify a little bit his excellent socket.io plugin and created a small top-down shooter game.

    To download the demo and the modified version of the socket.io plugin, please go here and download the "socket-io-mod.zip" file.

    Before you can use the plugin and the example, please install node.js and socket.io as Zack0Wack0 explained in his post. If you are using Windows, I strongly suggest that you open the CMD, cd to C:\node_modules (create that folder is not present) and run the "npm install socket.io" from there. It seems that Node.js has "C:\node_modules" hardcoded as one of the paths to find installed modules.

    Instructions

    Once you install node.js and socket.io, you can CD into the folder that contains example_server.js and type "node example_server.js" in the commnad prompt. The server will run listening for connections on port 8099.

    Open the capx and run it, make sure the "ChooseServer" layout is the 1st to run.

    For server address you can enter the IP of the computer that is running the server, if it is the same computer, you can enter 127.0.0.1.

    Enter 8099 in the server port and click Connect.

    If you run the capx in another computer, make sure you enter the appropriate IP address of the computer running the node.js server.

    You can also try to run two separate instances of the game in the same computer by just opening two broser windows and going to the address where you game is (default for preview localhost:5000).

    I have only tested it in Chrome and Windows. Also, if you want to export the project, avoid checking "minify" for some reason I can't get it working with that, I think Zack0Wack0had the same problem.

    You can watch a video of the sample game in a LAN here

    Update 4/19/12:

    I wrote a new post in my blog on how the multiplayer demo works in Construct2:

    http://jptarqu.blogspot.com/2012/04/how-to-create-online-multiplayer-html5.html

    I also uploaded a new video showing an iPad connecting to the game:

    Subscribe to Construct videos now
  • Good job rexrainbow with the "object type" mod!

    I have not have too much time to work on Construct, but I am glad the community is improving the plugin.

    Like rexrainbow said, the world object allows you to ZSort only the layer that the ZSort object belongs too. All the other layers will not be touched.

  • I recently noticed that the tiled background version of the plugin will only load the images if called from certain conditions like "start layout".

    The original version of the plugin (link at the first stop) should work when called from any condition as long as there is a sprite in the layout.

    unfortunately, I will not be able to work on fixing the plugins for a few weeks, so if anybody wants to you are more than welcome to modify the source code and release the fixes.

    Thank you all for your feedback!

  • OK, I released the plugin and sample and put the link in the original post.

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Update: The plugin is ready. You can download the ZSorter.zip file containing the plugin and the sample project test_iso.zip from:

    http://sites.google.com/site/jptarqu/downloads

    The plugin has one action ("Sort All Objects in Layer By Y") that you can call every tick. The action will sort all the objects of any kind in the layer that the ZSorter object is in. The objects are "Z sorted" by their Y position; if the Y positions is the same, they are sorted by their X position.

    The sample project contains a layout with multiple objects being sorted in a layer. There is also a FPS count to determine how much impact the sorting has as the objects grow in number. I did not notice any impact in my system, but your mileage may vary. The sample also illustrates the technique of detecting collision with shadows instead of of the arpites themselves to allow sprites go "behind" a wall.The sample's walls are too small to notice the difference, but with if you are good at drawing you can make better walls and better shadows.

    Please keep in mind that there is more to isometric games than sorting Z positions by Y. You need to take into account shadows (for collision detection), origin points (to allow players to walk behind walls, in the sample the Duck's origin is at the bottom and the wall's is at center) and more. Have fun!!

    Thanks

  • Here is a small sample project:

    https://sites.google.com/site/jptarqu/downloads/loadimage_test.zip?attredirects=0&d=1

    One caveat (bug?) of the plugin is that it needs at least one sprite to be added to the layout. If there are no sprites, the image loaded from the URL won't draw into the canvas.

    Also, I have not tested the plugin with the webgl option of the latest release.

  • Thank you, Animmaniac, for your suggestion. I went ahead and created a new plugin ("Tiled Background From URL") based on the Tiledbackground plugin. It is pretty much the same plugin with the addition of allowing you to load the image at runtime and a condition that will let you know when the image has been loaded. I tested the hotspot and Opacity and they worked. I was not able to make the effects works. Anybody with more experience on Construct effects is more than welcome to mod this plugin to make it work with effects. The new download link is below:

    Download new mod

  • I finished my first plugin. It will allow you to load an image from an URL at runtime. The image position/size is determined by where you place the object in the Layout screen.

    You can download it from the following link:

    LoadURLPlugin

    Thank you!

  • How to do I change the Z Order of an object at runtime to a certain value?

    I am trying to make an Isometric game and one of the tricks for making the graphics show up in the correct order is to use something set their Z order to -1*(Y position), something like this:

    Event: always

    action: Set Z = -1*Y

    I tried Z height but it actually scales the object.

    Thanks in advance!

Juanito-cnstrct2's avatar

Juanito-cnstrct2

Member since 26 Apr, 2010

Twitter
Juanito-cnstrct2 has 1 followers

Trophy Case

  • 14-Year Club
  • Email Verified

Progress

15/44
How to earn trophies