Strange problems with full vs demo, need help

Blitz3D Forums/Blitz3D Programming/Strange problems with full vs demo, need help

LedgerARC(Posted 2008) [#1]
I have this program, I made it when I was 12(i'm 13), it's really small and pretty pointless, and I made it when I only had the demo of blitz3D. It worked fine and I was pretty proud of it, but when I bought the full version of Blitz3D, it didn't work. The bullets kept flying in different directions no matter what. I wanted to make it into an EXE file, but only the full version of Blitz will do that, so i'm stuck with a program that only works in the blitz demo, pretty pointless. I have no idea how to fix the problem, and really want to show people the game.

Any ideas would be great, I am really starting to like all the comunity of Blitz and how helpfull you all are:).


GfK(Posted 2008) [#2]
Hard to say without seeing any code. But, have you installed Blitz3D update V1.99? Or are you still running the first version you downloaded (1.64?) ?


Ross C(Posted 2008) [#3]
I'm sure the demo version was a few versions ahead of the version you get when you purchase blitz, so, try updating as suggested.


LedgerARC(Posted 2008) [#4]
Thanks for the help! I didn't even know that there was an update, but even still, it wont work. Here is some code that might help:

;this is where the bullets are made
fullcart=100
Dim bullet(fullcart)
For i=0 To fullcart
bullet(i)=CreateSphere()
ScaleEntity bullet(i),0.10,0.10,0.10
EntityColor bullet(i),255,0,0
HideEntity bullet(i)
EntityType bullet(i),type_bullets1
EntityRadius bullet(i),0.2
Next

;This is where you fire the bullets(it's in the main game loop)
If KeyHit(29) And t<100 Then
PositionEntity bullet(t) ,EntityX(gun1,1),EntityY(gun1,1),EntityZ(gun1,1)
ShowEntity bullet(t)
RotateEntity bullet(t) ,EntityPitch#(gun1,1),EntityYaw#(gun1,1),EntityRoll#(gun1,1)
t=t+1
EndIf

;this is where I think the problem is. Even though it tells it to move
;forward, it will still move in random directions
For e=0 To fullcart
MoveEntity bullet(e),0,1,0
Next


;this is where you reload.
If KeyDown(19)=True Then
For g=0 To fullcart
HideEntity bullet(g)
PositionEntity bullet(g) ,EntityX(gun1,1),EntityY(gun1,1),EntityZ(gun1,1)
Next
t=0
EndIf

Also I have another game that worked fine untill I started to add code for a TCP stream, it was practically the code in the archives. when I added that, jumping all of a sudden wouldn't work, and I couldn't move along the -X axis, and sometimes all collisions would stop working. Then i took out all of the TCP stream code that I added, and it still wouldn't work. I have a feeling that the two problems are linked for some reason. So help on the first problem would be the best.

Thanks for all your help so far (feels nice to have an updated version of blitz:P)


Charrua(Posted 2008) [#5]
try not assign collision type to the bullets at the time they are created. simply create them. Then, when you position the bullet and give them an orientation, give them a collision type.
I'm not sure if it's what you need, but, when you create the spheres, they are in 0,0,0 if they have a collision type, when you try to move they collide with scenary, etc.
Not shure if i'm clear, hope so.

Juan


LedgerARC(Posted 2008) [#6]
I get what your saying, but the bullets are hidden, so all collisions are off until they are shown again. Plus, the bullets are hidden again once the hit anything, and there's a giant sphere for a sky, so that wouldn't be the problem, but thanks for the help, It made me think about some things for my other games.

bye for now


Charrua(Posted 2008) [#7]
MoveEntity bullet(e),0,1,0

if you want to move forward, you have to increment the z axis

MoveEntity bullet(e),0,0,1

shoud be that????

juan


LedgerARC(Posted 2008) [#8]
I see what your saying to, but when I made this game I didn't know about the rotatemesh command, so I simply used rotateentity on the player, so now he's rotated in such a way that Z=down and Y=foward and X=backward, it's a little messed up, and i'm trying to sort it all out, but even when I use the Z-axis, it wall still fly in random directions. This is really an odd case to deal with, and all I wanted was for my simple game to work :P.

thanks for all the help so far.


Charrua(Posted 2008) [#9]
insert some debuglog lines at the moment you stablish the position and orientation of the bullet's. Some time's the thign's we think aren't that are rellay happen.

If KeyHit(29) And t<100 Then
PositionEntity bullet(t) ,EntityX(gun1,1),EntityY(gun1,1),EntityZ(gun1,1),True
DebugLog "Bullet number numero: "+t
DebugLog "Posición: "+EntityX(gun1,1)+", "+EntityY(gun1,1)+", "+EntityZ(gun1,1)
RotateEntity bullet(t) ,EntityPitch#(gun1,1),EntityYaw#(gun1,1),EntityRoll#(gun1,1),True

DebugLog "Orientation: "+EntityPitch#(gun1,1)+", "+EntityYaw#(gun1,1)+", "+EntityRoll#(gun1,1)
ShowEntity bullet(t)
t=t+1
EndIf

and with the "P" for print, do a list of the position off all:

If KeyHit(25) Then ;"P"
For i=0 To fullcart
DebugLog i+": ("+EntityX(bullet(i),1)+", "+EntityY(bullet(i),1)+", "+EntityZ(bullet(i),1)+")"
Next
End If


enable debug, run the programm, shoot some bullets, press P, as you want, switch to debug window : click on it or Alt-tab (if yor app is full screen), pres de red button to stop, select the debug tab, and so the exact location of the bullet, the moment they are shooted, and in the listings saw how they are moving. Is it randomly still?, are the orientations the ones you think?

work a bit more!

best regards

Juan


LedgerARC(Posted 2008) [#10]
Wow, I found out what I was doing, there was this transparent sphere I used as an aimer, it was infront of the player. The bullets were positioned at the aimer, but were rotated to the player. So when I shot the bullets, The direction was based on the rotation of the player & the position of the aimer. It's hard to explain, but It works fine now. What I don't get is how it still worked on the demo bun not on the full version.

Thanks for all the help!

Andrew


mtnhome3d(Posted 2008) [#11]
the demo is a higher version than the one you get when you first download the full version. this is so that if there's a problem with the newest version you can revert to an older version that dosen't have the bug in it, till the new one gets fixed.