Hijacking draw and drawgl functions

0 favourites
  • 5 posts
From the Asset Store
You need this package if you want to program a Street Fighter or battle game.
  • Here is an experiment of using the browser object to run javascript in a few interesting ways. You can do anything you can do with a plugin with this, but it's all done in C2 which makes it quicker to test changes.

    First off it's used to load js files and interact with C2's runtime. This isn't minifier friendly, but it should be possible to wrap it in a plugin so it will be.

    The main thing done in this capx is to change the rendering of one instance of an object in an interesting way.

    With webgl off: some arbitrary canvas drawing is done.

    With webgl on: a 3d cube is drawn inline with the rest of the other objects (as opposed to only on the very top or bottom).

    https://www.dropbox.com/s/oge5lmjwm5wpp ... .capx?dl=1

    /examples35/js_test2.capx

    Maybe this will be interesting/useful to someone.

  • That's friggin cool! I can see a lot of use for this, if there's a way to load objects.

    I've been trying out Q3D but it was not really what I was looking for. As I wanted a combination of 3D objects and 2D objects in my game, that could be inline.

    My main goal was to make the characters in 3D in a 2D isometric enviroment. Kind of like.

    Little Big Adventure. https://youtu.be/wyXX8ET95IU?t=376

    Commandos 2. https://youtu.be/4pnfCbuOslo?t=713

    Would that be possible using this approach?

  • You could, but the trouble here is it switches between how C2's renderer is set up and a different set up that has a z-buffer. In a nutshell each object will be 3d but come out as 2d sprites that you'd have to sort in the same way as you currently do in C2.

    But yeah it should be possible. You'll probably want to utilize some 3d library to simplify the amount of rendering code.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here is an experiment of using the browser object to run javascript in a few interesting ways. You can do anything you can do with a plugin with this, but it's all done in C2 which makes it quicker to test changes.

    First off it's used to load js files and interact with C2's runtime. This isn't minifier friendly, but it should be possible to wrap it in a plugin so it will be.

    The main thing done in this capx is to change the rendering of one instance of an object in an interesting way.

    With webgl off: some arbitrary canvas drawing is done.

    With webgl on: a 3d cube is drawn inline with the rest of the other objects (as opposed to only on the very top or bottom).

    https://dl.dropboxusercontent.com/u/542 ... test2.capx

    Maybe this will be interesting/useful to someone.

    can you update link please? i wanna look at it : (

  • Follder22

    link updated

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)