Plugin request/idea: Sprite Group?

New releases and general discussions.

Post » Tue Jun 07, 2011 7:34 pm

[quote="zenox98":91y4qrdl]I think it's easier to just use a huge tiledbackgroundlayer rather than tiles as Construct just isn't really usable for large tiled games. As an example, level 1 of my game was originally meant to be 205x57 tiles of 32x32 each, totalling 11685 tiles. Instead, I use a tiledbackgroundlayer of 6560x1824 px. Even with sprites of 64x116, it still only uses approx 66MB VRAM.[/quote:91y4qrdl]

The idea here is to avoid tiles, look at the Rayman images....
B
4
S
3
G
3
Posts: 125
Reputation: 1,450

Post » Tue Jun 07, 2011 7:35 pm

I thought the point was the convenience of having the objects grouped together rather than to save VRAM?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Tue Jun 07, 2011 7:42 pm

[quote="Ashley":2wgxyi4i]I thought the point was the convenience of having the objects grouped together rather than to save VRAM?[/quote:2wgxyi4i]

This way you could have large art assets composed by small images, saving lot's of vram, with the simplicity of heaving only one object...
B
4
S
3
G
3
Posts: 125
Reputation: 1,450

Post » Tue Jun 07, 2011 8:48 pm

What you are talking about could be achieved if Construct had parenting functionality. For instance, say you had several small sprite parts that made up that rock like your example shows (and presumably you could make various sized rocks from the components and save on vram that way, rather than having separate, whole "big rock," "medium rock," and "small rock" sprites).

Now, you want to be able to rotate and scale your component rock, yes? That's where parenting would come into play. Take your rock pieces:

[code:w275hifs]
>rockTopLeft
>rockTopMid
>rockTopRight
>rockBottomLeft
>rockBottomMid
>rockBottomRight
[/code:w275hifs]

And create a parent for them:

[code:w275hifs]
>MediumBoulder
>rockTopLeft
>rockTopMid
>rockTopRight
>rockBottomLeft
>rockBottomMid
>rockBottomRight
[/code:w275hifs]

Now you have a MediumBoulder object (which is essentially just an empty vessel with nothing but position, rotation, and scale information) composed of child objects in a hierarchy. You can select a child if you wish to swap it out or change it, or you can select the MediumBoulder parent and manipulate it.

Scaling, rotating, or moving the parent would automatically translate to the children, so they would stay in position and orientation relative to the parent object. The children's individual scale and such would all be "local" to the MediumBoulder object.

You could also select the MediumBoulder object and copy/paste instances of that, rather than having to build new ones from scratch all the time.

Also, let's say that your boulder is actually a small platform made of pieces of separate dirt and grass tiles, and you want the whole thing to move up and down together, like an elevator. Create a parent for them and put your Sine behavior on the parent. Ta-daa, they all follow along automatically.

Ideally you wouldn't be restricted to all the same child objects under a parent either, so you could for instance do something like this:

[code:w275hifs]
>Player
>commandoSprite
>Gun
>rifleSprite
>muzzleParticles
>shellParticles
>Nametag
>idText
>Flashlight
>lightObject
[/code:w275hifs]

This is how Unity3D does things. It is very handy for creating complex objects . In fact the object list for your scene is called the Hierarchy, and every single object in it is basically a child of the scene.

And yes, it is relatively easy to act on a group of objects with containers or families at runtime in Construct, but the basic functionality of altering the scale and rotation in relation to one another isn't as easy, and it's not possible to do in the layout editor, which is why this would be handy.

Probably way too late for this sort of functionality to be added to CC though. It would be a pretty drastic change to the interface.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Tue Jun 07, 2011 9:01 pm

The Rayman games graphics were created with 'UbiArt Framework'

[url:2lflqnfe]http://ubi-art.uk.ubi.com/category/developpement/[/url:2lflqnfe]

"The idea behind our animation system is to be able to animate any kind of image. The image may be a 3D rendering, an India ink drawing, a modelling clay background, an image drawn on a graphics tablet or a scanned image, and so on. In fact, any visual source can be used. We put the focus on freedom and simplicity, to make it easy to start a project and add content without much hassle.

Once the drawing is ready, an in-house tool lets us add the skeleton and determines which part of the drawing will move and how. Then all the animator has to do is design the animation poses, and the tool takes care of the image deformation.

1, Create an image for the level.
2, Cut it up into pieces.
3, Add a bone to each element, to compose the skeleton.
4, Bring it to life by animating it Its that simple.

If youre into the technical stuff, we use 2D patches to contort sections of the image with a level of complexity that can adapt to the potential needs of the final rendering and the target machine. This technique adapts remarkably well to this type of animation and gives excellent performances in a real-time context."





