Ashley's Recent Forum Activity

  • 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>
  • Congrats gammabeam

  • Well, I doubt I'd be surprised, since I wrote it

  • Double linked? It wraps both ways - the start and the end are basically connected, if you go over the end, you end up at the start, if you go back from the start, again you find yourself at the end of list.

    No, that's a circularly linked list. A doubly linked list, in programming, means each element holds a pointer to both the next and previous elements in the list, so you can travel either way.

  • A doubly linked list is a programming structure. You won't be able to make an equivalent in events - Construct hides all those details from you.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post

Ashley's avatar

Ashley

Early Adopter

Member since 21 May, 2007

Twitter
Ashley has 1,768,843 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
  • x126
    Coach One of your tutorials has over 1,000 readers
  • x74
    Educator One of your tutorials has over 10,000 readers
  • x5
    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
  • x42
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

32/44
How to earn trophies

Blogs