Juanito-cnstrct2's Forum Posts

  • Thank you for your suggestion, but Is there a specific setting for 8 direction to allow rotations with the left and right key? I tried 8 directions before, but when i press left, it just moves left. I need the sprite to rotate only when left is pressed.

  • Yes, you could have collision. My problem with the demo is that i am using the c2 "move foward" action to move the sprite and it is not stopping at the wall even though the wall is set as "solid". I am sure i am missing something very obvious amd easy to fix, i just have not figure it out, maybe you can help me?

    I basically want the sprite to rotate with left and right key and move back or forward with up and down. Right now i am using "set angle" and "mive forward" (none of the built in movements).

  • Update 3/31/12 I created a new, more complete game using this plugin:

    http://mathbattlegame.appspot.com/static/PhyFPS/index.html

    I submitted it to the HB Games contest:

    http://www.hbgames.org/forums/viewtopic.php?f=293&t=76413

    Update: Now you can shoot "bullets" by pressing 'Q'.

    I also added the download to both the plugin and the demo at:

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

    The name of the download is copperlicht-c2-plugin-v-0.9.zip.

    Please note that to run the sample capx, you will need to export it to your web server (either local server like IIS express, apache, etc. or to a external server). The reason behind this, is that copperlicht will try to load the external file containing the level made in Coppercube. I could not find a way of embedding that files and the texture files needed by that file in C2's debug server. I personally use IIS express to test the demo in my computer.

    Another thing to note is that there is a lot of trial and error trying to match the coordinates between copperlicht and C2. For example, for the walls, I used coppercube to design the 3D level and "measured" the units there and put the objects in the same place in C2's layout.

    --------

    I am working on a plugin that would allow you to present your C2 levels as 3D levels in copperlicht. Here is a demo so far:

    http://mathbattlegame.appspot.com/static/copperlicht/tutorial2/index.html

    I synchronize the positions and rotations between C2 and copperlicht, so copperlicht is just a "screen" for C2's logic. In the demo you see that you actually move and rotate the C2 sprite, and copperlicht is just being told to imitate the pos and rotation. This will allow you to use all the nice things from C2 and show them in 3D.

    I will work on the plugin more and put a link to a capx and the plugin files.

    Note: this plugin and the demo require WebGL because of Copperlicht(tested in Chrome).

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

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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!