Dalal's Recent Forum Activity

  • How are you detecting that a player died? What condition are you using? Please provide as many details as possible.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yesterday as I was working on my HTML-5 game, the frame-rate suddenly dropped and stayed like that for the remainder of my work. Yuck! It's time to get serious and upgrade from my 5 year-old Toshiba laptop w/ Intel graphics.

    Give me your recommendations. Details below.

    Overall Desire:

    I want a new 'desktop-replacement' laptop to support game development work (2D/3D, Unreal, Unity, etc.), software programming (Visual Studio, etc.) graphic design (Photoshop), and 3D animation. I'll be working on it for at least 5 hours each day. Oh, and it should look SLEEK.

    Budget:

    Ideally $800 to $1200 - I'm flexible.

    Operating System

    Windows 7 (Home Premium or Higher)

    Size and Weight:

    17+ inches. I don't care about the weight.

    Screen Resolution:

    Probably 1920x1080, unless you recommend something else for game dev.

    Portability:

    It'll be on my desk 80% of the time, so as long as I can lift it and put it in my car, it's okay.

    Battery Life:

    It'll be plugged in most of the time, so I don't care too much.

    Hard Drive:

    I'd prefer at least 250GB of space, and SSD would be nice but not necessary.

    Optical Drive(s):

    DVD Reader/Writer preferably

    Processor:

    Intel preferably.

    Graphics:

    I'm leaning towards NVIDIA.

    Thanks everyone!

  • Yeah it won't know. I can't check the .capx from here (restrictions at work), but why don't you try to peer into the array if you can? That would be the best approach.

    If that ends up being difficult to do, you could enable all collisions momentarily before doing the check. After the check you can disable the collisions again. In fact, if your tiles are static, you should do it on Start of Layout. Then you only have to do it once.

  • "Down arrow is down".

    That's the problem. Use 'Down arrow is PRESSED'.

    'Is down' will keep firing as long as the key is down. 'Is pressed' will only fire once when the key is down. It's the same as going 'Is Down' + 'Trigger Once'.

  • To check if a tile is a 'topmost' tile, check if there is a tile directly above it. If not, then change it's frame.

    This could be done using 'Overlapping at Offset':

    is 'Tile' overlapping 'Tile' at offset (0,-1)'

    This will move the 'Tile' up a pixel and test for overlap. Inverting this condition will effectively test whether it's the topmost tile or not.

    For bottom and sides use offsets (0, 1), (-1, 0), (1, 0) respectively.

    EDIT:

    If you can figure out (roughly) how your tiling engine works, the best approach would be to tap into its array to figure out if there's a tile above the one you are testing. That would be the easiest and the most straightforward.

  • How could I test if a value is NaN in C2?

    Edit: Figured out right after posting. One way to do it is to compare it against itself. If it's not equal to itself, it's NaN. So you'd do something like: if (Variable != Variable) { ... }.

    I'm leaving this post here for reference in case someone else ends up needing this.

  • Any more updates on this?

  • Would it be worth having a sub-forum dedicated to those that are already well versed in C2 and/or game development and/or programming? Perusing the forums, I've seen that questions from advanced users tend to get drowned out by much more basic questions.

    This lowers the visibility of 'tough' questions considerably, dampening the potential for several deep, intricate discussions on C2, which would help us all learn, invent and discover new C2 programming techniques.

    An 'Advanced Users' sub-forum might also provide some of these benefits:

    1. More targeted questions and answers. Advanced users would get more thoughtful answers from people who truly understand their questions. Advanced users could also phrase their questions in more technical terms without the fear of scaring people away, using terms like 'scope', 'type casting', etc that those with a programming background might connect to and those with deep C2 knowledge would be able to learn and apply towards an understanding of traditional programming.

    2. Those coming from a traditional programming background could better learn to grasp the C2 paradigm by asking questions from a programming standpoint. I've found that programmers new to C2, for example, will notice the 'For Each' condition and have a tendency to use it to go through each instance even when they don't need to (For Each 'Enemy' rather than simply 'Enemy' collides with 'Bullet'). It can ease the transition into the C2 world and help them see how simple things can be and how deep they can go.

    One might argue that someone from a programming background isn't necessarily an advanced user of C2. True, but this forum would still be the place for them. The beauty of C2 is that if someone is an advanced user, they automatically have at least a rudimentary understanding of fundamental programming concepts, so they can help people that are asking questions from that end of the spectrum.

    All in all, I think it could help the growth of the C2 community and help us all learn new things. What do you think?

  • Link to .capx file (required!):

    N/A

    Steps to reproduce:

    1. Open new empty C2 project

    2. Create an event

    3. Create a sub-event within that event

    4. Minimize the parent event

    5. Zoom in a ton (dramatically, just to be sure)

    6. Expand the parent event and observe the "cut-off" sub-event

    7. Zoom to 'refresh' display and fix issue

    Observed result:

    Text is squeezed and cut-off for sub-event.

    Expected result:

    Text should look normal for that zoom level.

    Browsers affected:

    N/A

    Operating system & service pack:

    Windows Vista SP 2

    Construct 2 version:

    138.2 R2

    NOTE:

    I'm using an outdated graphics card on this machine, which may be part of the issue. If this bug cannot be reproduced on any other machine, then I apologize. I wanted to report it just in case.

  • Link to .capx file (required!):

    N/A

    Steps to reproduce:

    1. Start a new C2 empty project.

    2. Insert a new Sprite to the layout.

    3. In the Animation/Image editor, select a non-square area ex. 200x90, and then use the crop tool to crop to it.

    4. Hold shift while dragging the selection tool to make a square selection that stretches outside the image canvas (now rectangular). Just to be sure, try to encompass the entire canvas and then some.

    5. A square should appear (smaller than the selection) that extends outside the image canvas. This in itself is unexpected.

    6. Now click the Crop tool. C2 will crash.

    Observed result:

    After holding Shift to make a square selection and letting go, a square selection appears that extends outside the canvas. When clicking crop, C2 crashes, presumably because the selection unexpectedly extends to outside the canvas.

    Expected result:

    After holding Shift to make a square selection and letting go, the resulting selection should be bound by the image canvas. When clicking crop, C2 will not crash because the selection is still within the canvas.

    Browsers affected:

    N/A

    Operating system & service pack:

    Windows 7 Pro SP 1

    Construct 2 version:

    r137

  • I should have clarified. I'm doing a lot of specialized collision detection (my overlap detection is not simply the C2 condition 'Is Character Overlapping Obstacle'). The push out that comes with Custom Movement cannot test for collisions at an offset for example. I have slopes which the character walks along using his bottom middle point and Custom Movement's push out would try to push him out when it's not supposed to.

    Anyway, I think I solved the problem using the following technique:

    On the character's initial overlap with obstacle, offset the character to match the sub-pixel offset of the obstacle i.e Set the position to the following:

    floor(Character.Y) + (Obstacle.Y - floor(Obstacle.Y)

    Now resume the loop as normal, and by the end, the character should be a perfect whole pixel above the obstacle.

    It works quite well so far, except for a subtle jitter when walking up slopes, likely from the offset matching that I'm doing. Hmm... any other ideas are welcome.

  • Thanks for sharing that approach. Because of all varieties of slopes, that approach probably won't work in my case.

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