Need help speeding up my game (blitz3d)

Started by
10 comments, last by Dookie 16 years, 4 months ago
So far my game is only 100 aliens and when you blow ALL OF THEM UP it replaces them 150 more (only once though)and a green plane. i need help speeding up my game cuz its lagging badly! i was thinking of putting the code into different programs and having one master program but i dont see that as the problem.... (cuz i only have about 100 lines of code) i was thinking that cuz when i fire a bullet it foats in space forever! how do i correct this? and do you have any tips on making the game go faster?(this is a blitz3d game) [Edited by - zabo on November 21, 2007 6:40:41 PM]
Advertisement
help will result in me ranking you highly! and my many thanks and appreciation!
Concidering yur using 3D graphics and how many items your creating, I don't think you can. sorry. also If your using a scalable window you can speed the game up by making it a fixed size.
-------------------------------------------------my forum LINK: here
Quote:Original post by bobwrit
Concidering yur using 3D graphics and how many items your creating, I don't think you can. sorry. also If your using a scalable window you can speed the game up by making it a fixed size.


i didnt think 200 max was to much items...... i once had a forest of over 1000 trees and it didn't lag...... so what can i do about the bullets floating in space so that they disappear after a certain distance and get erased from memory?
there is only 100 enemies on the screen at once thats not alot
Quote:Original post by bobwrit
Concidering yur using 3D graphics and how many items your creating, I don't think you can. sorry. also If your using a scalable window you can speed the game up by making it a fixed size.


my screen size is 640 by 480 is that good or bad?
Check your graphic() function, if you can resize the window it will hinder speed a lot. If it isn't that, it may be the randomization code or the bullets moving that may be the culprit. As for the bullets going on forever, try placing it so that if the bullets Z value goes beyond a certan value it destroys the bullet.
-------------------------------------------------my forum LINK: here
whats a good screen size? also when im done putting in the bullet destruction code ill come back to ya(im gonna eat too) i think the bullets are definantly the prob cuz in the game you fire fully automatic weapons :) the only randomization code i have is putting the enemies at random positions. oh one more thought remember my problem with my spawning codes? i fixed so instead of using score#=score#+1 or b=b+1
i used this---->
if score#=100 then score#=score#+1

do you think that could cause any lagging?
Quote:Original post by zabo
whats a good screen size? also when im done putting in the bullet destruction code ill come back to ya(im gonna eat too) i think the bullets are definantly the prob cuz in the game you fire fully automatic weapons :) the only randomization code i have is putting the enemies at random positions. oh one more thought remember my problem with my spawning codes? i fixed so instead of using score#=score#+1 or b=b+1
i used this---->
if score#=100 then score#=score#+1

do you think that could cause any lagging?


No, the change shouldn't cause any lag, I think it'll be the bullets.
For size I typicaly use 800x600. so for the weapon either switch the keydown()/mousedown() function to keyhit()/mousehit() and it wont be automatic.
-------------------------------------------------my forum LINK: here
i want it to be automatic..... hmmmm..... maybe its the way the bullets are made every time the mouse is down it creates a 3d bullet maybe i should switch to 2d? the game only starts to lag when the enemies are all dead and replaced with 100 more ......... shit this is bugging me also do you know a good code for destroying the bullets i tried entity distance and the bullets wont even show up...

This topic is closed to new replies.

Advertisement