Unconnected's Forum Posts

  • I say it depends on how advanced the class is. Students need to know the structure of things before knowing how to navigate properly. Someone can know how to do something, but not know what to do with it. Once you know how something works, ideas and concepts kind of fall in place. If taught from scratch some minds may wander in incorrect directions and cause a road block for themselves and for others who are following. Knowing the roads before exploring will always help navigate.

  • Both Capx files had the same events and performed differently. When I erased disabled events and unused objects in the Tutorial the frame rate went down and the CPU and Memory use went up. Only thing in the event sheet was to make 144 boxes in 12 columns and 12 rows and then nothing should be happening after that. Was only expected similar results for both Capx and high CPU usage didn't make sense.

    My computer was around 75% better in performance than most tested on a performance site, that wasn't the issue. I looked at the Optimizing Mobile Games article, the only thing I am guilty of was a larger screen resolution than needed. I was going to adjust it as needed later on, it is just easier to work with higher resolution. The 12x12 grid is needed. Since I don't need a background and I can't add variables to Tiles in a Tile-Map it is impossible for me to use a Tile-Background/Tile-Map for what I am doing, unless there is a way I don't know of. It is the only area in the whole game I am creating this many objects, it will be invisible and is being done to prevent preventable calculations later on to help CPU. It is nice to see a post that reinforced what I already knew though. I always try to optimize everything no matter what it is.

  • I am not sure what is going on now... I didn't think it would matter, but out of curiosity I erased everything that wasn't being used (disabled) in the Tutorial and performance went down.

    Tutorial

    144 green boxes on a white background

    50fps

    Starts at 48% lowers and stays at 38% CPU

    6.4 mb memory

    Renderer webgl

    A bit odd.. When I remove unneeded things from the project the performance goes down. The things I removed were disabled and Global variables that weren't being used because of the disabled events. This is good for me. I can stop looking for what is causing it. I would like an explanation though if possible. How something can be disabled and have good performance and then if deleted it effects performance for the worst. I understand if what was removed was mathematically supporting the enabled events, but they were disabled..... The ghost in the machine...

  • I downloaded a large tutorial. I studied it and disabled everything that wasn't needed for what I was trying to do. I created a new project that does exactly what the Tutorial does. The only difference is variable names and loop names. The only image that is used is even the same format, same 32x32 size and similar in file size. (My image 400 bytes and tutorial image 430 bytes). The project settings are the same. I don't notice anything different. On start up they both create 144 boxes using the exact same loop. That is all. They both just make 144 boxes and does nothing else. The tutorial is disabled so it can't do anything else yet. They are both being ran from single file Capx, not from project files.

    When they are ran in debug mode...

    Tutorial

    144 green boxes on a white background

    60fps

    Starts at 14% lowers and stays at 6% CPU

    2.2 mb memory

    Renderer webgl

    My File

    144 green boxes on a white background

    60fps

    Starts at 29% lowers and stays at 17% CPU

    2.2 mb memory

    Renderer webgl

    Both have the same canvas size, time scale, same scale, same project settings, same Window Size, both letterbox scale, ran in same browser, same everything as far as I can tell, even the Project configuration settings are the same. I even checked the layout properties/effects and the object properties, and they are the same. The event sheets even have the same events in the same way/order. The only difference is my file doesn't have any of the disabled events. Everything is disabled correctly. I disabled everything at once and only enabled the needed loop and the "on start of layout" call. If wanted I can remove everything unneeded from the Tutorial File to see if that helps. They 144 boxes are placed together in a 12x12 grid and look the same when ran.

    The CPU on mine runs about 11% higher than on the Tutorial. It doesn't matter if I am running them at the same time or ran separate. 17% seems to high for only rendering 144 boxes on a white background.

    Does anybody have any idea why this is happening? It is only the beginning foundation of a game, If I add more it will only get higher. I think 17% CPU is high for only what little is happening. I even started over a few from scratch and got the same results.

    All it is, is defining a function and calling a function. My event sheet consists of 4 Global Numbers and 2 events, 1 event has 2 conditions and an action.

    System/

    on start of layout/

    call function "Functionbox

    on "Functionbox" /

    "Run loopname 12 times" &"Run loopname2 12 times"/

    System/ create object loopindex...etc

    The events work, that isn't the issue. Just showing I don't have some Every Tick non sense. As soon as it creates all 144 boxes it shouldn't be doing anything, but it remains at 17%.

    I don't have online storage and prefer not to make an account anywhere for storage, Sorry I know it makes it harder. I do have Steam if someone wants to see the files.

  • 99Instances2Go In other words it allows you to create many levels using only one layout. You only have to use a few JSON files. Okay sounds good. Not sure how I missed something like that. Thank you.

    Thank you for the 2nd example as well. It will help plenty.

  • 99Instances2Go Thanks. I looked at it. It will be useful.

  • 99Instances2Go It took me a few minutes to realize what was going on. Why map already placed objects on the layout into an array only to destroy them and then recreate them?

    The only reason I thought of was, by placing objects in an array you are preventing duplicate objects from being on the screen. Is an array really needed for any reason other than having 1 object on screen instead of 24. Is that the only reason?

    Assuming the path is set beforehand and no other objects are needed to be placed in the array.

  • Problem Description

    Avast Antivirus prevents installation of Construct 2 r229 and prevents the opening of Capx Files.

    Attach a Capx

    Any Capx.

    Description of Capx

    N/A

    Steps to Reproduce Bug

    • Have Avast installed with "Hardened Mode" Enabled
    • Have Construct 2 r229
    • Try to install and/or open Capx

    Observed Result

    If trying to install Construct 2 r299 or opening a Capx a Window says:

    "Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item."

    Expected Result

    Installing or opening of Capx

    Affected Browsers

      N/A

    I am not sure if this is in the right area or if this is known. I did do a simple search and didn't find anything. There is a chance I didn't type in the right thing.

    Versions:

    Windows 10 Pro, 64-bit (x64) Version 1511

    Avast Antivirus 11.2.2262

    Construct 2 Beta r229

    Construct 2 r229 can not be installed and Capx files are blocked from being open when "Hardened Mode"(Moderate or Agressive) is enabled in Avast.

  • Each Tile needs more than 1 piece of info inputted into it. Each ArrayX, ArrayY coordinate can only hold one piece of info in the ArrayZ.

    What 99Instances2Go is suggesting sounds like giving every tile an X value and than using the ArrayY values for info. That sounds like it will work and actually be less complicated and smaller in size. I was asking how to get ArrayX and ArrayY on mouse click not how to compare to existing or change an existing Array Value, I know how to change/compare value. I was asking if there was a function or an easier way to go about getting ArrayX and AraryY on touch/click. I probably have asked wrong or implied something I didn't mean to, I have a habit of that... I suppose I could make an instance variable on each tile and get the ArrayX based off of the Instance Variable and then change the ArrayY needed on touch/mouse/event. I know about how a 3dArray is structured, I was asking if the ArrayZ stacked on top of another ArrayZ was automatically associated with the one below it, or if it is free to be modified. I believe I now know it is just a separate piece of info and only the location is different, it can be used in anyway one thinks of.

    Thank you both.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Now That I posted this.. I just figured that I may be able to Blend and Spin Game Objects to make it looks like it is a timer. What would be the best way of doing that if it is in fact a solution?

  • Sorry about the title, I didn't know how else to explain what is needed in the space allowed.

    Basically I need a Timer that is shaped like a circle. There are two lines from the center of the circle to the edge. One line doesn't move while the movable line slowly spins away from it. The lines origin points are at the center of the circle, it looks like and acts like a circle clock with an hour hand and a second hand. "Area A" starts off as the small area between the Lines. "Area B" starts out as the larger area on the other side of the lines. I need transparency to stay in "Area A" even when "Area A" gets bigger than "Area B". When the two lines touch each other and "Area B" is gone, it will be destroyed.

    In other words I need transparency between two lines and it needs to follow a circular path. The two lines are only touching at the origin point. The transparency needs stay on the same side of the lines even when they spin above 180 degrees. When it gets to 360 I need the whole object to be destroyed.

    Almost like the Super Mario 64 Health Bar, but without segments. It would be as a whole that slowly goes away.

    This needs to be done in an event sheet, as the movement of the movable line can be adjusted due to triggers in the game. The movable line will sometimes slowly move and other times it will jump x%. It is unpredictable due to how the player plays the game. This is an in-game timer, a long term timer. It barely moves unless the player effects it somehow. I also would like the visible part of the timer to be able to overlap objects, if possible.

    I know this is kind of an odd thing to ask. I only asked for a circle timer because I assumed it would be easier than a square. A square Timer will work as well. With a square I can hide the unneeded parts. I have no idea where to start on this. It is why I am asking... I wouldn't know how to even look it up. I was wanting to avoid making it an animation. If the end of the lines need to go past the circle's edge it should be okay. I am aware there may be the need for many lines.. Maybe some type of points are used as well.

    Thank you. sorry for any complications.

    Will be a small while before I am able to reply.

  • I am not talking about the examples I've seen where player inputs text and then the text changes a value. On those the values are always known. I am talking about the ability to auto select ArrayX and ArrayY values based off of in-game actions. Like a player placing a building on random objects(tiles) that are already mapped to an array.

    I am aware I will have to implement a 3d Array. I am not 100% sure how that works. From my understanding (X0,Y0,Z0) has one value and then (X0,Y0,Z1) would just be second piece of information for (X0,Y0)? Do new Z layers "stack" above or below the current existing layers? When using a 3d Array can I add a new Z layer on an existing Array without effecting it's existing values and more important messing up code? I am thinking I can but want to be sure before I end up messing something up and not realizing until it is to late.

    I currently have a single layer array that remembers the objects on a layer(Similar to Tiles). If a newly placed Building is covering 4 objects(Tiles) how do I collect the corresponding ArrayX, ArrayY coordinates so I can change the correct ArrayZ value? I want it so the Map loads the same way if the game is saved and reloaded.

    I know I may have to have a building only take up one Tile upon placement and then mathematically change the other effected ArrayX, ArrayY and ArrayZ values with an event. There is also a chance I may be able to implement an overlapping event. The only issue is not knowing how to get effected ArrayX and ArrayY values.

    A few more question. Is it possible to only use one Array for every level/map? Just on start of layer have it load the corresponding JSON file and auto adjust accordingly? From my understandings a JSON file is a readable string of text that Arrays can read and translate.... [X0,Y0,Z0][X0,Y1,Z0][X0,Y2,Z0].. etc. I assume all I would need is a Global Variable that changes on startup and to adjust it's size as well. Correct? Do JSON files work on all devices, P.C., mobile devices, consoles etc? The game generates a file and then the device handles it? If a device is not supported what happens?

    Capx for this project is nearly empty and can be redone easily. I don't mind if the set-up for this is a small bit tedious. I am more about performance and ease of workflow after it is set-up. Plus once it is set up the chances are small that it will have to set it up again, possibly just a number change here and there.

    I have read a lot already, these are just questions I haven't caught the answers to. I know this is a lot for one post and it may be all over the place. Sorry about the length of the post, the width is average.

    I will be away for a while.

    Thanks in advance.

  • I admit I got the X and Y coordinates backwards for a small bit.

    X0Y0, X1Y0, X2Y0

    X0Y1, X1Y1, X2Y1

    X0Y2, X1Y2, X2Y2

    The formula loopindex("x") + loopindex("y") * 3 for the array value does work. The 3 is in fact the Width of the TileMap. By multiplying the Y by 3 it is correctly placing the values of the array in ascending order.

    It sets the values of the X to

    0,1,2

    0,1,2

    0,1,2

    and the values of the Y to

    0,0,0

    3,3,3

    6,6,6

    Any number multiplied by 0 is 0. So that explains how the top 3 tiles can stay 0,1,2 . When X and Y is added together it creates:

    0,1,2

    3,4,5

    6,7,8

    Thanks, the example you gave was very useful.

    I just figured I would explain in case more people need to know.

    I forgot you could view the Array Values in the Debugger as well.....

  • I am not understanding the 3 then. Because 0 + 0 *3 = 0 and 0 + 1 *3 = 3. I am not understanding it fully. I understand that loopindex is how many times to loop. What I am missing is, by multiplying by 3 it seems the array values would be multiples of 3, which should throw the tile order out. I understood what Loopindex means is what I meant by the above post.

  • I understand now. I was misunderstanding Loopindex