Dalal's Recent Forum Activity

  • Could you use the Gamepad plugin to achieve what you want?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There doesn't seem to be a condition in Construct 2's Sprite object that tests if a point (x,y) lies within the sprite's collision polygon. I feel there are plenty of reasons why such a condition should exist natively in C2:

    1. It provides fundamental information about an object's collision polygon that can aid in writing advanced custom collision detection code. Consider objects that climb slopes along their bottom-center image point but retain the information needed to use their bounding polygon when testing for collisions near edges, where their extremities must be off the edge if they are to fall. Or perhaps consider a scenario where you want to test if one object is fully contained within another.
    2. It provides a neat, reusable method for fetching information of this nature. Without this condition in C2, I would have to use a single pixel sprite. If I were to use this sprite and position it to the point in question each time I were checking for overlap, I would have to repeat this series of events for every object in question. It would be difficult to see at a glance what point I'm comparing against because those values would be overshadowed by the logic of the algorithm that involves positioning the sprite, etc. Functions won't work because then I would have to pass a parameter that refers to the object whose collision polygon I'm testing against. Let's say I pass it's IID. I don't see a way to Pick an object with an IID and test for overlap with it. I could use Families and UIDs, but that still makes it far more complex than it needs to be.
    3. Something as intricate and precise as a collision polygon could be used in countless ways, but we are presently only given one limited usage of it: to check if two objects overlap. The power and flexibility of defining a collision polygon to sub-pixel precision seems wasteful when only one essential use is allowed. More open access to the collision polygon (by way of checking if a point lies within it) would significantly increase the programming possibilities available to the game developer with very little increase in software complexity.

    All in all, I think this would be a great addition to C2. I apologize if there are already simple approaches to finding whether a point overlaps an object, but I asked in the 'How Do I?' forum and no one seemed to know of any.

    Thanks for considering my request!

  • I don't see any conditions that check if a point (x,y) is within the collision polygon of an object. Is there an event I'm overlooking, or will I have to use a single-pixel sprite to accomplish this?

  • I believe the reason your approach is not working is because it's 'picking' both sprites rather than just one. Here's how you might fix it. Let's assume your sprite is called 'Sprite'.

    First create a family called 'SpawnedObjects' and add 'Sprite' to it.

    Then, in your events, check to see if the newly created object 'Sprite' is overlapping any 'SpawnedObjects'. If it is, then position 'Sprite' to a new location.

    This way, you've differentiated the created sprite from the already existing one. You've identified 'Sprite' as the newly created one and 'SpawnedObjects' as the existing one. Simply move 'Sprite' and it should work.

    Also, if you're not already doing this, make sure it continues to re-position 'Sprite' until it finally finds a spot. Use a loop. Otherwise, it might re-position 'Sprite' once to avoid the overlap, but won't re-position it if it happens again.

  • Basic implementations of the 'typewriter' effect fail to account for word wrap. Because of this, you see several amateur applications where words that are being typed out suddenly 'jump' to the next line. This looks unprofessional and is undesired in most cases.

    What are some ways in which a cleaner typewriter effect can be achieved in C2, where words that should end up on the next line start out on the next line, to avoid the 'jump'?

    So far, one possibility I've thought of is to use the 'text height' expression of the text object to 'peak' at the next word before typing it out. If the text height changes after the word, then start it out on the next line. If not, spell out the full word. In this manner, you would go word by word and it would cleanly type everything out.

    Are there any better approaches you can think of?

  • Change the 'Set Angle' property for the 8-directional behavior to 'No'. I believe that's it.

  • Hi guys, I was wondering if it is currently possible to export a Windows 8 project from Construct 2 to submit to the Intel AppUp Store. Submitting to the Windows store is easy through the 'Export for Windows 8' option and Visual Studio 2012, but submitting to the Intel AppUp Store seems to be a mystery. I'm just not understanding how Windows 8 apps work. I figured there would be a way to package the Visual Studio project 'binaries' into a format the Intel AppUp store can understand. Can someone lay down the knowledge on this?

  • I've settled on replacing the Animations folder and replacing the <animation-folder> node in the .caproj. Looks to me like there would be no problems with this approach, except accidentally corrupting the project somehow. I'll just backup my project before doing the change.

    If anybody knows of a cleaner way to replace an object's animations, let me know.

    Thanks!

    Dalal

  • Perhaps Families are what you are looking for:

    scirra.com/manual/142/families

  • In a small team, one might have a programmer and a graphic designer.

    Let's say the programmer writes up all the logic involving a sprite called Cat. Currently, Cat contains only the 'Walking' animation.

    A few months later, the graphic designer sends the programmer an updated Cat object, which contains a 'Walking', 'Running', 'Meowing', 'Purring', and 'Jumping' animation.

    What is the most efficient way for the programmer to go about updating Cat's animations, while preserving the instance variables and events of Cat?

    My initial thought was to re-save the Construct project to use a directory instead of a single file, and then replace the Cat's animation folder. Would this be the correct way of doing it, or could it potentially create problems?

    Thanks for your help!

    Dalal

  • Got it working by including an m4a. Thanks for the help guys.

    vidi, for your info, I encoded my m4a at 128kbps using Winamp and selecting MP4/aacPlus (HE-AAC) Encoder v1.28a.

  • I added music to my game by importing a .wav file which Construct 2 converted into an .ogg. I added an event that plays the music On Start Of Layout. It works well when I preview it in my browser. However, when I export to AppMobi (with DirectCanvas), no music is heard in the simulator nor on my iPod Touch. Is this an issue strictly with AppMobi or is there a Construct 2 solution that I'm overlooking?

    Any help is much appreciated!

Dalal's avatar

Dalal

Member since 17 May, 2012

None one is following Dalal yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies