HolidayExplanation's Forum Posts

  • When I take an item from the ground, I position it on the GUI layer which has parallax (0, 0). Whenever the Character moves with scroll to around the layout, the position of the Item starts going away further and further from the Mouse.x, Mouse.Y position. I assume this is due to the parallax offsetting it.

    My code looks like this standard:

    Every tick -> Item set position (Mouse.X, Mouse.Y)

    Is there a way to get the parallax offset amount and subtract it from Mouse.X, Mouse.Y so that it looks something like this:

    Every tick -> Item set position (Mouse.X - parallaxOffset, Mouse.Y - parallaxOffset)

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Arrays only noticeably affect the performance if you do some heavy looping and if they're big. I use arrays mostly for inventory related stuff, because it's good to have a single central storage for all the loot across the player inventory, as well as any loot containers etc..

    Another thing I used an array for recently was calculating world temperatures for each hour and storing them into an array. So then you can access Arr.At(hour, 0). It makes sense for things like that. But when you need to store data like player variables - health, mana, stamina etc.., it's better to use 20-30 instance variables on the Player object, than an array, because it's hard to read an array, Array.At(0, 6) = mana... Maybe if you're a machine. It would be too hard to read.

    A biome system array won't likely have any performance impacts if you loop through it from time to time. It starts being critical I think after an array has a height over 10 and couple hundred width, then it can freeze the game for a second when you loop.

  • I think the closest to that would be an effect. Mikal has a reflection effect, maybe it's possible to do something similar with it; https://www.construct.net/en/make-games/addons/82/reflecty

  • You do not have permission to view this post

  • You need 2 conditions:

    Mouse -> on Sprite clicked

    Sprite -> Pick top/bottom

  • Bless you. This time I'll keep a file of it, since I began collecting some generic files I created to stop repeating this over time.

  • First method I tried, on mouse over bgSlot changes the frame to 1, but if you keep going over other slots it selects them too. Only after you move your mouse away from any of the slots, they all get suddenly deselected together...

    In the picture, it sets the frame to 1 and then to 0 instantly.

    I just can't find a way that works, I've built this system in the past, but I've forgotten how it works. It's a simple concept, but I never really grasped how trigger once does it in C2 and it absolutely infuriates me. So, any help would be appreciated.

    (AnimationFrame != 2) means if the Slot isn't displayed as locked.

  • I'd add that the subscription model was a major factor in us being able to scale up the company. Before that, Construct 2 was only ever developed by me, the sole developer of the product. I think people often forget that!

    Often people also suggest some kind of alternative business model that would severely reduce our income (or even completely ruin the company) in the same breath as saying we need to hire more people. Naturally customers will always press to get more for a lower price, but there's a balance to be struck between the needs of the customers and the needs of the business, and going too far in either direction is ultimately harmful to both sides. I think we've struck a reasonable balance so far.

    Wow. Would never have thought that Construct 2 was the work of a single person. It was always by far easier to use and more polished than anything else, especially then. It is basically why I chose it over Fusion, GM or Unity. Now I actually see that the model before wouldn't been able to keep up with the current Scirra expenses.

  • Delenne Just checked it out. Clearly a copy, and a good one. Pretty sweet for it being free, and for being open source. GDscript is pretty powerful and so darn easy with their docs being alright, but their 2D is better than Unity's in most aspect - so I'm interested to see what the future will hold for it, especially in comparison to C3.

    q3olegka The Web-version just doesn't feel as native as C2 is, I always feel some kind of slight delay as well. But, when you install C3 from Chrome, it's actually pretty responsive.

    Though they might not have enough funds, most people just download the software and close it immediately, so the 5 million is not very accurate. There are also cracked versions of C2, at least they existed in the past afaik.

  • Delenne That's actually pretty insane, never thought Game Maker would fall under Construct. But yeah, Godot is improving rapidly and has a free model, so it's game over in that aspect.

    I have bought 2 licenses since the release of C3, because it's insane. But, C2 does the job for the price paid. It's not even the price, I just have such a strong anxiety to it if I work on a project and my license expires, I might not be able to afford it anymore and continue working on my project.

    So I pretty much have the license, just to support the guys, but I still work in C2 due to anxiety C3 licensing gives me. I also have many friends that refuse to use C3 because of this, and tbh I changed my mind too. I'd honestly rather have a Construct release like C4, C5 every couple of years than this. It would be a x100 cooler and more exciting.

    Cheers for the graph.

  • Thank you very much dop2000!

  • Is it possible to load an array ['g', 'g', 'g'] into an array instead of having to convert it all into JSON first? I'm basically fetching text messages from my server, so doing that via arrays is a lot more practical than doing it as JSON, and I don't even know what that would look like as JSON.

    Tagged:

  • Yes, I am using body parser and I receive data normally as expected in Postman (also req.body now works due to your help). The server is now fine. That's not the issue anymore; my issue is loading the received object from my server into a Construct array so that I can do Array.At(0, 1) and get e.g. firstName.

  • Sorry I updated the post right about now, I managed to receive data in my server. But, I'm having trouble loading the response data to an array in Construct. Though thanks for the the files, I see now why req.body didn't work for me!

  • I receive the data from my server as an object as you can see here:

    When I load that into Array as JSON, the array seems to be empty. But, when doing a Log of AJAX.lastData I do get the data as a string.

    I have also tried sending only { name: "smth", lastname: "smth2" }, but the array is still empty.

    File: drive.google.com/file/d/1EthiBLhjB-e6vEAI2T9iJ0IuCn8ymD66/view

    Tagged: