cjbruce's Recent Forum Activity

  • Can i build controller.html in C2? or only screen.html?

    Yup! This plugin is for the controller.html.

    Recently I have been experimenting with moving most of my game onto the controller itself.

    Here's my setup:

    1. In the root directory create a screen/ folder and a controller/ folder.

    2. Export your screen game into the screen/ subfolder and your controller game into the controller/ subfolder.

    3. Copy/paste your screen's index.html file into the root directory, and rename it screen.html

    4. Copy/paste your controller 's index.html file into the root directory, and rename it controller.html

    5. Add a line to your screen.html in the header to load all URLs to the screen/ subfolder.

    6. Add a line to your controller.html in the header to load all URLs to the controller/ subfolder.

    With this setup, you only need to replace your screen.html or controller.html when you add a new type of plugin. Otherwise, you can just export your projects to the screen/ or controller/ sub folders, as appropriate.

  • Is there an easy way to use 8 Direction behaviors with Mobile devices? For example, swiping left causing the 8 Direction to behave as if a left arrow were pressed.

    I have found that the easiest and most intuitive way to do 8-direction on mobile is to just use a 3x3 grid of invisible buttons:

    upleft / up / upright

    left / stop / right

    downleft / down / downright

    Logic:

    Is Touching Object (upleft) -> simulate 8-direction "up", simulate 8-direction "left"

    Visuals:

    -Make each of the buttons in the 3x3 grid invisible.

    -Overlay a joystick background (a large colored circle will work) that is stationary and covers all 9 of the invisible buttons.

    -Overlay a joystick (a smaller colored circle) that starts at the location of the background, and changes its location by about 10 pixels toward the direction of whatever button you are pressing.

    I have had less luck with more complicated joysticks. Dragging/swiping controls have always seemed a bit finicky to me.

  • QuaziGNRLnose

    I've been using Q3D without problems for about 6 months now, but this morning when I exported a project, it wouldn't run. Preview works just fine.

    Here is the error:

    Here is the c2runtime.js:

    I am using OIMO physics, and this is a new project.

    Any ideas?

    Fixed!

    I had accidentally used a version of index.html that didn't include Oimo.js.

    Everything is working fine now.

  • QuaziGNRLnose

    I've been using Q3D without problems for about 6 months now, but this morning when I exported a project, it wouldn't run. Preview works just fine.

    Here is the error:

    Here is the c2runtime.js:

    I am using OIMO physics, and this is a new project.

    Any ideas?

  • This is great news!

    X3M

    It would be awesome if we could get the AirConsoleController plugin on C3 as well.

    I've been busy making C2 game templates to integrate the two for generic controllers (joystick, 8-direction, buttons), and would be happy to post them here when ready.

  • tunepunk,

    Any progress on movement or map-making?

    I've gone through a couple of iterations on movement, and basically decided that it is too CPU-intensive to try to raytrace downward to get the height of a player from the ground. This basically leaves creating height maps somehow.

    Also, when you export from Maya, what direction are the objects facing? I'm working with an artist right now who doesn't use Construct 2, and I don't use Maya, and we are having trouble getting things facing the right way.

  • tunepunk

    Nice!

    3D is pretty taxing for mobile, but the best way to get increased performance is to avoid bone based animations and use morph targets (these run almost entirely in shaders so they can be quite fast), and to cap the resolution to something lower than the native screen resolution (in Q3D Master) since mobile GPUs lack the performance to keep up.

    For anyone who is interested, here is a modified version of the morph animation test. I got rid of the 5 point lights, and turned shadows off for the directional light.

    https://dl.dropboxusercontent.com/u/55106174/morphanimationtest/index.html

    Here is the .capx for the test:

    https://dl.dropboxusercontent.com/u/55106174/morphanimationtest.capx

    You can tap the text to get rid of models one at a time until the framerate becomes acceptable on your device. On a 2-year-old iPhone 6, I can have 25 animated models onscreen at 60 fps. On a Nexus 5, I can run about 4 animated models at an acceptable framerate.

  • I managed to solve it. It was pretty easy. I exported a json file with all the animations in one long animation. Then I just opened edited the json file and renamed the frames. frame1-4 idle, frame 5-9 walk, frame 10-13 death etc etc.

    "morphTargets": [{ > "name": "frame_1", < this was the only thing I hade to rename in the json file to have multiple animations. frame_1 was renamed to walk_1 etc etc.

    Might be useful for anyone who is using an exporter that doesn't support multiple animations. Renaming the different frames is enough.

    tunepunk

    Would you mind posting a quick breakdown of your workflow from Maya to Q3D for morph animations? I'm working with an artist now, and we need to go from Maya bone animation to Q3D morph animation for midrange mobile devices.

  • > And then we modify the controller.html by adding controller/ before each href=" an src=" except for those who contain static http: hrefs.

    >

    Actually, there's one thing that could make this easier - if you add <base href="folder/"> in the <head> tag, all requests are automatically made relative to that. But this will still break offline.

    Ashley

    You are a genius. This works perfectly!

    As per X3M and Psychokiller1888 's suggestion, I did the following:

    1. Exported the controller into a subdirectory called controller/

    2. Renamed the index.html file to controller.html.

    3. Added the following line of code to the <head></head>:

    <base href="controller/">[/code:3aff88bp]
    
    4. Exported the screen into a subdirectory called screen/
    5. Renamed the index.html file to screen.html.
    3. Added the following line of code to the <head></head>: [code:3aff88bp]<base href="screen/">[/code:3aff88bp]
    
    With 2 instances of Construct 2 running, the whole process took about 30 seconds.  And I can now keep the controller and screen separate without worrying about deconflicting them every time I change them.
    
    Edit:
    
    I have been playing around with this for the past 30 minutes, and realized that the problems are completely solved with this approach.  Because screen.html and controller.html never change, and any index.html files that are produced in the export process are never actually used after the initial renaming, you can just export the screen project and the controller project to the appropriate subdirectory, and everything just works!  There is no need to rename anything!
  • . cjbruce, X3M

    [quote:gw9gii75]New features ahoy!

    Once the architectural work is done and projects are able to be ported, we'll have a much faster and better base to build major new features on top of. We're keen to address many long-standing requests with the new runtime. Some of the new features we'd like to build on it include:

    Modular event features, aimed at capabilities like building plugins out of events

    Advanced rendering features like mesh distortion

    Rudimentary 3D capabilities like adjusting the Z height of a sprite, and exposing more capabilities to the SDK

    Sub-layers for advanced lighting and blending effects

    Sub-layouts for embedding other layouts, creating split-screen views and more

    Redesigned first-class support for functions

    A built-in color filter feature similar to what we had back in Construct Classic

    A set of new plugins ranging from custom drawing canvases to integrating HTML content

    Add lots of long-standing plugin requests like rotatable 9-patches, scale and rotate Tiled Background image, and more

    Even more ideas in future!

    I'm not sure exactly what this means, but this seems to me like.. "I would love to help you out so u can make 3D plugins or whatever but this isn't at all my priority right now" which seems fair enough

    stefanos,

    I saw this one too, and it was definitely encouraging.

    As long as we maintain the 3D capabilities (via plugin) that currently exist in C2 in C3, I will be happy. That means porting over the plugins, but it is all part of the process. By the time the plugins are ported, they might have z-ordering in place, which (I think) will be a big step toward a proper 3D editor.

    For now, I'm working with an artist who is laying everything out in Unity 3D. Once the scenes are laid out, we will port everything over to either Q3D or B3D. Even with plugins, I don't know if C3 will ever get to be as feature-complete as Unity, but all we would really need is a rudimentary 3D visualizer in the C3 editor to turn C3 into a super-fast 3D development tool.

    Baby steps!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In the process I've learned a lot of things regarding cross-browser compatibility, and I've rewritten the whole plugin to make sure that every single function works on all browsers.

    I'm not going to release it until I've completed my tutorials series and linked some capx templates with it.

    Sounds good. You've made a lot of great progress so far. I'm definitely interested in making sure things run across all of the major browsers. The new version of the game needs to go on AirConsole, so cross-browser compatibility is a big deal. To that end, I now have a pretty complete set of devices (Mac + Windows + Nexus + iPhone + iPad) to test things on, so let me know if you need me to try anything.

    Is there any chance that the new version is coming out during the month of April?

  • cjbruce I didn't get the question, can you elaborate ?

    X3M

    Sorry. I did some poking around in the plugins and found most of what I was looking for.

    I need a way to do explosions. Either particles or 2D sprites would work. Particles would be ideal. but I'm currently using 2D sprites for Robot Rumble, and we could keep doing that.

    I couldn't find shadows anywhere. Does the engine support shadows?

    It looks like I can bring in a Unity terrain map and use it with a physics mesh collider for driving robots. This means I could do levels with bumpy surfaces, rather than just flat planes. This could open up some cool level design possibilities.

    Are decals possible?

    Any other cool features on the way?

cjbruce's avatar

cjbruce

Early Adopter

Member since 25 Apr, 2013

Twitter
cjbruce has 4 followers

Connect with cjbruce

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • x3
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies