Forum Index
SUBSIM Forum Search

The Web's #1 BBS for all submarine and naval simulations!
[ SUBSIM Review ] [ SUBSIM STORE ]
Current Forum | Archives 2002-2003 |

Long time no see..

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> Indie Subsims
View previous topic :: View next topic  
Author Message
U-421



Joined: 14 Sep 2002
Posts: 139

PostPosted: Sun Apr 25, 2004 1:56 pm    Post subject: Long time no see.. Reply with quote

Well guys, after a lot of help from Deamon and really, nothing to show, I have quite given up on my project. But, as the school year is coming to an end and summer is around the corner I was looking around on my old favorites and checked out the BlitzBasic site (home of the Blitz3D engine of course) and saw a new version out and a First Person Shooter tutorial! This rejuvinated my jive and now back in the game. Now, I've been looking around these forums at past questions I've had and reaquanting myself with the code and have came up with a couple of questions.

A) A couple weeks ago when I was thinking what I could do to make my maps more lifelike, I thought of modelling the maps (like towns and stuff putting it on a plane (flat surface = low poly plus town and tree's modelled on top of it) and put it into the engine.

Is there a way I can put a model in as a surface without screwing everything up. I've tried and it usually screws up my weapon angles and stuff, such as when I move around the weapon always points directly in the center of the map but I can look 360 degrees like normal. Here's what I did to get this weird thing.

From:
;level
level=LoadAnimMesh("final.b3d")

As seen in the tut, a b3d file as the map

To:
;level
level=LoadAnimMesh("town.3ds")

Besides just changing the model it loads, I have to delete several things which I get debug errors with because of weird sky textures or something. Here's everything I have to delete.


;remove collision on sky (a hack cos I didn't want to go back and change the level - not necessary)
sky=FindChild(GetChild(level,1),"Plane02")
EntityType sky,0

The comment is his, is there a way I can put a sky in or change this, I'm not for sure where to look to change the collision. That is what I'm guessing screws up the weapon, because after that it doesn't work the same.

You can download his tut and all of his files and everything at http://www.redflame.net/files/fpstest.zip Take a look at it please, and if you can help me that'd be great! If you need my town map/model just let me know and I can upload it to my website for you to download and play with.

Thanks,
Chad
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Deamon



Joined: 30 Apr 2002
Posts: 2302
Location: Germany

PostPosted: Sun Apr 25, 2004 3:22 pm    Post subject: Re: Long time no see.. Reply with quote

Hey how you doing man ? Smile

U-421 wrote:
Well guys, after a lot of help from Deamon and really, nothing to show, I have quite given up on my project


Why did you give up ?

So what exactly did you done ? tryied to use the code of the tut to load your level and Weapon ? or did you copy and paseted parts of the tut code in to yours ?

Deamon
Back to top
View user's profile Send private message Visit poster's website
U-421



Joined: 14 Sep 2002
Posts: 139

PostPosted: Sun Apr 25, 2004 4:02 pm    Post subject: Reply with quote

I didn't give up Deamon, I took a long break, I worded it wrong. But what did I do.. I opened up the .bb included in the tutorial and looked over it, scrolled down and found the gun info..

;gun
gun=LoadAnimMesh("gun.b3d")
firetex=LoadTexture("fury.png")
For i=1 To CountChildren(gun)
If EntityName(GetChild(gun,i))="red" EntityTexture GetChild(gun,i),firetex
Next
gunsight=CreatePivot()
EntityParent gunsight,camera
MoveEntity gunsight,-2,2,500
guntarget=CreatePivot()


That's what's in the tutorial.

I replaced it with this..
;gun
gun=LoadAnimMesh("bar.3ds") ;Bar Gun WW2 Weapon
firetex=LoadTexture("bar1.bmp") ;Texture for gun
For i=1 To CountChildren(gun)
If EntityName(GetChild(gun,i))="red" EntityTexture GetChild(gun,i),firetex
Next
gunsight=CreatePivot()
EntityParent gunsight,camera
MoveEntity gunsight,-2,2,500
guntarget=CreatePivot()

So as you can see I didn't change much except the texture and the model. And it works fine and everything before I change the map. So I scroll down more and see this:

;level
level=LoadAnimMesh("final.b3d")

That's in the tutorial, all I changed is this:

;level
level=LoadAnimMesh("town.3ds)

Now, below that, what's giving me an error when I want to Run it to try it out are these couple of lines of code, the comment is his.

;level collisions
EntityType level,col_level,1

;remove collision on sky (a hack cos I didn't want to go back and change the level - not necessary)
sky=FindChild(GetChild(level,1),"Plane02")
EntityType sky,0

So I delete them (not smart thing to do I know) and it loads the map and the gun perfect, except the gun always points in the middle of the map. Even when I go a totally different direction it still swings itself towards the middle.

Now, what I am guessing, is that since the tut takes place inside it doesn't support outside stuff, and of course my maps outside so that's what's giving me problems.

I've tried not replacing the weapon and texture but even with the regular weapon it still does it. Also, the sky is black, no light or anything.

Any idea's?
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Deamon



Joined: 30 Apr 2002
Posts: 2302
Location: Germany

PostPosted: Sun Apr 25, 2004 6:12 pm    Post subject: Reply with quote

U-421 wrote:
So I delete them (not smart thing to do I know) and it loads the map and the gun perfect, except the gun always points in the middle of the map. Even when I go a totally different direction it still swings itself towards the middle.


So you mean when you turn away it still points to the middle(axis) of th level ?

Did you tryed to move inside your level ? or make an inside level ?

Quote:

Now, what I am guessing, is that since the tut takes place inside it doesn't support outside stuff, and of course my maps outside so that's what's giving me problems.


Yes on the first look it might be the reason

Quote:

I've tried not replacing the weapon and texture but even with the regular weapon it still does it. Also, the sky is black, no light or anything.

Any idea's?


Looks like the weapon is kinda related to the level.If it always points at the middle of the level than i would think that the level is set as the target for the weapon.Or the pivot of the wepon is not related you the player view so that the pivoting moves aren't applied to the weapon but to the camera only.Take a look at the pivot functions.But i would say you use the wrong functions for exteriour scenes anyway you should work with the terran functions instead with the mesh function.

I cannot recommend to mess around with code of others if you don't understand it.This can be very frustrating,you will always run in that kinde of trouble.I would suggest to continue with way smaller steps,instead with an ego shooter right away.I would suggest you first to look what kinde of functions you would need and than play only with them.Start with just loading the terrain,then make the camera moveable and than attach a weapon to the camera and so one,add new ellements only incrementally so to say.In this way you can have quite some funn instead of frustrations.I would need your code and project data anyway to look in it.

Deamon
Back to top
View user's profile Send private message Visit poster's website
U-421



Joined: 14 Sep 2002
Posts: 139

PostPosted: Tue Apr 27, 2004 6:53 pm    Post subject: Reply with quote

Hey Deamon, I know this might sound like a lot of work, but do you think you could mess around with his tutorial and get it so it works as if outside. Either modifying one or a couple of the entities so it can work. If you want to try to put in the map I have (map in this case means a model with buildings and a couple of other features) and get it to work like being outside with all the code he has that'd be awesome, here's the file http://www.flashfire-games.com/town.3ds. You don't have to do it but it'd be greatly appreciated Smile
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Deamon



Joined: 30 Apr 2002
Posts: 2302
Location: Germany

PostPosted: Tue Apr 27, 2004 8:29 pm    Post subject: Reply with quote

Well i wouldn't minde but i cannot compile the tut couse it gives me an error in a curtain line by saying to mutch parameter in a curtain line of code.I have only the 1.66 Demo and looks like the tut requires some capeabilities this demo doesn't have.And can you also send me your exe for your shooter so that i can see the error with my own eyes ?

And did you tried what a t had suggested you ?

I would realy urge you to start from scratsh and not to messing around with the code of others.You will always run in to that kinde of trouble in this way.

Deamon
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> Indie Subsims All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group