Centra's Recent Forum Activity

  • Random bump. Ever had trouble with a timer not starting if it was used anywhere besides in an "On Created"?

  • Definitely looks legit, I enjoyed the video and curious to see where you go with it!

  • For anyone who may stumble upon this later and has a similar problem. I think a much simpler solution would be to use one sprite object for every room by distinguishing the different rooms via different animations within that same sprite object. For example rooms.sprite contains animations for Casino, Hotel, etc. This way you can detect room type via the animation and use a function easier since you are only working with one object. Haven't implemented it yet but hope that makes sense.

  • Thank you for the detailed answer. I attempted your suggestion to no affect. I don't expect a solution but I am curious if I followed your direction correctly. I tried a few variations that yielded no results but they are basically the same. It's not a big deal to go with my original code, I just thought I could refine it a bit

  • I found a repetition in my code and would like to replace it with a function but haven't had any success yet. As you may have guessed it's a picking issue. I guess I still don't get it. Reading the families page hasn't helped me thus far and I'm hoping it's not a larger organizational issue. The newly created object is a different sprite for each "floor type" but they are all part of the same family - Rooms. Here's a snapshot of the problem area, I left the previous working code as a reference on 47

    At the end of a timer, a previously placed sprite is replaced by a different, new sprite, and I'd like the old sprite to pass it's instance variables over to the new one. I'd greatly appreciate your advice

  • Hey, I probably won't be much help here but maybe I can push you toward some insight.

    As far as using the CSV plugin to grab a certain set of data like you said for "unlocked" characters. You may want to look at Guizmus's dialogue tutorial/capx files to see how he grabs data from the CSV depending if it is a "speech, random, or choice."

    https://www.scirra.com/tutorials/833/mod-side-story-a-walkthrough-of-a-text-dialog-mod

    While the system itself is broken (it hangs on the third piece of dialog forever and I can't figure out how to fix it) you may be able to discern something useful from it

  • I achieved the desired effect using WebGL replaceColor. But no one has had any insight as to whether this is a practical for mobile devices or not. Namely because so many sprites would be using webGL, + it adds 5+ sprites per character which could be made up of one single sprite (just more of them)

    CrazyVulcan

    Every character would be made up of about 5+ sprites, are you suggesting containers merge them together somehow into a single object to save space? Also I'm watching your random character generation post, I hope you figure it out as it also interests me.

  • Thank you for the input. I was using a boolean on the selectable sprites, I foresaw a problem when I noticed that they could be re-selected whilst overlapped by the menu, resulting in a possible change of that menu relating to the previously selected sprite. I need to narrow the condition better, like passing another variable from the sprite to the menu while it is visible so that in this instance of visibility, the menu only affects the previously selected sprite. I think...

  • Playing with mobile development. I have a problem when using touch and selecting submenus. For example,

    There are several sprites on screen, any one of them can be selected. I touch one and it brings up an interactive menu, or sprite representing such a menu. The problem is if I touch this menu and there is a selectable sprite underneath, it may also get selected. Is there a way to avoid this using layers or someway where touch is enabled for only certain objects at a time? Hoping to get a few quick suggestions so I can get back on track.

  • It looks like the effect "Replace Color" might be the way to go, it seems to include 255

    Regarding performance i think the manual discourages this entire practice

    [quote:qhqeaak2]Performance

    Using too many effects can cause poor performance, especially on mobile devices. Try to only use effects when it is important to the appearance of the game.

    Creating many instances of an object using effects can be very inefficient, since the effect must be processed repeatedly for small areas. If many instances need to use an effect, often it is more efficient to place all the instances on their own layer, and apply the effect to that layer instead. This can improve performance whilst producing the same visual appearance.

    Never use effects to process a static effect on an object. For example, do not use the 'Grayscale' effect to make an object always appear grayscale. Instead apply the grayscale effect in an image editor and import a grayscale image to the object, without using any effects. This has the same visual result, and avoids performance-degrading effect processing. Effects like 'Grayscale' should only be used for transitions or making objects only occasionally appear grayscale.

    For more information, see the manual section on performance tips.

    It's not very clear to me, what it means by 'using too many effects. Whether that is too many different effects or too many objects with an effect applied to it. Thoughts?

  • I'm playing with it now using setColor but it's very limiting because RGB only goes from 0 to 100.

    Edit: actually set color recolors the entire sprite regardless of shading so it's not useful

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • http://brandontreb.com/cocos2d-tutorial-dynamically-coloring-sprites

    After reading this brief tutorial I was wondering if something like this is possible with Construct 2? And more specifically, has anyone accomplished it? I have my doubts but I thought I'd ask anyway as someone usually comes up with something new eventually!

    I thought about it a bit trying to use webgl effects and using the setColor but I don't think it's as precise because it colors the sprite as a whole, so the skin tone would be lost unless you separate the body from the head and attach a unique head to body. The problem with that is now there are two sprites for every one sprite that you would have had, if you created them all individually. The same goes for say, attaching accessories such as hats,glasses, and hairstyles. so I'm not sure how that would effect runtime in the long run.

    Edit: One would have to build each character as 6 different sprites and have them color randomly. but how would this effect runtime with for example 400 characters made up of 5 or six sprites each?

    In short does anyone have a creative suggestion for creating several animated, unique humanoid sprites such as in the example of "Bitizens" for the purpose of saving resources? Is it even practical? The alternative being that each unique sprite is drawn and brought into the game as it's own sprite rather than creating them on the fly.

Centra's avatar

Centra

Member since 18 Jun, 2013

None one is following Centra yet!

Trophy Case

  • 11-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

14/44
How to earn trophies