Sumyjkl's Forum Posts

  • In writing this and creating a demonstration I figured out how to solve it:

    On start, set pos to:

    Self.X * (LayerParallaxX(Self.LayerName) / 100) + (OriginalWindowWidth/2) * (1-LayerParallaxX(Self.LayerName) / 100)

    Self.Y * (LayerParallaxY(Self.LayerName) / 100) + (OriginalWindowHeight/2) * (1-LayerParallaxY(Self.LayerName) / 100)

    You can just set the paralax in the editor, and place the objects on the layers.

    I've been searching for a solution to this for hours, so I'm going to leave this here for anyone who searches for it in future.

    Here's a capx with the solution:

    https://drive.google.com/file/d/1iOv4QzyftMgIXO-TJhbnKBWEJs23Ji0K/view?usp=sharing

    Here's the original problem:

    So, I have a serious problem and I'm considering just giving up and ignoring it.

    I am going to have a pretty large map in my game, with paralax layers. Those paralax layers each have objects on them that, when scrolled to, should all be in exactly the same position as if they had 100% paralax like the rest of the game world. Picture a stack of boxes and a fake 3d effect. Those stacks should only be skewed relative to the stack, not relative to 0,0.

    So, I figured I had no choice but to place objects where they are meant to be (in the editor) and then move them relative to how much paralax the layer has once I start the layout.

    At first I thought I could just multiply by the paralax (e.g. 0.9 for 90% paralax) but that didn't work. I then found CanvasToLayer, and since I'm converting from a canvas position already surely I didn't need to convert to canvas first right? Well neither worked. In fact, the latter does nothing at all. [...]

  • Does this work? On disconnect - set var to gamepad.index

    Or something like that.

  • I'm not sure about XML and JSON but dictionaries are like arrays. You can have multiple objects and multiple instances of those objects. I've often made dictionaries and arrays to be in a container with sprites.

    Edit:

    If you have for example one for unit costs and one for resource requirements, it's usually better to have separate objects. But if every unit has an array describing its last 5 moves, it's better to have instances.

  • Hmm, true. I guess there's a chance of setting it invisible on right click, but it might trigger the UI event first.

    You will probably have to set up a dictionary with all the exceptions like 1 ! / ? and so on. Check if it has the item in the dictionary, if it doesn't then uppercase() it. If capslock is on, don't.

  • This might not be what you are looking for but you can set CSS of the TextBox so that it is entirely invisible.

    I think it's "color" "background" and "border" all set to "transparent".

    You could then just set the text on changes made.

    The textBox will still do all the work but you won't see it.

    The trouble with any of these methods is getting a text position marker. That I don't know, apart from the entirely terrible method of having special characters which are added and subtracted from the string.

  • Hi there people! It took a while to realize what had happened to be honest, since I've been almost entirely using Discord and Itch for a while now for releasing games and talking about game development.

    Now that I have come back I'm quite shocked really. So here I am to vent against the new format and everything bad about it!

    Enjoy!

    This is not to be taken seriously, I'm just pointing some things out and then I'll go away ;)

    Signatures

    Signatures have been a thing on forums for... a long long time. Sometimes they have been abused like we've seen with 'game keys for clicks' and all that, but with the right rules and moderation that has always been solved in time.

    I use signatures for letting people know who I am and what I do. My signature used to have the title art for the three main games I've released over the last year or so and with links to their itch.io pages. People could see what I've made and what kind of games I'm into as well as my rough skill level with C2 and game dev in general.

    But we don't have that anymore. Now, the best we have is an avatar and a name. And even if you click on a profile you have nothing useful to show who they are. This effectively kills community, since now the only way to get exposure is not to join discussions and be helpful but to create endless threads talking about your games.

    Private Messages

    So I realize the whole 'think of the children' thing here but I really don't think that's the real reason. If it were, you could very easily have a 'over 18' checkbox on registration and completely remove PM features for anyone who doesn't check it. Anyone who does and is lying can be dismissed outright because they lied at registration. Now people have to put their email addresses on a public site. Not a good idea. Scammers, spammers and phishers love that stuff. I know there are ways around it (personally there's no way I'd put mine up here) like discord or something like that, but personally I'd be more inclined to ask someone to go send me a PM on some other, better forum!

    Images

    So this is one I really can't stand. Long gone were the days of 2012 where every image you upload disappears in a few months because the forum needs more diskspace, we have things like imgur now, or google drive. Oh wait we can't link to them any more.

    Hello 2012!

    Profiles

    I can't remember too great because it was a while ago and I didn't use it much, since we had signatures instead, but I have this feeling that the profiles of past were a lot more versatile. I know we used to have 'about me' on there, which at least could tell people where you're from or what you're interested in. Now we just have stalking mechanics. I mean we always had those but now we only have those. So now instead of looking at someone's about me or going to some other page they're on, I have to look through all of their recent posts to get an idea of what they're about. I don't even understand this it's too dumb for me, I ain't even mad at this point, just real confused.

    Notification Flooding

    The first thing I noticed when returning to the forums to actually use them is holy what the what why so many notifications! I must be really popular or something. Nope just thirteen of these:

    There's a Construct 3 Update!

    Right, I don't even use C3. I realize there's a big push for moving to C3 but there's a difference between marketing and.. whatever this is. It doesn't feel right. It reminds me of bad shareware from 10 years ago. It's not bad entirely, it just looks bad, and feels bad.

    So there you have it, my rant about the new forum system and a totally objective and reasonable, thought out unemotional argument explaining why it's just so terrible.

    Thanks for reading I guess?

    I'm go bang my head against a wall.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi people!

    I've hit a wall recently and need something to get me back into development. I propose a quite small, probably ironic game.

    So let's do it!

    I've got the following skills:

    i.imgur.com/zmy3LEt.png

    Let's do this :D

  • Whenever I need to export many sprites like this, I use either Piskel (it just splits them by segments) or a program which for the life of me I can't remember.

    Using Piskel, you can load the spritesheet and then export it as a .zip file which contains all the images in sequence.

    Keep in mind if you use this method, you should not have any sectors of the spritesheet empty, since any that are will be automatically deleted by Piskel.

    I never use it, but I guess you could load the entire spritesheet into one animation using C2 and then save as a project; then you could load in the other animations using the files saved in your project and later delete the first animation.

  • Do it all in one go, not in multiple pass / loop.

    Add a "priority" number instance variable to your cell family and do something like :

    For each cell order by cell.priority

    Then according to the type of cell, do the correct calculation. This way you'd loop over your cell collection only once.

    Ah, it works as is, it's just that doing a complicated for each on 300+ objects makes for a laggy game. It hangs for 100ms or so every second with just 200 on screen.

    I think I'll have to just use that solution I don't like. I'm pretty sure it will work, it's just a pain to implement.

    Thanks for the help you guys!

  • It should be cake walk to do that kind of calculations for any CPU at all.

    Care to share a bit more of your event sheet ?

    Sure

    This is the whole function, which runs once every second.

    global myindex < object.count

    ->object.variable= global myindex, do foo

    ->add 1 to global myindex

    Yeah I had hoped to do that, but if one in the middle is destroyed it will fail to do anything on that tick. This is run every second, so at 60fps I would max out at 60 objects (when there are 300 on screen). It also needs to do the calculations in order - farms first, then houses. I could do:

    every 0.1 seconds

    repeat cell.count / 10 times

    ...But I don't know, it seems like bad design.

    Here's a solution I have thought of which I really want to avoid:

    keep a record of how many of each type exist in the world and add/subtract on create and destroy. Then make this go through each of the 6 resources (instead of cells) and calculate the max it can get from that. If disabling resource deficient cells, find the n top cells of that type and disable them. When a new thing is made, recalculate only the disabled ones

    In theory this would always only be as laggy as 6 cells being calculated. Trouble is it's a massive pain in the butt to implement. It would mean making it completely, 100% airtight.

  • If it were me, I would have an object between each zone: while overlapping this zone to the left or right, set the tint effect based on the zone. You could set a target and interpolate toward it.

  • Hey there. So most of the time, my game looks a little like this:

    Only thing is, it needs to calculate resource production for every one of these floating islands (cells). The way it does this at the moment is one step away from being the laggiest system out there.

    First, it takes care of the resources that can be calculated by just adding stuff they produce. These are things like grain fields, windmills and lumberjacks:

    i.imgur.com/SfAhXY8.png

    Then it calculates the ones which have requirements. In other words you need a certain amount of another resource to produce something:

    i.imgur.com/dFEpSAx.png

    The for each is not the greatest, especially since this is running on 300+ objects once every second. Not the greatest.

    I've thought about a few different solutions.. Two things are certain that need to be possible. It needs to know to disable things which don't meet requirements, and it needs to be 100% accurate every time.

    Er, anyone got ideas? I'm going crazy here.

  • As long as assets, code, anything else, including trademarks are not used within the game or to create the game (other than reference) I'm pretty sure it's fine.

    As soon as you call it Super Duper Mario Sisters or Warfield: Modern Battlefare though, people are going to take notice.

    I feel confident that I could emulate say.. Terraria without getting legal issues, as long as I didn't use any of their assets, code or tried to leach off their names.

  • This sounds like a pretty cool premise for a game. It's definitely not that unrealistic either. Pretty much the only hard part would be dealing with multiplayer.

    After that, it's just any other shooter.

    If you find you have a project that is too big you can always do what Extra Credits suggested: minimum viable product.

    What is the meaning of the game? To have 3 sides work with and against each other. What can you eliminate? Graphics, sound, customization, randomization, score systems, extra levels.

    Making one single level with three teams of AI (or multiplayer if you're a code god) would do the trick.

  • I'm always interested in seeing what challenges I can overcome in art. I'd do it for you if it''s reasonably small. Any screenshots of the game as it is? What kind of style are you aiming for?

    If it's less than 20 tiles, reasonably simple style and you're alright with someone who has never done space related sprites before doing it I'd -maybe- give it a go (of course, no guarantees and such).

    As for finding an artist; if you're looking for a paid artist, try PMing one of the contributors in the asset store. Otherwise you can look for people on the forums who would be willing to make assets for you. There is also opengameart.org which may have what you are looking for or someone who'd make it for you.