views:

146

answers:

1

Hey everyone, Just wondering - throwing ideas in my head - about starting a new XNA project for the 360. I would like it to be retro-old school, and emulating scanlines and color palettes and such.

As part of this idea, what I would ideally like to do is manually draw each and every pixel of the screen. So, worst-case scenario I would have to draw about 60K sprites on a 252x240 resolution (I think thats correct). 60K sprites on the screen at a time.

So, before I even attempt to code this - would the XBOX 360 be able to keep up with this even? That is a lot of sprites, but they aren't big sprites, and the texture data needed would be non-existant. However, I guess how this project would be implemented would make it or break it, but all I was thinking was coming up with a 2D array and mapping which color value would need to be drawn at that point.

Of course, this is watered down talk right now. But what you all suggest?

EDIT: Each sprite would represent one pixel. E.g., a sprite at 0,0. Another at 0,1. etc.

+3  A: 

Instead of using 60K sprites, which is unlikely going to work, I suggest you draw primitive squares and give them the colors you need.

It's actually a part of 3D programming, but you drop the Z axis altogether and specify an orthogonal camera.

As a matter of fact, a square is a simple combination of two triangles. I'm not saying the solution is quick and easy, but I think this is where you should start your research.

60K sprites is not a good idea.

SiN
This probably would be the best answer, as most consoles are capable of handing 120,000 triangles a frame :DI'm just too lazy to implement this myself, so I'm doing another approach lol. But this probably would be the best method to do; I'm just not that good with 3D maths, but this might be useful to someone who is.
Jeffrey Kern
Well you don't have to be a Math freak. XNA handles all complex calculations for you. Anyway good luck!
SiN
It's worth pointing out that sprites, as implemented by XNA SpriteBatch *are* primitive squares - and the SpriteBatch shader is heavily optimised for drawing them quickly. Admittedly it does extra work like texturing - which could be removed here. If you wanted to use this method a good starting point would be modifying the SpriteBatch shader itself from http://creators.xna.com/en-US/utilities/spritebatchshader - Although this entire method is terrible - stick with pixel shaders, and if you must push that much data to the GPU, a texture would use less bandwidth than crazy per-pixel geometry!
Andrew Russell