Ramladu's Recent Forum Activity

  • You do not have permission to view this post

  • Thank you. I'll check it out!

  • I have a weird question but how do I return a path cost based on the user hovering over an area of the map (with mouse) that they would like to move their character? I am thinking of a game like Jagged Alliance 3 which shows AP cost to move before the user decides where to go. Once I understand how to capture the pathfinding cost, I can use some math to make a user friendly read out for the user.

    I read the pathfinding behavior documentation and I am generally familiar with pathfinding but in recent weeks, I've restarted my game after learning new techniques and now I am trying to learn more about pathfinding to better inform the user.

    I can return X,Y calculations and use the abs() with some fancy math to calculate the distance between the character's current location and the desired location but that is not the same as pathfinding cost. My way actually does work fine however not when I throw blocks in the way or costly terrain pieces.

    Side note: I understand Manhattan versus Euclidean distance if that helps. I teach ML/AI. Computer game design is just for fun.

    Thank you

  • I'm seeking advice for my game development project. I've been working on enhancing the Collision detection for items that players can pick up in my game. Right now there's 6,000+ detections per second. That seems very high, but I am not sure if it is.

    I'm torn between utilizing Collision detection for item pickup or implementing a hovering for more details and a click on (with distance from loot calculation) mechanism trigger.

    Performance is a concern, and I'm unsure if my current approach is optimal for my game's performance. I'd appreciate advice on the best approach for Collision detection and how to optimize it without negatively impacting performance.

    I put together a Youtube video to narrate my work.

    youtube.com/watch

    Update: I did test the hover over and automatically loot technique. The CPU/GPU did not go up nearly to to the level of collision detection so I think I have my answer but I am not sure. I tested it with 30 loot items on the screen.

    Thanks for any advice you have.

  • Exactly. I teach data science at the graduate and undergraduate level and it's the same way. It's easy to get carried away with the ease of developing models without understanding how to make the more efficient.

    I got the in-memory down to 200MB, quite a contrast to the 1600MB.

    That still seems like a lot. I am going to test it a bit more. I have over 300 skill icons. My original plan was 10 classes and 30 skills each. The sprites are probably more detailed than they need to be. Most of my sprites at run time are scaled to get to be used at 16s, so 16, 32, 48, 64, 96, 128, but I still have a lot of images at 128, 256 stored natively. No more 512s though anymore and that world map at 8k resolution is tweaked down.

    This experience is going to be a good analogy in class when we talk about useless independent variables in our regression models. Although I come to Construct 3 to play and get away from work. :-) Worlds colliding...

  • Thanks. I got a 40% reduction by right-sizing the enemy units in the sprite. More work to be done but the path is clear. I also had an old worldmap in 4k resolution. Oops. "Just because you can, doesn't mean you should."

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I know the funny answer is to just not have any images in my game, but withstanding some Friday fun humor, what really causes this number to be high?

    I currently have 1633mb +- running per the debug layout and that seems way too high for what I am doing. I have a simple 896 x 512 layout with 2-d cartoon style graphics.

    Is the estimated image memory based on the original size of a sprite frame? For example, if I have a hammer that is a 512x512 pixel image but I only use it as a 64x64 image in my actual layout, is the estimate image memory based on instances live in the game or based on actual sprite object values? Does my question make sense?

    My debug also seems to have found 560 active objects too. I wonder if my layouts such as my GUI are also affecting it. For example, I have a layer for player inventory and skills, which has a lot of buttons, shapes, and icons as you may imagine. Nothing I can really do about that since I want the player to be able to access them on the battlefield.

    I think I answered my own question.

    Always learning...

    Thanks.

  • Thank you. I will check it out. It makes sense.

    I did the x,y as a simple test the other day and it works. The objects continue along their path like a bumper car or pinball machine bounce over and over again which is fine. I could also run a find path after the collision and the x,y adjustment or a stop path finding for a "dizzy" or "stunned" effect using a wait N seconds before starting again.

    So many possibilities! Fun!

  • Hi,

    How do I have two objects bounce off each other when they collide? Is there a simple way to do this or do I need to build collision detection, if statements about the direction the objects were facing, etc.., I am using pathfinding and not bullets.

    In other words, think bumper cars at a carnival. How do I create a slight bounce into the other direction for two objects? The objects use pathfinding to find each other and move. My thought is to create a condition for collision detection then build sub events based on the direction the objects were moving in when they collided, then adjust their X and/or Y values to move them slightly to the opposite direction.

    Just wondering if there's an easier way or I am missing something. Well, both then. Haha

    Thank you much

  • I decided to make a new layout and a new event sheet and copy everything from the original to the new one. Magically, it works on the new ones. However, intellectually, I still want to know why it does NOT work on the original layout and event sheet.

  • Hi,

    I posted a video on Youtube to explain my problem. I have tried to use Scroll-To based on a behavior for an object and I also used the SYSTEM one to Scroll-To the object. I use ticks.

    When I have the behavior enabled, the scroll-to works only when the unit is near a margin of the viewport. When disabled and I only use the SYSTEM one, it does not work at all.

    I have checked parallax, multiple instances of the object, different triggers other than ticks. And here's the best part - I have successfully used the SYSTEM one to Scroll-To object in other games. I just opened up a successful game and I cannot figure how my set up is any different than the game where it works. Therefore, and thank you if you are still reading this, I created a video where I walk through the layout and the event sheet.

    Thank you for taking a look. I am happy to do the work and not take the shortcut so if there's hints or tips, just let me know. I have used Construct 3 for four years so I am sure it's just something simple that I am missing...

    youtu.be/KqhnCfuVIH0

  • You do not have permission to view this post

Ramladu's avatar

Ramladu

Member since 28 Jan, 2018

None one is following Ramladu yet!

Trophy Case

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

Progress

9/44
How to earn trophies