Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - zeromeus

Pages: [1]
1
Window / Dealing with a large number of sprites?
« on: July 05, 2011, 11:35:20 pm »
The trail is to trace mouse movement. I'm sorry but I'm kind of a noob. What exactly does it mean to use an intersected vector of positions?

Thanks!

2
Window / Dealing with a large number of sprites?
« on: July 05, 2011, 07:14:31 pm »
Hey all,

I'm trying to create a simple program that creates a 'fairy trail' of green pixels on a black background generated by the mouse. From another topic I learnt that I can't turn individual pixels on or off and so I'd instead need to use sprites for each pixel. However, when drawing so many sprites every time I call Display() the screen (understandably) flashes because it's drawing so many sprites at one go.

My current approach is creating a 2D vector the same size as the window with each cell storing the sprite to be drawn. I know this is a far from an efficient way of going about it, but it would be convenient for future purposes. So my question is, is there any cleaner way to do this while keeping some kind of map with all pixels?

If I'm guessing a good way to do it is to just have some kind of hashed container with all the cells the mouse has visited within some time frame and draw those on and kill cells that haven't been visited in a while.

Thanks so much!

3
Window / Turning pixels on and off?
« on: June 30, 2011, 09:02:44 pm »
Sorry if the answer to this is on the tutorials, but I was looking around and I couldn't find it. After opening a window, how do I set an individual pixel's color?

Thanks!

Pages: [1]
anything