Objects or Characters?

Started by Ethan D, Fri 30/07/2010 22:31:26

Previous topic - Next topic

Ethan D

I'm wondering if anyone could tell me the best way to handle creating this program I'm working on.

I want to be able to have up to 50 individual random letters appear on the screen in random positioning so that they are not overlapping or going off the edge of the screen.

I haven't actually started yet because I'm pretty sure that if I have 50 objects in a room it will kill the processing speed of the game.  If I have 50 characters would it have the same effect?  If it would are there any ways that I could do what I want without slowing the computer down horribly?

Thanks everyone!  :)

Ryan Timothy B

Well, one problem is that you can only have 40 objects per room.
Another problem is that there is a limit on how many Characters you can have visible per room. And I'm pretty sure that limit is 50.

Are you able to interact with these random letters? Do they animate? Do they shift transparency? We need to know these things if you're asking us which route we think you should take.  If not, then perhaps you could simply just draw them to the background.
The non overlapping and random positioning is an easy task.

Ethan D

#2
You cannot interact with the letters.  They only need to change positions and such every time the room is loaded.  The letters do not animate nor do they shift transparacy.  I only need them to all appear at once for less than half a second and then dissappear.

More info. on this program:
I was researching Eidetic memory (Photographic memory) and was trying to find a program that helps people develop a photographic memory and I couldn't find any so I'm working on creating one right now.  Each of the characters or objects has to have a random capital or lowercase letter of a random color.  I know how to do this as well as how to do non-overlapping and I have a theory on how to make it so that it cannot go past the edge of the screen.  I am just trying to figure out the best way to handle a large number of random things so that it runs quickest.

When you say draw them on the background do you mean with a scripting command?  I'm unfamiliar with the draw functions...  

EDIT:  The main purpose of this program is for me to check if my theories about Eidetic memory are true.

Ryan Timothy B

#3
Alright. I would definitely draw it to the background then.

Check out DrawingSurface.DrawImage in the manual.  It even shows you how to draw to the background.

You'll also need to use:  Game.SpriteWidth[int slot]  and  Game.SpriteHeight[int slot]  to find out if it'll be off the edge, or overlapping with another.  Obviously using a struct array to store where each number is and what sprite they're using.

Ethan D

Thanks Ryan Timothy!

I should be able to figure it out from here.

Thanks again!

SMF spam blocked by CleanTalk