My current project has been crashing from what seems to be two cameras looking at the same two objects at the same time. I posted another thread like this months ago (now locked) and was given the suggestion that I had not saved both a source file and a project file. After taking that advice and copying my code into a newly created project folder, the problem went away for a while I really do not know if I properly saved the project files as advised in the previous thread or if it is a different issue.
Here is how I observe it happening:
If only my two player objects and part of the terrain object are in view of both cameras, the game crashes.
If both player objects and a weapon "entity" object are in view of both cameras
, the game does not crash until
only the two player objects are in view of both cameras.
The code for my main game loop:
do
elapsedTime = timer() - time
time = timer()
for I=1 to numofplayers
playerimput(I)
next I
if numofWE>0
for E=1 to numofWE
CALL FUNCTION NAME ENT(E).ENtype,E [b]<<< Function call that handles nonplayer "entity" object behavior[/b]
next E
endif
if numofEVT>0
for V=1 to numofEVT
CALL FUNCTION NAME EVT(V).EVTtype,V [b]<<< Function call that handles game world event behavior[/b]
NEXT V
endif
for p=1 to numofchars
EnAn_oacUpdate char(p).OACID, elapsedTime
characterC(p) [b]<<< Function call that handles player object behavior[/b]
next p
text 20,20, "FPS: "+str$(SCREEN FPS())
sync
FPSmod#=60/(SCREEN FPS()+1)
loop
My project has lots of code in it so, some help in where to look for the problem would be most appreciated.