(The green dots are bone connection points)

Construct has all the tools needed to make a game along these lines. (layers, transparency, bone behaviour....etc)
B
19
S
6
G
7
Posts: 1,206
Reputation: 7,300

Post » Tue Jun 07, 2011 9:05 pm

[quote="deadeye":26epf8ra]And yes, it is relatively easy to act on a group of objects with containers or families at runtime in Construct, but the basic functionality of altering the scale and rotation in relation to one another isn't as easy, and it's not possible to do in the layout editor, which is why this would be handy.

Probably way too late for this sort of functionality to be added to CC though. It would be a pretty drastic change to the interface.[/quote:26epf8ra]

Too bad :(

I always wanted to make a 1080p 2d game. Well, I guess I'll have to wait for Ubiart framework :P
B
4
S
3
G
3
Posts: 125
Reputation: 1,450

Post » Tue Jun 07, 2011 9:09 pm

[quote="chrisbrobs":3jd4b16i]The Rayman games graphics were created with 'UbiArt Framework'

[url:3jd4b16i]http://ubi-art.uk.ubi.com/category/developpement/[/url:3jd4b16i]

"The idea behind our animation system is to be able to animate any kind of image. The image may be a 3D rendering, an India ink drawing, a modelling clay background, an image drawn on a graphics tablet or a scanned image, and so on. In fact, any visual source can be used. We put the focus on freedom and simplicity, to make it easy to start a project and add content without much hassle.

Once the drawing is ready, an in-house tool lets us add the skeleton and determines which part of the drawing will move and how. Then all the animator has to do is design the animation poses, and the tool takes care of the image deformation.

1, Create an image for the level.
2, Cut it up into pieces.
3, Add a bone to each element, to compose the skeleton.
4, Bring it to life by animating it Its that simple.

If youre into the technical stuff, we use 2D patches to contort sections of the image with a level of complexity that can adapt to the potential needs of the final rendering and the target machine. This technique adapts remarkably well to this type of animation and gives excellent performances in a real-time context."





(The green dots are bone connection points)

Construct has all the tools needed to make a game along these lines. (layers, transparency, bone behaviour....etc)[/quote:3jd4b16i]


You're right. But you're talking about the animation.

I'm talking about backgrounds:





B
4
S
3
G
3
Posts: 125
Reputation: 1,450

Post » Tue Jun 07, 2011 9:27 pm

I know what you are saying, but the backgrounds are...just backgrounds? They dont need to be massive images anyway. With a decent image editor you can create resized images, then enlarge them in Construct without Distortion affecting them?

Sorry if i am not understanding the original post.
B
19
S
6
G
7
Posts: 1,206
Reputation: 7,300

Post » Tue Jun 07, 2011 9:36 pm

[quote="chrisbrobs":1tsrvlsa]I know what you are saying, but the backgrounds are...just backgrounds? They dont need to be massive images anyway. With a decent image editor you can create resized images, then enlarge them in Construct without Distortion affecting them?

Sorry if i am not understanding the original post.[/quote:1tsrvlsa]


The plugin would accelerate the work flow a lot, and also save a lot of vram. Sorry for saying backrounds, I mean all the art assets in the game. In short, it makes possible a HD game. Right now it would take forever to make just a simple level.
B
4
S
3
G
3
Posts: 125
Reputation: 1,450

Post » Tue Jun 07, 2011 9:37 pm

pyteo, I would love to investigate your caps, but I don't have Construct for a while. Whatever it is, there's something wrong with the sizes. Not only in theory but practically 4 256x256 textures consume the same texture memory as 1 512x512 texture.

I once made an example for effective slicing, where I could prove that a bunch of sprites with totally different sizes (1x2, 256x32, 512x512, etc.) formed a picture of the size 700x700. A picture of that size needs 1960000 bytes of texture memory (1.87 MB), and all the sprites combined used exactly that size of texture memory.

Here is the link to that post: [url:2i0ed3du]http://www.scirra.com/forum/viewtopic.php?f=8&t=7786&p=60406&hilit=vram#p60406[/url:2i0ed3du]

A 256x256 texture takes up 256 kB of texture memory.
A 512x512 texture takes up 1 MB of texture memory.

If you are experiencing other values (like 1.5 MB for 4 256x256 textures, or 3.5 MB for the 512x512 one) then there is something wrong. Graphic card reporting wrong sizes, driver issue, not exactly cut images, Construct reporting wrong sizes, I really don't know...

It would be interesting to find out what is going wrong in your cap, maybe someone else could check it.
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

PreviousNext

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 4 guests