Path: chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: Scott Cartier Newsgroups: scea.yaroze.programming.2d_graphics Subject: Too many GsSortSprites? Date: Sat, 02 Aug 1997 16:42:23 -0700 Organization: SCEA Net Yaroze News Lines: 39 Message-ID: <33E3C5DF.2C76@concentric.net> Reply-To: dsyaroze@concentric.net NNTP-Posting-Host: ts026d02.cup-ca.concentric.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0C-GZone (Win95; I) Hi all, I'm having a locking up problem that I've been tearing my hair to figure out. I've had this problem for some time and have run out of ideas for debugging. It seems rather simple. I have an array of sprites which represent my game objects. Every frame I loop through this array and use GsSortSprite to put them on the screen. Whenver this loop is greater than about 6 my program locks up. The only thing I could think of is that I'm overloading the GPU with packets. So I tried adding a DrawSync(0) after each GsSortSprite call, but no luck. Here's my basic flow: initialize_sprites(); while(pad_state[PAD_SELECT] == 0) { move_sprites(); for (i = 0; i < num_sprites; i++) GsSortSprite(&sprt_array[i], &WorldOT[activeBuff], 2); cnt = VSync(0); ResetGraph(1); // hi-res mode GsSwapDispBuff(); GsSortClear(0, 0, 0, &WorldOT[activeBuff]); GsDrawOt(&WorldOT[activeBuff]); activeBuff = GsGetActiveBuff(); GsSetWorkBase((PACKET *)GpuPacketArea[activeBuff]); GsClearOt(0, 0, &WorldOT[activeBuff]); compute_new_sprite_pos(); } This is over simplified of course, but you get the idea. Is there anything obvious that I'm doing wrong? Scott