jwilkins's Recent Forum Activity

  • Currently my game uses the Tint as a layer effect for slightly changing the colors when a room is "dark", additionally, some of my rooms are "flooded", and anything under the Y position of the water line is layered underneath a Tile object that uses the Water Background effect to create a ripple distortion.

    Individually, these 2 effects work perfectly.

    However, in rooms that are both "dark" and "flooded", objects underwater exhibit a weird, unintended double-image effect to them. In this case, one of the double images has both the Tint and the Water Background effect applied correctly, but the second double image only has the tint applied. If it helps, the second image that does not have the Water Background effect applied always appears behind the correct version.

    Does anyone know what could be causing this?

  • The simplest thing I can think of for this (admittedly I have not implemented it myself) is to differentiate between the overlapping instances in some way (possibly pick by highest UID for example) then lower the speed of one of the two picked instances. This will mean the instances "bob" back and forth in speed, decelerating when they overlap another instance with a higher UID, but accelerating when not, but if you want a quick and dirty method this should work.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks guys! I haven't had a chance to try implementing this but I should have enough advice to go off of now.

  • I am terrible with advanced math, and while I can mostly get by, I would appreciate some help with understanding how to use qarp to calculate stat curves in an action RPG.

    The scenario is that I have spells that need to exist for a certain duration dependent on the players Wisdom. Currently I just spawn the spell, then start a timer for it based on the casters Wisdom stat. Currently this looks like "Set timer to: Player.Wisdom*0.05 Seconds".

    This is not great game design as it means spells stick on the screen for minutes at a time if you cast with a high wisdom stat, so I want to implement a curve to this so that the higher your Wisdom stat is, the less of an effect it has on the timer. The stat range is anywhere from 1 to 9999.

    So I believe that would start looking like:

    qarp(1, 9999, c, Player.Wisdom)

    And I think that the "c" value is the rate of the curve, but I don't quite understand that part, or what the value should look like there, is it a decimal value as well or something else? And if anyone can explain this in a way that makes sense to me it would be appreciated. Thank you!

    Tagged:

  • After you picked some instances, in a sub-event you can do "For each Object order by Object.X" and only process the first instance, after that stop the loop.

    Or, depending on how these instances are positioned, you may be able to use "Pick nearest to" event, for example, to pick the leftmost instance, pick nearest to (-10000, layoutHeight/2) or something similar.

    Perfect! I knew that there was a way to do this, I just didn't know it was nested inside of the "For Each Object (Order)" command. Thanks!

  • I feel like this is more obvious than I am making it, but here goes.

    I have a group of instances I have picked based on a few parameters to make sure they are eligible for a certain function. I want to pick only those with the highest or lowest X position (there will almost certainly be several instances at the same X position, which is fine).

    I'm pretty sure I can do this by ordering the list I have made based on X position, but I am completely blanking on how I can accomplish that and could use some help.

  • Yeah I only read from the array once per relevant object at the beginning of the layout, and then write to it only once per relevant object at the end of a layout, or when an object is killed, so I don't foresee any of that being an issue. Thanks for the additional information!

  • AllanR Thank you! That is great to know, in that case I won't implement Bruno's solution since mine already works and based on your information, doesn't have a large enough impact to actually hinder my games performance.

  • brunopalermo That's a much more efficient idea, for some reason I had it in my head that because it's possible that a dungeon uses all 96 rooms, I should build it for that, but the changes of a dungeon actually building out all of those, and that a player explores all of those rooms, and that all of those rooms contain the maximum number of enemies is fairly slim.

    That said, I usually just look up array values based on an XYZ locations related to other values, I haven't looked up an array value based on an ID stored inside a cell, I'll hafta look into how I should do that.

  • I haven't run into any issues with this yet, but I am concerned I might in the future and want to address this earlier in my project rather than waiting until it becomes a problem.

    So, I'm using a seed generator to procedurally generate dungeon rooms. These rooms are connected to one another, but are separate layouts. This mostly works right out of the box, but there is of course the issue of tracking changes made to the seeded rooms, specifically Enemy Health, position, and state.

    I've addressed this with a 3D array that records those values for each enemy whenever you leave a room, and then loads them when you enter it. It works great!

    But the array is by far the largest I have ever worked with, clocking in at 24,000 cells. Most of these cells are empty (there is an X column for every potential room in a dungeon, with a potential maximum of 96 rooms in a dungeon) and these cells mostly just store integers, though a handful do store small strings.

    Do I run the risk of this being too large? If this is too vague, what would be a good rule of thumb regarding array size?

  • Mobile devices are much less powerful than a PC, so there could be any number of issues. That said, one common issue is updating text every tick or too often, this is a very resource hungry process on any device but will slow down mobile devices especially.

  • This might seem a little silly since this is immediately being marked as solved, but in an effort to answer this question for future users with the same issue, I wanted to do a quick bit of documenting my solution to a problem that has been asked at least a few times before here based on search results of this forum.

    Firstly, you should know that if you want to host your Construct built games on your website, you really shouldn't use Wix as your website design kit. I found this out the hard way, but unfortunately Wix does not give you access to your sites folder structure. You have to upload files through the built-in uploader, and the uploader will not accept javascript files. But, if like me, you made the mistake of jumping on a deal because you needed a website fast for some reason, and you didn't learn this until after the fact, then you aren't out of luck, you just have to go about it differently.

    This guide got me 90% of the way to embedding my games into my site. To put it simply, you are creating a Netlify.com account and uploading a zipped folder with your HTML5 Exported game in it. Then, you copy the address it gives you for this, and place that into Wix's iFrame tool. This is all covered better in the linked guide, however this will only work for you if you had planned to embed a single game. You can upload more deployables using Netlify, but only if you do so on your own domain, and we cant link our Wix domain (or at least I could not find a way to do so).

    The way around this is very simple, but not covered in the above documentation. If you wish to embed more games into your site, simply place them all into a folder, then zip that folder and upload it the same as documented above to netlify. You can then append the subfolder name to the end of the URL in your iFrame and it should work flawlessly. An example would be yourdeploy.netlify.com/Game1

    Again, this might seem obvious, but it might also help some people with the same problem in the future.

jwilkins's avatar

jwilkins

Member since 17 Dec, 2016

None one is following jwilkins yet!

Trophy Case

  • 8-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies