nimos100's Recent Forum Activity

  • Uh, yeah probably a really stupid question. In general though, do empty sprites even do anything to performance? There just empty, no image is inputted into them.

    Whether its a stupid question or not, I guess depends on what you think the answer should be

    But yeah all sprites take of memory regardless of there being a image loaded or not. Also each frame counts as an individual image so a sprite with 2 frames will be seen as being 2 images. So having two sprites vs 1 sprite with 2 frames are the same memory wise.

  • Hi,

    I want to create a Filepath for my program and it should look like this (This is what I tried): NWjs.AppFolder&"Data"&"Test". But this only creates one Folder "DataTest".

    So i want to create a Folder in the AppFolder that is named Data and in that Folder a Folder named Test . I already read the instructions from Scirra but that only shows how to create one Folder.

    Thanks for your help!

    You have to make it like so:

    NWjs.AppFolder & "\Data\"

    NWjs.AppFolder &"\Data\Test\"

  • nimos100 do u also know how i can do this with 2 objects so there is one blue one green one blue one green etc?

    You can do it like this:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What I would like to change :

    Right now, if I want to change something in the way damage is dealt to monsters, I need to update more than 800 events! And I will need to update this code many times in the following months... So I'm looking for a solution to avoid this.

    I hoped I would be able to do this with functions, but if I'm correct, it appears that functions doesn't allow to define a certain object to which the function should be applied.

    Is there any simpler way to deal with that part of the code?

    Thanks in advance for any ideas!

    Functions work on whatever you tell them to work with. So you can define exactly what objects you want and don't want. It depend on what you call it with. Unless I misunderstand what you mean?

    Initially by looking at the code you have posted, it seems like you have a lot of unnecessary code due to the way you have made it. Meaning you have X amount of enemies, which I assume all share the same properties, like health and so on. But from the screenshot you are referring to each of them as individuals, like Wolf, Rat and so on. But if you had a family and some other structure of events using functions, you could have used the family instead, except for spawning them. Meaning for instant in event 799 and 795 you basically do the same thing, dealing archer damage to an enemy. But since all enemies have health you could simply put this in a function if you had family. like so:

    We pass two objects to the function.
    0 Param = Enemy
    1 Param = Player Character
    
    Function "Deal damage to Enemy"
    Pick Fam_Enemy.UID = Function.Param(0)
    Pick Fam_Player_Character.UID = Function.Param(1)
    //Now you have both the enemy and the player character picked.
    Fam_Enemy.Health = Fam_Enemy.Health - Player_Character.Damage
    
    //Now it doesn't matter if its a Wolf, Bat or Rat. So you can get away with a lot of events using functions and families.
     [/code:2o38iop6]
    
    Now this is just an example as im not sure how it works exactly in your game. But using families and functions are crucial in my opinion, because as you say yourself, you now have 800 events and having to go through them and correct them will take a long time. And to turn it all into using families and functions will also take a while, as you have to remake a lot of code. But if you plan on making lots of changes the next couple of month, my best guess is that you most likely would benefit the most from organising your project so it uses families and functions correctly. So the base for further developing your game is in order. 
    
    Anyway since you are only showing a small part of your program, this is just my initial view from looking at the code in your screenshot, so might of course not be true.
  • Due to the popularity of 90/120/144hz monitors in the gaming scene (and its growing) and the way C2 runs in sync to the refresh rate, would it be possible to force 60 hz rendering for the engine?

    This is to prevent some possible bugs as well as to limit excessive CPU usage.

    Not sure what you mean, FPS is not the same as Hz. FPS is how many images are processed by the software per second and Hz is how fast the monitor is refreshing the view or display.

    So limiting the FPS to 60 doesn't really matter in terms of how fast the monitor refreshes. Or do you mean something else?

  • i can't figure out how i have tried so much stuff but they are all not working..... there is a method but than he spawns endless and it gives a error... i have fixt this but there not spawning... only 1 piece...

    Anyone?

    If I understand what you mean, you would like to know how you can make sprites spawn next to one another?

    In that case you can do it like this:

  • No the container should be fine, if it works for what you need

  • Hello. So I guess this is a basic stuff but somehow can't manage to make it work.

    I have a player box and a player skin set to player box on every tick. This works great for my player but when it comes to enemies, since they're clone of eachothe, the set position only works for the very first enemybox and the other ones remain invisible since they have no skin attached.

    How can I attach a skin to an enemy box so it shows up in every enemybox clone?

    If I understand what you are trying to do to. You can do it like this.

    Since you always have an EnemyBox and a Skin for each enemy. You make a variable in you Skin object called "Enemy_UID" and here you store the Enemybox.UID.

    Every tick

    For Each EnemyBox

    Pick EnemySkin.Enemybox_UID = EnemyBox.UID

    ---> Set Enemyskin.X/Y = Enemybox.X/Y

    However the Pin behaviour should be able to do the same, using a similar setup, you just have to be aware that if you need to pin more objects together than 2 you always have to pin to the same main object or you will get "ghost trails" or what to call it.

    So:

    Pin -> Main <- Pin (That's fine)

    Main <- Pin <- Pin (Last object create ghost trails)

    However this might be true for every tick positioning as well. I cant remember. But anyway only important if you pin more than 2 objects together.

  • I truly appreciate the input. Thank you, everyone! Any other suggestions or ideas? Send 'em my way!

    Think your way of doing it is fine, and the other people uses as well. The only thing C2 is really missing when it comes to organisation of projects, is that you could "Ctrl+Click" a function call and it would jump to that function in whatever event sheet it was defined. Scrolling through so much code when doing larger projects looking for functions, it would save SOO much time.

  • Hey thanks alot, this is almost the behavior I am looking for! This really helps me understand the logic behind it.

    How would I go about making them snap to the locations instantly instead of the bullet speed though?

    I tried implimenting nimos100 solution and looking at yours as a reference as to how things are set up, but I can't get it to work

    Forum had some problems so I couldn't post any reply. Seems to be working now!

    The idea I posted doesn't use bullet behaviour, it just moves the object to another object position. You could do it without and just change the coordinate (X,Y) to where you want your object to go to. But using 3 small sprites and just move the object to one of those depending on the index, you can move them around screen and the object will always go to the correct position. So its simply so you can make the functionality one time and then you don't have to keep updating the X,Y whenever you want to move them. If you want it to move instantly as I understand you want, you don't need the bullet behaviour, think that will only mess things up.

  • I don't know if my code is wonky or if this is a bug of some sort, but my npcs are not moving although they should be. Any way, I can't figure out what's wrong so I might as well post the .capx. Thanks. https://www.dropbox.com/s/j2fzvrip0uf3c ... .capx?dl=0

    The way you use path finding is not good and is used a little wrong, that's why it doesn't work.

    Move along path is an action related to an object in this case your NPC, and should be used together with "On path found" and not every tick.

    Here is a modified version that works:

  • Hey guys,

    If i have a platformer mainly with 20x20px tile size and characters around 30x30, what happens if i load for example 40x40px tiles and manually scale them to 20x20 so they have better definition? It affects game performance?

    The larger images you load the more image memory will be used. This is based on the original size so if you load 40x40px images and scale them to 20x20px it will still use as if it was 40x40px.

    Scaling 40x40 image down to 20x20px wont improve quality, as you have less amount of pixels to show the same amount of information.

    40x40 px = 1600 pixels

    20x20 px = 400 pixels

    So as you scale down big images you loose details and thereby quality, if you scale up images you have more pixels available to show information that there are in the original image, and therefore you will start to get more blurred images.

    The best you can do if you want the best quality images is to make them the size you need and not scale them, but in most cases you can get away with scaling as long its not to much.

nimos100's avatar

nimos100

Member since 23 Sep, 2012

None one is following nimos100 yet!

Trophy Case

  • 12-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies