Ashley's Forum Posts

  • If you're new, many of your initial questions may be answered by trying a tutorial.

  • What do you mean by overlapping? You want two sounds to play at the same time? If you read the XAudio2 documentation you'll find that 'autoplay file' or 'autoplay resource' will pick a free channel to play a sound on.

  • I thought it would also be good performance-wise

    Bad assumption! A 2048x2048 texture will take up a huge amount of VRAM. Construct is 100% hardware accelerated, which uses the graphics card to render the game, and VRAM (the memory on the actual graphics card) is an important consideration when creating a game. A 2048x2048 texture uses (2048 x 2048 x 4 bytes/pixel) 16mb of VRAM. Some people still have crusty old 32mb video cards hanging around, and these tend to be half full of system stuff already, so you might have already eliminated those users from being able to play your game already - with one background texture.

    When designing a hardware accelerated game, it's always better to make levels using many small textures rather than single big ones. It's even better if you can do as much as possible with a Tiled Background object with a power-of-two size texture (eg. 128x128, 256x256...). You may think it would slow down rendering a bit having lots of small images on top of each other, but in many cases, surprisingly, you may actually measure zero change in the framerate! (This is because of the way the CPU and GPU work in parallel together) Even if you can find a difference, it's such a tiny change it's not worth bothering with at all: graphics cards can render simple images shockingly fast, generally only things with effects will impact the framerate.

    As for your filesize issue, Construct doesn't care what the source image is when you import it. It copies it to an internal image, so the format or optimisation of the source file makes no difference.

    Edit: linkman, images are compressed PNGs when they are stored in Construct, but they're lossless but not optimized.

  • Currently the camera is stuck looking down at the layout. It might be possible to support a camera that can be located at any position and looking at any position in Construct 2, however, even if that is possible, we'll still be focusing on Construct as a 2D game creator.

  • You do not have permission to view this post

  • at runtime MyInt stays unique to each instance of the plugin

    pMyPointer is like one variable shared by all instances of the plugin

    No it's not! If you wanted it shared, you'd declare it static, but since it's not, a copy of the pointer is held by every object instance. They could all point to the same object if your code does that - but each instance is holding a separate pointer which can be uniquely changed.

  • That would be an awful lot easier if we finished the ability to copy/paste layouts.

  • There's the 'pType' member of CRunObject which is a CRunObjType* pointer to the object's type. Have a browse through the SDK headers some time, you'll probably find a lot of useful stuff in there.

  • 1. They're deprecated and no longer used. Ignore them.

    2. I'm not sure I understand the question. If you use pRuntime->CreateObject(specific_object_type, 1, pLayout), and specific_object_type is a valid CRunObjType*, that will work.

  • Hmm, I don't think that sound system is quite big enough. Make it a bit bigger maybe?

  • Sin and cos are rife through game design even if you don't use them in events(they're peppered through almost all the behaviors and rendering engine). It can only do you good to learn a little of the maths behind game design!

  • Known problem with layer rotations: objects can sometimes disappear when you rotate layers, but this is fixed in the next build.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • OK, the format of saved meshes in the Sprite object is:

    A 4-byte ASCII string saying 'HSEM' ('MESH' backwards because I'm lazy about endian) to identify the MESH file

    int32: version integer (always 1 right now, reserved for future use)

    int32: horizontal number of points

    int32: vertical number of points

    Then, repeated for each point (number of times = horizontal points x vertical points), in column order:

    float32: x offset (as a fraction of the original image width)

    float32: y offset (as a fraction of the original image height)

    float32: z elevation

    float32: u offset

    float32: v offset

    float32 x 4: a, r, g, b for point opacity and filter, from 0.0 to 1.0.

  • It won't work like you expect if you use the 'control is down' condition. As you say it will keep adding 1 as long as it held, which will definitely mess it up, so you definitely want to use the 'on control pressed' condition.

    Maybe if you post a .cap people can investigate what you've done more easily.

  • Builds marked 'unstable' are generally for testing only.