Juanito-cnstrct2's Recent Forum Activity

  • Plague : I have never used openfeint before. For server side code, I always use GAE (google app engine), which is a free hosting (up to a limit) service that allows you to write custom server code in python. I suggest learning and using that because it will help you in the long run.

  • Plague : one way of doing the ghosting would be to record the key presses (up or down) that a player does and record the time (relative to the start of the turn, current_time - beginning_time) when that event happened. You could store that info into a string by appending to the string every time that event happens, and separate the info with commas to separate events and a ! for separating the time from the event type. At the end of the turn, your string would eb something like:

    L!D!3.10,L!U!7,L!D!14,L!U25...

    Where L is a code for the Left key, D is key down, U is key is up and the numbers are the seconds since the start of the turn. Now for smarthphone, I am not sure what events you will use to move the player, but you can use the same idea. When the turn ends, you can send the string via AJAX to your custom server (you or somebody will have to write the server-side code) and when the other player (player2) can chooses to refresh his screen to receive any new data, your C2 code will need to do another Ajax request to ask for any new data.

    Your server side code will need to return the string sent by the other player. Once the string arrives at player2 via Ajax, you can devise something to split the string into arrays and then call each of the events at the time associated with them by using the compare "Compare Time" condition to compare the relative time with the time registered in the string for the 1st event.

    The above is a very high level overview of what you could do, it will take you some time to tune up by trial and error and may or not work for you.

  • Thanks rgros, I did not know there was something already to lock the mouse in HTML5. I will try to integrate it with my 3D plugin in the future. Right now my sample FPS is a DOOM style FPS (no up or down movement; just left, right, forward, backward movement)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Rasmus : I think I had the same problem. 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 the installed modules.

    Also, I did some small modification to the plugin to make my sample game work, please see my post here if you want to download the sample game and the modded plugin.

  • klukke: There should be a sample file named "loadimage_test.zip" in https://sites.google.com/site/jptarqu/downloads.

    Thanks

  • delgado : the copperlicht level won't work in C2's preview. The detailed explanation for this is in the 1st post of this thread; it basically comes down to the fact that I do not know how to embed the coppercube level file and its related files (everything that is in the "copperlichtdata" folder) into the Preview sever.

    If you want to run the game with 3d, you need to export to your local or external web server and make sure the "copperlichtdata" folder is in that server as well.

  • Thanks Kyatric, that is exactly what I needed!

    I updated the demo. 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 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.

  • smitchell: I have the following events and actions right now to allow the sprite to rotate left and right and to move forward or backward in the direction the sprite is facing:

    <img src="http://mathbattlegame.appspot.com/static/copperlicht/tutorial2/Capture.PNG" border="0" />

    The problem with this is that it does not use the built-in movement behaviours, so the object is not stopping when colliding with solids. newt suggested using the 8-direction behaviour, but that does not work because the sprite can only move in 8 directions and not any direction like the demo does right now. I could copy the the 8direction behavior and mod it in javascript to allow moving in any of direction (any of the 360 degrees) ; but before doing that I want to make sure I am not re-inventing the wheel by doing something that can be accomplished with the already-made behaviors. As always, thank you for your time helping me.

    Animmaniac: I did not know there was an irrlicht plugin for MMF :), I bet that was a very welcomed addition to it. The last click product I used was MMF classic (v1.0) and before that, Klick and Play. I loved the days of Klick and Play when every body was sharing their code files in the maxis website, a lot of people built on top of other people's work, that was my first exposure to "open source code" (if you can call it that :) ). Anyways, glad to see another ex-click here, I am very excited about C2, building plugins for it is like 10 times easier than building them for MMF 1.0.

  • ok, I tried set angle when left or right is pressed. I also added set speed(from the 8directions behaviour) when the up key is pressed. However, when i press Up, the sprite is resetting the angle to zero and then moves to the right.

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

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