3 Arks - Adventure RPG (2D iso)

Post your Construct-made creations!

Post » Fri May 14, 2010 5:09 pm

The example was quicker to make than I thought. It's a lot faster to make when you already know how to do it!

viewtopic.php?f=16&t=6400
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Sat May 15, 2010 2:12 pm

Thank you for your answers :).

[quote="Arima":3dumim9j][quote:3dumim9j]
What I'm looking is the ability to change the frame of a unique sprite Object, but not for all the instance of this Object[/quote:3dumim9j]
Ah. I'm not sure if there is a way to do that.[/quote:3dumim9j]Yes, I think it's not possible as easy as I expected.
Perhap's with a special technic, plug in, or another hidden feature :D.

[quote:3dumim9j][quote:3dumim9j]I try to understand, but if you would have an example, it will be more easy for me ;) .[/quote:3dumim9j]
It took me a month to figure out how to do it for my game, and I'm very busy. I might give it a shot, though.
[quote="Arima":3dumim9j]The example was quicker to make than I thought. It's a lot faster to make when you already know how to do it!

viewtopic.php?f=16&t=6400[/quote:3dumim9j][/quote:3dumim9j]Thank you very for this example, i will study it ;).

[quote:3dumim9j][quote:3dumim9j]perhap's with a plug ins, like with GM.[/quote:3dumim9j]
Unless the "s" plug-in has some sort of feature like that, there aren't any others that have memory management. You'd have to create your own.[/quote:3dumim9j]I think I know why. It's because Construct doesn't work like GM. In construct all the images are stocked in the ram, and only send to Vram when needed (if I have understand).
So, we can't free the ram easily. Because if we do that, our images will be destroyed, and we 'll need to load them again when needed.

[quote:3dumim9j][quote:3dumim9j]we can't use several image in a single sprite object ?[/quote:3dumim9j]
No.[/quote:3dumim9j]Ok, a good feature request, so :).
I use this feature a lot with Gm, and it's very usefull to have a unique Object that can draw several image, for a lot of things (characters with different parts, UI...).

[quote="Mipey":3dumim9j]Different animation frames / subanimations?[/quote:3dumim9j]
I have tried, but it doesn't work in my example.
I don't know what I'm doing wrong.

My new example :
[url:3dumim9j]http://blendman.free.fr/construct/enemyImages.zip[/url:3dumim9j]

PS : sorry for my bad english.
B
2
S
1
G
2
Posts: 23
Reputation: 846

Post » Sat May 15, 2010 2:26 pm

[quote:3vh4nomb][quote:3vh4nomb][quote:3vh4nomb]we can't use several image in a single sprite object ?[/quote:3vh4nomb]
No.[/quote:3vh4nomb]Ok, a good feature request, so :).
I use this feature a lot with Gm, and it's very usefull to have a unique Object that can draw several image, for a lot of things (characters with different parts, UI...).[/quote:3vh4nomb]

There's no real reason for a feature like that. You can achieve the same effect using multiple sprites. That's exactly what containers are made for. How else would you tell the multiple images what to do? I don't know how GM does it, but since a sprite is basically an image anyway...
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Mon May 17, 2010 8:49 am

[quote="Arima":1q2sovcy]There's no real reason for a feature like that. You can achieve the same effect using multiple sprites. That's exactly what containers are made for. [/quote:1q2sovcy]yes, you're right, for little and medium (middle?) game. But for very very big game, I think it's a very usefull feature :D.

[quote:1q2sovcy]How else would you tell the multiple images what to do? I don't know how GM does it, but since a sprite is basically an image anyway...[/quote:1q2sovcy]This feature is very interesting to have an easy and good organisation in your cap.

In GM, you can load several (multiple) sprites in a unique Object [edit]and draw the multiples sprites (of this unique object) at the same time/together[/edit]. If you want, you could create a game with only 1 object, and thousand sprites in it, with all the events for each sprite.
In fact, we don't do that, but, it's easier to "manage" and organise 15-30 objects in a game than 150/300 objects and more ;).

I will try to explain (sorry because, I'm not very good in english, so if it's not easy to understand, please tell me ;)).

To explain, I have to show you all the calculs I have made for my game, to manage and organise the objects and the sprites.

In my game (and in other big game), we can have :
- 500/600 Mo of graphics (sprite : characters, fx, UI, enemies, NPC, grounds, trees, plants, objects...)
- in a map (layout) I will have at least for the sprites : 4000 (characters)+150 (vegetations, house, pnj..) + 1280 sprites (enemies)+1000(UI+FX) = 6430 sprites differents to organise for a map.
The calcul for the sprites:
[code:1q2sovcy]
A lot of sprites will be reused, but not all. The sprites characters + UI/fx will reused. Not the ennemies, and not necessary the vegetations/house/pnj.
And I don't talk about the customisation :( (the ability for the player to change his cloth, sword...)

- 1 player : walk, sword combat, magic, dead, other animation > 5*8 directions*20 images = 800 sprites
- 4 friends : 4*5*8*20 = 3200 sprites
- enemies : 4 differents by map- 2 animation (walk, fight) : 4*2*8*20 = 1280
- vegetations/house/pnj bu different univers : 10rocks + 10trees+10plantes+10 flowers+15grounds+1background (tiled)+10house+40little accessories/objects+5fx (fire, smoke..) +4pnj+others objects (actions, teleport, doors, fontain..).. >> between 110 and 150 sprites by univers

The differents "univers" are : 5 forests, 2 deserts, 2 moutains, 2swamp (marsh), 3 plains, 6 city, 3 prairies...... > 30 univers differents
(My map are 5000*4000. And I think I will have 50 to 100 maps. Somes maps will be in the same "univers")
So I will have 125*30 sprites for the vegetations/house/pnj > 125*30 = 3750 sprites.
[/code:1q2sovcy]


- The objects : I can use of course 1 object for several sprites :) :

The objects :
[code:1q2sovcy]
The map :
- 1 object player + 1 object shadow + 6 objects equipement + 1 object for the pathfinding (collision player)
- 1 object friend + 1 object for the pathfinding (collision)
- 1 object "PET" (animal) + 1 object for the pathfinding (collision)
- 1 object enemi (for all the enemies in the map) + 1 object for the pathfinding (collision)
- 1 object tree-rocks-plante-flower-house-other objects (decor-stage set (?)) : no dynamics objects
- 1 object for the tiled background
- 1 object for the grounds (placed over the tiled background) ?
- 5 or more objects "action" (teleport, safe (box), door, HP fontain, magic object..)
- 1 object NPC -PNJ
- 5 objects FX (fire, smoke..) and dynamic FX (Magic spells)
- 1 object for the block collision (invisible)
- 1 object for the target of the player
- the objects "drop", items.. : 4 differents

UI :
- UI for the enemies (health bar, info bar) : 3 objects
- UI for the PNJ : 4 objects
- 1 object for the GUI (player)
- 1 object by menu > 10 objects (inventory, spell book, quest book, option menu, pet menu, friend menu...)
- 10 objects for the button of the menus (I don't want to use the button object) : button ok, close, radio, bar...
- 1 object for the health bar-magic bar, xp bar
- icone objects (spells, sword used..) : 2 objects
- 1 object Cursor

>> 60/70 objects to organise for a layout.

+ the objects that I have forgotten, because we forget always some things.
+ the other objects to organise (text...) which aren't no sprite object, but we need to organise it too in our .cap :).
[/code:1q2sovcy]
So, I think I will have 60/100 Objects by map to organise.

So, I prefer to have to organise 30-50 objects than 100 objects. It's easier.
With the "multiple sprites in one object" feature, I think I could have only 40-60 objects to organise in my .cap, and it would be more cool for me :).


It's like to have folders with global variable. When we use only a fexw globale variable (10-20) in a game, it's not a problem. But, when we use a lot of global variable (50-100), it become really dificult to have a good organisation.

I hope I have been clear ;).

Thank you for help me :).
B
2
S
1
G
2
Posts: 23
Reputation: 846

Post » Mon May 17, 2010 10:19 am

[quote:1tkc2f9m]In GM, you can load several (multiple) sprites in a unique Object. If you want, you could create a game with only 1 object, and thousand sprites in it, with all the events for each sprite.
In fact, we don't do that, but, it's easier to "manage" and organise 15-30 objects in a game than 150/300 objects and more ;).[/quote:1tkc2f9m]

There's no reason why you can't do that in Construct. You just have to take into account that every frame you load must have an existing frame in game. So in theory you can have just one object, as long as that object's number of frames is equal the the maximum animation you plan on loading.
Image Image
B
161
S
48
G
91
Posts: 7,359
Reputation: 67,273

Post » Mon May 17, 2010 10:43 am

[quote="newt":1zgbopz4][quote:1zgbopz4]In GM, you can load several (multiple) sprites in a unique Object. If you want, you could create a game with only 1 object, and thousand sprites in it, with all the events for each sprite.
In fact, we don't do that, but, it's easier to "manage" and organise 15-30 objects in a game than 150/300 objects and more ;).[/quote:1zgbopz4]

There's no reason why you can't do that in Construct. You just have to take into account that every frame you load must have an existing frame in game. So in theory you can have just one object, as long as that object's number of frames is equal the the maximum animation you plan on loading.[/quote:1zgbopz4]oh, sorry, I misspoke, I forgot to mention :
"In GM, you can load several (multiple) sprites in a unique Object, at the same time (together(?))".
it means that you can draw several-multiple sprites with one object, at the same time /together.

We can do that in construct , to draw more that one sprite for an object at the same time ? If yes, I'm very interesting by the technic ;) .
(Because Construct is a very good application, and I would like to use it for my commercial games if I can :) ).
B
2
S
1
G
2
Posts: 23
Reputation: 846

Post » Mon May 17, 2010 2:51 pm

Wow, that is a LOT of sprites. Be careful to watch your VRAM usage! :)
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Mon May 17, 2010 9:54 pm

Like I said you can do all of that. All you have to do is add a separate animation for each one, you will then need a way to pick which instance that you want a particular animation showing. Easily done using a private variable.
[code:n6nkvdp3]+ System: Start of layout
.+ System: For "n" from 0 to 10
..-> System: Create object Sprite on layer 1 at (random(640), random(480))
..-> Sprite: Add 1 to 'anim'
.+ Sprite: Value 'anim' Equal to LoopIndex("n")
..-> Sprite: Set animation to Sprite.Value('anim')
[/code:n6nkvdp3]

This cap will show you how to change an animation, but it also shows some of the issues with using just one object, IE multiple behaviors.
[url:n6nkvdp3]http://dl.dropbox.com/u/666516/multianimations.cap[/url:n6nkvdp3]
Image Image
B
161
S
48
G
91
Posts: 7,359
Reputation: 67,273

Post » Tue May 18, 2010 12:42 pm

[quote="Arima":v3bgavqp]Wow, that is a LOT of sprites. Be careful to watch your VRAM usage! :)[/quote:v3bgavqp]Yes, it's too much I think. I will tried to reduce the number of frame of my animation (20 to 8 or 10 could be great), to decrease the number of sprite for a map.

[quote="newt":v3bgavqp]This cap will show you how to change an animation, but it also shows some of the issues with using just one object, IE multiple behaviors.
[url:v3bgavqp]http://dl.dropbox.com/u/666516/multianimations.cap[/url:v3bgavqp][/quote:v3bgavqp]Waho, thank you very much, it's great ! Thank you very much :D .
B
2
S
1
G
2
Posts: 23
Reputation: 846

Previous

Return to Your Creations

Who is online

Users browsing this forum: No registered users and 2 guests