How do I get Best Game Performance for large maps of villages/cities ? Stardew valley

0 favourites
  • 6 posts
From the Asset Store
Best car suspension with spring effect and very cool terrain generation.
  • Hi , Im creating a game like Stardew valley , and it will have hundreds of images , and I Would like to know what is the best practice for a good game performance ?

    Creating all objects in the layout view , images already exists on start of layout ?

    hundreds of images .

    or

    Creating everything by code with the predefined positions using arrays or json files when the games starts ?

    Thanks

  • You probably won't see much performance difference between those two options. Having 1000 objects in your layout when it loads, or loading in 1000 objects from arrays later, still ends up having 1000 objects in memory either way.

    To be honest, for something like Stardew Valley, you shouldn't need to worry too much about performance. Stardew has small pixel sprites and the world is split up into separate 'areas' for loading (it's not a seamless overworld map). It also contains a lot of asset reuse to keep the memory requirements down. I'd recommend studying how Stardew is put together and you'll be able to see some of the things the developer has done to keep things efficient.

    The most important things for performance IMO are keeping LARGE images to a minimum, not using loads of effects, and writing efficient event logic (as on a PC with a good GPU the main cause of slowdown will be dodgy code).

  • Thanks mikehive

    So its best I have 10 images 10px by 10px than 1 image with 100px for example ?

    I mean to create some backgrounds ..

    What the best resolution of the ViewPort Size for this kind of game ?

    Im using 16:9 / 854 by 480

    Can I use 16:9 / 426 by 240?

    if I increase to 1920 by 1080 , it will force me to have images larger than I should use in a small resolution correct ?

    I mean I want to have a game with a good performance , with nice resolution and that fit all devices .

  • What the best resolution of the ViewPort Size for this kind of game ?

    Im using 16:9 / 854 by 480

    Can I use 16:9 / 426 by 240?

    You can use whatever you want! It's as much an artistic choice as anything else. Smaller resolutions will obviously perform better, but you may not like how things look at too low-res. It's a balancing act. Sometimes when I start a pixel art game project, I'll make a few test images at different resolutions to see what looks the best and what I'm the most happy with.

    if I increase to 1920 by 1080 , it will force me to have images larger than I should use in a small resolution correct ?

    Correct.

    I mean I want to have a game with a good performance , with nice resolution and that fit all devices .

    A noble goal, but you might find it's a good idea to get more specific about the devices you want to target. When you say "all devices", are you including mobile apps? You will likely have difficulty finding a resolution that performs well on mobile while also looking good on desktop PCs. And more to the point, few types of games are equally suited to PC, consoles, and mobile (most kinds of games work best on one platform or another). So rather than trying to please literally everybody, you may find it helps to pick one target platform and work towards that.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • mikehive Thanks a lot !

  • Just wanted to chime in and mention that games like legend of Zelda and Stardew valley are 90% comprised of tilemaps, and not individual sprite objects.

    Also image dimensions are a matter of how much detail you want. You don't have to worry about resolution much, full screen scaling takes care of that for you.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)