WarpedOldMan's Recent Forum Activity

  • Yeah, it looks like I'll have to do something like that. It's not quite what I was hoping for but it will work. Thanks!

  • I'm trying to loop through all instances of a family, and check each instance to see if it exists within another family.

    I'm hoping there's a non-awkward way of doing this, but at the moment I'm not seeing any.

  • Does it still jitter if you set the Sampling to Linear? I know this isn't a real solution to your problem but I'm curious if that's the right area to even be looking for the problem in.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Families are restricted to objects from the same plugin. Is there any other object type other than tilemaps in the family?

  • This is just a wild guess, but you could try making the "on object clicked" event block an "Or" block and add an "on object double clicked" to it.

  • So I have a layer, with the parallax set to 0,0.

    This is my UI layer, so I have a mini-map object placed in the top left of this layer.

    The mini-map is 200x200px and is positioned at x:100 y:100. It is also anchored to the top left of the window.

    When looking at the debug panel, it seems that layers set at a parallax of 0,0 have their own internal coordinates. So the top left of the layer always starts out at 0,0.

    This is good, and reasonably expected behavior. However, I run into a problem when I try to re-size the window.

    I should add that I'm using the NW.js preview option.

    By default, my window starts out at an arbitrary 1280x720 if I re-size the window, while watching the debug panel, I can see that my mini-map object moves into the negative range.

    So what this tells me is that when re-sized, the top left of my UI layer's origin is no longer internally 0x0.

    I'm hoping this is clear enough for people to understand, and if possible maybe someone could confirm this behavior?

    Also, if anyone knows how to compensate for this, I'm eager to hear your ideas and techniques.

    Update:

    After some more searching on this issue, I think I've found a previous example of the problem.

    https://www.scirra.com/forum/crop-fullscreen-breaks-0-0-parallax-layers_t120338

    Unfortunately this seems to be by design so I'll have to look into solving the problem with more awkward methods.

    Also I will add that... I'm not sure I see why Ashley considers the "crop" fullscreen mode to be a mistake. For some games, actually scaling graphics can cause them to look quite fuzzy and lose the "crisp" look that I normally try for in my games.

    Unless I am missing something, it makes more sense for me to use the "crop" fullscreen method.

  • I understand, thanks for commenting. I'm not sure if it's the right direction to go in anyway.

    It would actually be better if we had a generic "Object" object, to which we could add sprites, dictionaries, arrays, and such as components.

    The families system is a little awkward to use, but using multiple families and sticking many objects in several of them, I can make a system that isn't too ugly, and allows for relative easy creation of AI. But this kind of falls apart when I'm trying to basically custom make a container system for half of my objects with events.

    For instance, let's say I have a family called "friendly". Each object in this family has a nice pre-defined polygon used for collision, however, during certain circumstances, I also want to have each "friendly" use a second, and different collision polygon. So, I make a second transparent dummy sprite with a different collision polygon, and give it the "Pin" behavior. Now though, I'll need to create it each time an instance in the "friendly" family is created, pin it to that instance, and then destroy that same instance, if the "parent" instance is ever destroyed.

    One might look at that and say, "I don't see the problem, it looks simple to me.". But that kind of "fix" is rather ugly because it piles on top of other little "fixes" scattered throughout the event sheet. And also, it's likely not very optimized if you want to have a layout with a few hundred objects with even simple AI running.

  • Ah, ok. Well thanks for confirming anyway.

    I always seem to struggle with making groups of objects behave as one entity, while also building simple and clean AI for these object-groups/entities.

  • Since families are restricted to one object type in C2, it seems odd to me that you can't put families in a container.

    I'm at a point in my current project where this would be extremely useful and time-saving.

    Is there some technical or design-philosophy reason that this isn't done?

    Also, has anyone else wanted this, and come up with a substitute that isn't ugly.

  • I've done some testing.

    The "tokenat" function seems to recognize "my string" alone as a separator and also recognizes a Newline alone as a separator, but it doesn't seem to recognize "my string" & newline as a separator.

    I should add that "my string" & newline do follow each other directly such that they should work as a separator.

    Also, I tried using the "find" function on my source string to look for the index of "my string" & newline. Unfortunately it returns a -1. I do get the correct index if I use "find" with "my string" or Newline, just not when I use "find" with "my string" & newline.

  • I am indeed only trying to delete files in folders that I have created with the runtime.

    What I'm trying to make is a profiles system. What a profile is, is just a folder with a name. In a "Profiles" folder.

    With the runtime, I create an "insert-game-name-here" folder in the Appdata\Roaming Directory. Inside this I create the "Profiles" folder.

    So far, I have profile creation working well enough, but I also want the user to be able to delete a profile. This should just mean deleting the folder and all of it's contents.

    The reason that I don't want to/can't just delete all the files in the folder explicitly is that the # of files, and folders and further sub-folders in the particularly profile-folder that I want to delete will vary depending on the profile.

  • I modified the Node-Webkit plugin to allow for removing an empty directory.

    I also attempted to include the recursive folder deletion, but I don't really know JS or programming much at all, so I failed at that.

    My next thought was to simply expose the ability to check if a path is a directory or a file in C2, then I could implement the recursive folder deletion from within construct, a much more familiar environment. I've failed at this as well so far, however.

    For now, I think that there is a very ugly method I can use to recursively delete a folder within construct using only the delete-an-empty-folder option.

WarpedOldMan's avatar

WarpedOldMan

Member since 5 Feb, 2012

None one is following WarpedOldMan yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies