Duplicate Image Objects?

BlitzPlus Forums/BlitzPlus Beginners Area/Duplicate Image Objects?

Normsthename(Posted 2008) [#1]
Hi
I am writing a Tetris Type game where the Image object moves about the screen.
Once it has found its final location It does not move again.
I then need to create another image object exactly the same as this one and repeat the above.
After all the larger shapes have filled the screen up, I then create a smaller Image Object and this then starts to fill up the screen in the empty areas.
Once again I need to create lots of the same object, but I don't know know how many it will take to fill the screen.....
There could be 2000+ stationary Objects on the screen at the end of the Level.....
Because each screen level is different I don't know how many of the objects it will take to fill each background, so I don't know how many objects to create in the first place!

Is there a way to duplicate existing Image objects?
Failing that can someone please suggest a nice solution!

TIA

Andy


Snarkbait(Posted 2008) [#2]
look into using types.


Sauer(Posted 2008) [#3]
Yes types would be the best way to add, delete, and edit large amounts of data. If that doesn't work, just create a massive array that fills up the screen. After all, you can't have more objects in the game that what fits on the screen.


Normsthename(Posted 2008) [#4]
Thanks Sauer
I really need to learn about Types, they sound ideal for this project.
I have had a little play with them, but I still don't fully understand there workings....

Andy


Sauer(Posted 2008) [#5]
Just a small tip, most of the time when manipulating types, you're going to do it in a For-Next loop like this:

For p.player=each player
code here
Next

This is the only way to encompass all variables of a same type easily. That will save you a lot of frustration.

I'd be happy to answer any further questions as best I can, feel free to post.


Normsthename(Posted 2008) [#6]
Thanks Sauer
I will have a play with Types, and if..... I have any questions I will get back to you.

Thanks

Andy