Can I create groups of sprites?

0 favourites
  • 3 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • Afternoon all, I'm creating a game where users will learn to use grid references. In order for me to make this work, i'm having to creat sprites that represent each grid square and then another set of sprites to be the break down of said grid squares. this will creat almost 25000 sprites!! in grid references alone. I don't mind doing this but my sprite list will be Hugely over populated with all the sprites and i was wondering if there was a way to put them in a folder in order to keep it looking tidy? Thank you all

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What? Are you planning to create 25000 Sprite objects? This is a terribly bad idea. You need to use just one Sprite object with many instances.

    And even 25000 instances can cause problems with performance. You probably can do this with a Tilemap or a Tiled Background object instead.

  • I agree in saying this is a pretty bad Idea.

    What you could do is create one giant sprite with the grid pattern on it. Say your grid size is 64x64 pixels, you can easily determine which grid space your mouse cursor is on with some simple math:

    grid x = floor(mouse.x/64)

    grid y = floor(mouse.y/64)

    just make sure the giant sprite starts at the origin of the layout.

    Or, if you do want to use individual sprites, make your layout smaller, your grid squares larges and of course use only 1 grid sprite and spawn them at runtime on layout start for example.

    In my playlist I have several examples of games spawning stuff at runtime: jewels, bubbles, tiles, etc. No grids, but the principal is the same.

    But maybe I misunderstood your requirement of course

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