QuaziGNRLnose's Forum Posts

  • How do i affect the loading progress of the game? as in, where and how can i control when the game is ready automatically with my plugin, if it has to perform certain tasks before the layout/game can be started.

    I'm aware i can make a flag condition that tells the user when everything is ready, but it would be nice if possible to just do the loading work that i need automatically when the game starts? how and what does the loading progress currently do, and is what i want possible?

    would this be for the on create action of my object or someplace else?

    i know i saw a this.runtime.waitForImageLoad function somewhere, not sure if this is doing what i want for images, but i need a way to make the runtime wait as something is being preprocessed, so a way to tell it "wait" is imperative and then tell it can start again, or any similar solution.

  • https://developer.mozilla.org/en-US/doc ... Math/atan2

    its essentially just this function, but to make it work like angle(x1,y1,x2,y2) something like this should work:

    Math.Atan2(x2-x1,y2-y1)/(2*Math.PI) (you can omit the math.pi thing if you want the angle in radians rather than degrees)

  • i plan to just have most of the functions/methods you would use with three.js implemented as actions, and some way of looping through all the three.js objects/materials, to select them/modify/create/destroy them. It's all just brainstorming right now cause to be honest i'm not entirely certain of what to do yet.

  • It's more in line with how C2 works which makes it intrinsically not inline with how three.js works. It would introduce significant overhead to do it with objects outside of the plugin i'd think

  • I'm leaning towards doing something similar to what you were doing with your first design.

  • alright so for now ill use videototexture, and provide an option to just place the three.js canvas below the c2canvas since this is fastest if you have no reason to pass the texture to construct, and just want construct to render 2D stuff for a ui etc. Thanks for all the help guys!

  • ah thanks for all the help, that looks like exactly what I've been looking for, ill try it later!

    I'd also like to know if maybe i can directly pass a webgl texture handle somehow like r0j0 mentioned, because im sure three.js is using the same webGL calls for textures at some level. I'd be able to circumvent rendering it to a separate canvas completely if this were the case at least in webGL mode.

    EDIT:

    I tried using videototexture, seems to be working very well in chrome (slow in ie11 but what can you do). There might be a minor issue with the function as its copying the texture upside down(?). i just had to draw my quad inverted but seems like this is a bug.

  • I'm trying to make a plugin to use three.js for 3D rendering with construct 2.

    Right now i have everything working so that i can render onto a separate canvas element on the page, and copy that content onto a texture construct can use.

    Because the way construct draws is pretty undocumented and i'm new to javascript i'm having difficulty understanding how i can efficiently pass the texture from the other canvas onto the "c2canvas" without significant slowdown.

    right now i'm using:

    this.webGL_texture = this.runtime.glwrap.loadTexture(MYCANVAS, true, this.runtime.linearSampling, this.texture_pixelformat); etc.

    and rendering webGL_texture using glw.quad(). All this stuff is currently working as intended but it's very slow to copy a screen sized image into memory every frame, and it's not a usable solution.

    The problem im having is that i don't know a more efficient way to do this. Using three.js i'm able to render to a texture as well, but the method of doing this produces an object defined by three.js that contains the texture which is also pretty undocumented, and i have no clue how to get this texture to a form construct can use.

    some information on how construct 2 handles webGL textures so i can interface the two systems might prove insightful, or perhaps a better way to transfer the contents of the other canvas to a texture for construct to render.

    Would i be better off just laying my three.js canvas below the c2canvas, and save the overhead of passing anything? Maybe i'm doing things right but something is going wrong somewhere? i've been looking at R0J0hound 's paster to see how he grabbed the content of sprites but it seems hes just calling their draw function.

    I'd be grateful for any insight as im just scratching my head with this right now.

  • Games wouldn't necessarily have to be portable from one exporter to the other. Even if you'd opt for them to be (which makes sense but isn't completely necessary) there's no reason you'd have to guarantee everything works the same after changing such a fundamental aspect of your game. A disclaimer that it might, and probably will break many features because of innate differences in the languages would be fine. Any one who wants to port would have to pick out those small bugs and eventually you'd have enough information about what they are to fix them.

    A lot of people would be perfectly happy just having a native exporter, even if it meant they had to re-code lots of their game to port it to html5.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ashley

    I think it's moot to argue that running an executable is trusting the user to put faith into your executable. This has always been the case for any game, any program, anything downloaded off the internet. Windows' poor choice of default setting to prevent the lowest common denominator of user from being tricked, which will happen anyway for those people who blindly download and run software shouldn't detract from genuine applications using a system to its fullest by accessing as much privilege as they can. It'd be pretty sad if we were headed to a future where only "registered" developers get the privilege to have their applications actually use your computer to its fullest, and everyone else is forced to run through a non-essential protection layer or use a workaround/loophole like html5 that's supposed to make running the code seem "safe" because its the trusted browser running the code instead of a standalone application. Anyway, this isn't about Microsoft's bad choices, something i think everyone who'd understand agrees on.

    If an exporter using SDL were made, the games would be cross platform, and genuinely perform well since the whole goal of SDL is to make things run everywhere. The license of SDL would completely allow this as well, and SDL would make things work 'everywhere', using the systems to their fullest, but of course i understand the work involved in making any kind of new exporter, i'm merely suggesting this as something that seems to mesh with your goals and provide the best of both worlds so to speak.

    As for installing directX etc. This is something that's also to be expected when installing any kind of game. It's never been jarring to any PC user to see a directX prompt while installing a game, its been expected for years.

    In anycase, im aware of that performance test, but rendering a ton of sprites faster isn't really impressive or incredibly important (of course it is a good thing). You admitted yourself that there aren't many optimizations to these aspects in classic, and they were never really necessary because the calculation of sprite vertices has never been a significant factor in affecting performance, games with 30 sprites on screen can have performance issues if you're doing enough with them. It's lovely that C2 makes many optimizations in order to squeeze as much performance out of html5 as it can, i'm fully aware of this and it is impressive that you get as much out of it as you do, but the fact remains that when i make a significant number of expressions run for enough objects, C2 seems to fall behind at least in my experience, but perhaps this has changed since i did my tests. You're fully aware that if you made the same optimizations in a native C++ engine like CC that you did in C2, the results of that tests would be completely different.

    As long as everything's running in javascript, the performance is never going to be as good as it could be, javascript is simply much slower than any native C++ code and theres nothing that can change that. Theres benchmarks (http://www.i-programmer.info/news/86-browsers/3492-javascript-is-slow.html) you can find on the internet and floating point calculations will just always be significantly slower (http://stackoverflow.com/questions/17036059/javascript-is-4-times-faster-than-c, see comments), no matter how optimistic you are about it's future gains, and you've acknowledged this yourself.

  • I don't really post around here anymore, but i have been using construct continually since all those years back when classic was starting out.

    As it stands i don't see myself using C2 very often compared to CC, even though its a way superior tool to classic in terms of stability. C2 has definitely improved a TON since it started out, things with more complexity than a few events and some behaviors actually end up working quite well on desktop, yet it falls short in so many areas because it's held back by trying to achieve what classic did in a webpage. The whole advantage of doing everything in html5 for C2 was to make the games work on as wide a range of platforms as possible, and yet in trying to use html5 as a catchall C2 games end up working from my experience okay-to-well on desktop and shoddily everywhere else. I feel like in choosing html5 C2 has become a jack of all trades and master of none. Its a bit frustrating coming from an experienced background using Classic that the successor to it still hasn't surpassed it at making games that run natively. In fact it's honestly nowhere close as long as its using html5, with all the overhead that comes with using html5 vs the performance a native game using opengl/directX would have.

    I'm not trying to hate on C2, its a fantastic program and i do end up using it because having a game that runs everywhere is a beautiful thing. But its disappointing that html5, and not C2 is whats limiting me. With CC i could literally look at ANY 2D game, and even simple 3D ones and understand that it would be plausible to make a large portion of them exactly as they were using CC alone. With C2 i see a game and though building it is possible getting the performance you'd expect on modern hardware isn't.

    I don't really know the details of how C2 is designed, but i just wish it could export native games that used SDL with opengl, or something similar, so that games that take advantage of modern hardware could finally be made using it, rather than what a lot of people see as a novelty in making their games run in browsers.

    A lot of people, i'd even say the majority, use tools like construct/gamemaker/multimedia-fusion etc. because they want to make their "dream" game, not because they want to make their game as marketable and cross platform as possible. It's a hobby, and i think enabling people to make their game as big and complicated as they want within the scope of current hardware, rather than force them into cutting back so many features modern hardware would allow, makes C2 a lot less appealing to a lot of users. I think this is pretty evident in the way the old user-base was essentially alienated with the new goals scirra had in making C2 from its inception to when CC was retired. A lot of people didn't leave because we got tired and stopped using the software, its just C2 didn't fill our needs and still hasn't.

  • won 2nd place!

  • Super Clean Clean

    Davioware and I made this in around 2 days for the 10th Game Jolt competition, based around the theme "party".

    he handled graphics/audio, while i did all the programming/animation.

    <img src="http://i.gjcdn.net/imgserver/screenshot-thumbnail/898x1000/33957.jpg" border="0">

    You're a maid which has to keep the house clean as a ridiculously messy party goes on around you.

    There are a few bugs yet to be fixed, (one causes a fatal crash), I'll get around to fixing them soon, and maybe adding online scores/level editor.

    <img src="http://i.gjcdn.net/imgserver/screenshot-thumbnail/898x1000/33958.jpg" border="0">

    <img src="http://i.gjcdn.net/imgserver/screenshot-thumbnail/898x1000/33959.jpg" border="0">

  • <img src="http://dl.dropbox.com/u/82947809/sand.PNG" border="0">

    <img src="http://dl.dropbox.com/u/82947809/sand2.PNG" border="0">

    Download

    Pretty much as the title says. Me and Davio were messing with canvases pasting effects into themselves to get positive feedback so that the effect feeds last frames result into itself each frame. I got the idea to try to hack mass particle simulation out of the technique. Wrote a few shaders and here it is. The fps will NOT change even if the entire screen is covered.

    Draw with mouse button. Z,X,mousewheel up/down/click, left click, and right click all do stuff.

    X+mousewheel adjusts the size of the "brush" you get when you press X

    Mousewheel click draws "terrain" (blue)

  • Speed is still a large concern using C2 if you are making anything with a large computational overhead, i don't see this changing anytime soon with javascript. You need to have used CC extensively to make any fair comparisons/arguments about the capabilities, they aren't something easily seen from the surface.

    with regards to Flash and AS, they are still weak. Web development will never replace anything, only undercut more traditional things. Games can't be given the same privileges when they're being run out of a browser, even plugins like unity (which still suffer issues from running out of a browser). You're better off using java if you want to make something serious that will also be multi-platform. A lot of people used construct to make something more than an angry birds/fruit ninja/cut the rope/generic app clone. CC and C2 as things stand are different tools for different Jobs, and although C2 does it's job more effectively than Classic, it does not, and most likely will not be able to do classics job for a long time (if ever, depending the direction scirra takes).