Ashley's Recent Forum Activity

  • Yes, including the DX9 redistributable yourself with your game should be fine, but I think you have to ensure the EULA for the installer is shown before installing. They're called "redistributables" because, well, you're supposed to distribute them yourself

  • The Construct Engineering forum is for plugin (and behavior and effect) developers, and the Completed Addons forum is for released plugins (and behaviors and effects).

  • What's the error message?

    Unfortunately you do have to buy the proper Prof-UIS library to get it to compile. This was a pretty bad decision we made earlier on (especially for a volunteer project with no income! ) Do you have those libs then?

  • I don't think there's anything wrong with just having everything in the EXE. Sure, you get a large EXE, but I don't think Windows is dumb enough to load the whole thing in to memory - it'll load the parts it needs to start running it, then the resources (the big bit) will be loaded as required. Construct does keep PNG-compressed versions of textures in system memory to be able to quickly swap them to GPU when needed though, so there might still be more memory usage that way - although they are kept as compressed PNG so save memory. These days everyone has a few gigs of RAM though, I doubt it'd be a problem.

    That way nobody can easily browse your artwork either (but they can still extract it if they examine the Construct source code and worked out how it packs them in to the EXE, but that's beyond the average casual user).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Could you post a .cap?

    My best bet is you simply have a lot of events and something you've forgotten about is actually setting it to visible and adjusting the opacity. Construct redraws the entire screen every tick, so there's no such thing as left-behind-glitches - if an object is there, it's really there, and really is visible (assuming you haven't just found a bug!).

  • If you want to fill the screen with white just add a layer with a non-transparent (white) background on top of everything, and adjust its opacity in events. To process a shader on the full screen, create a window-sized Canvas, enable 'grab layout before drawing', and add a shader to the canvas object.

    By default Construct uses linear sampling, which is a way of smoothly rotating and stretching sprites, but its well known side effect is pixelly sprites at floating-point positions look slightly blurred. To restore pixelly movement, rotation and stretching, set sampling to Point in application properties.

  • I don't understand the question. Graphics are already compressed, and it doesn't stop anyone extracting them from the EXE if they try hard.

  • No, it could potentially make the runtime much more complicated, at the moment it is coded throughout to assume object types never change.

    What is the use of this anyway? Why might you need to do that? And how would you make events for an object that doesn't yet exist in the event sheet editor?

  • Btw does anyone know if Construct works on Windows 7?

    Davo, I have Windows 7, and it works fine

  • Sorry, there's no way at the moment, and I doubt it would happen in the current Construct. It would probably be at least possible to make a converter in Construct 2 though.

  • I agree that the animation system in Construct could use some work. But I don't think it's a good idea to simply reproduce the UI of TGF's animation editor (your diagram is basically an outlined screenshot of TGF 1's animation editor). That UI was designed some time in the 90s, so it might not be wise to blindly copy something so old!

    Davo's already implemented a very nice "filmstrip" at the bottom of the picture editor for images in animations. I think a better animation system would work as an extension to that. Also, I would prefer to get rid of the animation bar - perhaps a floating panel that only appears when the picture editor is open. I'm interested in redesigns, but not the one you posted.

  • Construct 2 will definitely be OpenGL rendered, and there will be no DirectX renderer, at least not at first.

    DirectX 10 and 11 are not at all an option since so many people are still on XP (roughly two-thirds of all computers still use it). That leaves the choice between DirectX 9 and OpenGL. Features and performance are pretty much equivalent, so that's not part of the choice (although OpenGL can bring DX10 and DX11 features to Windows XP!).

    Cross platform is an important point, allowing the opportunity for games to run on OS X, Linux, PS3 etc without rewriting the renderer. But there are two things which make it a far better choice for Construct! OpenGL games are much easier to redistribute - OpenGL 1.1 comes preinstalled on Windows XP, so there's no need to update DirectX or install those damn "optional" updates that are actually required. So more often than not you send someone a game and it will just run, like it should.

    OpenGL is also MUCH easier to program for! I also don't know where the idea DirectX is easier came from. It is far, far more complicated, and also dumps some extremely tough problems on the developer (like lost devices). If I had a blog this would definitely make for a rant. Let me briefly cover it here anyway.

    Lost devices are when something happens to the fullscreen display, eg. something else goes fullscreen (like previewing a fullscreen game in Construct), or the computer going to sleep mode, or a fullscreen application being alt-tabbed away and restoring to the desktop. A similar problem happens if you want to resize the window. In DirectX, the application gets sent a message that says "boom, lost device, everything your program has done in DirectX has now been reverted". You now have to completely re-load the application's textures, effects, fonts, states... everything. In the editor where people preview fullscreen games, this happens regularly, and is extremely complicated to handle, not to mention the runtime also has to handle it.

    OpenGL has no notion of lost devices and handles it all for you.

    Ordinary drawing in DirectX also involves a number of steps. First you have to specify a vertex format, and define in the program a correspondingly formatted structure. Drawing a quad (a rectangular shape, eg. a sprite) involves sending to the graphics card four vertices (the corners of the box). So to do this first you create a vertex buffer, with room for four vertices allocated. You lock it, copy in four of your structs that define the four corners, and unlock it. For maximum efficiency you must also create an index buffer, with six indices, to define two triangles that draw the quad. However, for maximum efficiency, both index and vertex buffers must be as large as possible, ie. contain data for as much drawing as possible when sending them off. Because in Construct draw calls can come from all over the place (lots of different plugins render stuff), this means implementing a batching system that collects as many rendering calls as possible, generates two very large vertex and index buffers, then sends these to the GPU with a clever batch executor that runs through the saved rendering commands executing them on their associated vertices and indices. For maximum efficiency (again) you'd need to write a custom allocator (and Construct does in fact implement one), because you don't know how many rendering commands there will be, so there are thousands of small allocations every tick, so the allocation must be as optimal as possible. The code for this optimal DirectX renderer is extremely complicated and runs in to pages and pages of code with many past bugs associated with them.

    Here's how you draw a quad in OpenGL:

    glBegin(GL_QUADS);
    glVertex3f(0,0,0); // top left corner
    glVertex3f(1,0,0); // top right corner
    glVertex3f(1,1,0); // bottom right corner
    glVertex3f(0,1,0); // bottom left corner
    glEnd();[/code:2q69wpxs]
    
    You might also notice this essentially naturally is a batching system.  Just don't call glEnd(), unless the next drawn thing isn't a quad.  It's [i]trivial[/i], especially compared to the monolithic system required for DirectX.
    
    Why should end users care about how easy it is to program though?  Well, it saves hours of developer time, allowing us to work on other features and fix other bugs instead, and results in fewer bugs, because the program is simpler.
    
    Having coded a bit for OpenGL recently I have to say:  I genuinely have no idea how DirectX rose to prominence.  Any developer who tried both would simply use OpenGL because it is so much easier and has lots of benefits like multiplatform (one of those platforms being XP!).  I guess the situation the world over is like myself, using DirectX just to go with the flow since lots of big games also use it.  I guess it's testament to the genius of the Microsoft marketing department that they managed to make a complicated API which poses you with nasty problems the world's most popular graphics API.  </rant>
Ashley's avatar

Ashley

Early Adopter

Member since 21 May, 2007

Twitter
Ashley has 1,448,118 followers

Connect with Ashley

Trophy Case

  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • Forum Mega Brain Made 20,000 posts in the forums
  • x109
    Coach One of your tutorials has over 1,000 readers
  • x63
    Educator One of your tutorials has over 10,000 readers
  • x3
    Teacher One of your tutorials has over 100,000 readers
  • Sensei One of your tutorials has over 1,000,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x36
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

32/44
How to earn trophies

Blogs