Zamargo's Recent Forum Activity

  • I don't find what your suggesting to make sense. Zelevation controls the ALTITUDE of an object viewed with a 3-d camera, it only controls depth if you are in 2-d. So if you are suggesting that we use a 2-d (HUD ATTACHED) bullet then it would literally move with the screen and not be inside the game world.

    The only way is to assign a Zelevation per tick based on CameraYRotation to keep it center screen, which after a few tries reveals itself as being a ratio of speed to Zelevation as a bullet fired straight up isn't going anywhere x/y wise.

    I would love to hear an improvement on my formula or a further explanation if I am misinterpreting your suggestion but it sounds like your taking a guess at it and about 15 steps behind the trial and error ladder I am on.

  • This is the closest I can come to getting a projectile to fire straight in a 3-d world, any suggestions?

  • I have it working now thanks to you guys.

    Eventually as a side project I want to learn to process the tasks using a fps kept in calculation by rotating logo. Maybe even one using cpuutil expressions. Ultimately I think keeping track of progress in the current task/loop and only operating enough per tick to be limited by cpuutil or fps and reporting the progress at the end of the tick would be the best way to report loading and one day I shall make it happen.

  • The wait command doesn't seem to work It seems more like it is issuing 100,000 wait 0.1 second commands all at the same time. I might rework this to only continue to generate level under a certain amount of FPS. cpuutil or some command like that if that.

    UPDATE: It seems to work very easily in segments outside of the loops. I can cycle through generating terrain, ore, trees and update the player before each task by using a 0.1 wait just like you said! Thank you!

  • I have a huge, extensive function that generates a 100,000 tile map, but I cannot for the life of my figure out how to display the loading progress to the user. I have tried making a loading bar and updating it from inside of the loops but it seems to skip past everything and still just freezes for 12 seconds. My suspicion is that everything is happening inside of one game tick, but if that is true what is a good way to give the game time to update the visual for the user in between?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I can't seem to make a progress bar work the game just freezes I don't know how to make it wait long enough to update the visual.

  • So I am creating a rather big project and have eventually ran into the problem of having too many sprites laying on the ground that the player could pick up. They were all so close to each other that it was causing a million polygon checks a minute, mostly because all these items were occupying each other's bounding box. It was considered regular decorative trash (spent items), but I wanted it to be picked up again by the character. This ultimately was the cause of 95%+ CPU use and resulted in a game that quickly becomes unplayable.

    So that led me into a quest for efficiency! I will explain the ways I have found to get around this and would love to also hear everyone's feedback on what techniques they have used. My biggest problem is finding a way to not have to go from collision to polygon for dropped items testing EACH OTHER while laying closeby! Some things below are alternative methods and some are ideas for efficiency to the collision detection item pickup.

    #1 Using the mouse click or a button to pick up these items to avoid collision detection pickup and have collision on these items turned off.

    #2 When the player comes to a stop testing all items for Distance(x1,y1,x2,y2) to do a pickup event.

    #3 Turn collision off on items outside of the screen since the player is the only target for these tests.

    #4 Delete trash sprites in X seconds, attempt to limit pickup items that can be walked over by making them merge together if they are crossed in bounding boxes (overlapping) the same UID they are the same item and paired into a "stacked" item using a family instance variable.

    #5 Stop items that have finished "bouncing" to 0 speed on ground collision and push them outside of the solid that they interact with by sending them back to their last recorded X/Y which saves itself every tick on an instance variable

    Thank for any replies ahead of time!

  • Okay, I have a space game where I have generated planets that you dig and build on terreria or starbound style. I am just now reaching the point where I want to add scorch marks,grass,ore and other things attached to either dirt, rock, wood ect. So my question is:

    Is it better to make a new frame inside of my tilemap which each different land type holding the same ore, or drawing the ore as a sprite that just lies on top of the tilemap?

  • I would have hoped that there would be a difference between changing the collision polygon and completely removing the object. As you said about a new "collision instance" is created when you change the polygon, but nothing new is created when you erase something so I personally consider this to be a bug or something that needs work within the utility. If I was animating things I would just use the invisible collider, but removing them from the game world bringing up the same issue looks to me more like problematic built-in physics. Either way still loving construct.

  • Thanks for your reply! So you are saying simply load a visual before I begin the process and inside of my loops just update the progress bar? Wonderful Idea I didn't even think of that! I was assuming that I needed to use some special implementation that would calculate cpu usage I didn't even think of just implementing something myself. You see I am doing everything on layout start so I am looking at this initial freeze thinking hmmm how do I keep it from stopping like this. It is freezing because I am doing everything at one time and not stopping to update the user with visuals.

    Thanks again for bringing this to my attention. When you said the 50k tiles part it turned a lightbulb on.

  • I have a 100,000 tiles that get formed into ground, underground, caves ect that stops the game solid for about 10 seconds straight when the level first gets generated. How do I put some type of visual up during this process that serves as a "loading screen" because the traditional loading screen are for loading the game not heavy handed parts within the game?

    Thank you to anyone replying.

  • I made an excellent substitute using the bullet behavior with gravity and bounce off solids property. All I really needed was a few modifications to make a decent fake physics. First I took 1/5th off total speed on the solid bounce via collision event and when object is moving rotate by X - LastX, then update lastX. After 100's of tests I really appreciate the bullet behavior setup I have decided on. I am glad it seems a workaround is always just a brainstorm away with this system.

    99InstancesToGo - Thanks for the update on the situation, It probably is doing those collision calculations across the entire board when using a tilemap and physics. With 100 x 1000 tilemap it can't be too easy on those calculations especially if a memory issue is present. I am not really trying to animate so much as completely erase one tile. I don't know if 100k physics objects (most immovable) is even a thought worthy project, but I am tempted to just stick with NES style physics for now.

    Newt - Well it does give an error message and All you have to do to produce the bug is to use a big tilemap and toss some physics objects on it and after try erasing tiles. I apologize about the lack of resources, but as a commercial game I am not sure what I can and can't do. While I can most likely trust you guys being other developers on this network I have really no clue who is going to get a hold of something If I post it. I figured as broad as this problem is that a project file might not be needed to diagnose this issue.

    Thanks for replying both of you!

Zamargo's avatar

Zamargo

Member since 3 Jul, 2017

None one is following Zamargo yet!

Trophy Case

  • 7-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

10/44
How to earn trophies