Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / The basic strip of code for a fps?

Author
Message
Deadly Shadow
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Oklahoma , USA
Posted: 6th Mar 2005 16:04
I was wondering could sombody give me the basic strip of code that you use when making a first person shooter. Im learning how to code but im stumped in alot of area\'s. Heck I learned how to 3dmodel (mostly) in like a couple of days. So someone please help the old newb.

Sega and Microsoft nothing but the best.
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 6th Mar 2005 16:41
Here is some old FPS code I posted a while back with With NGC.
Hope it helps.

http://forum.thegamecreators.com/?m=forum_view&t=30090&b=1&p=1

Deadly Shadow
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Oklahoma , USA
Posted: 6th Mar 2005 17:11
Thanks man. Ill check it out.

Sega and Microsoft nothing but the best.
Deadly Shadow
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Oklahoma , USA
Posted: 6th Mar 2005 17:17
Holy crap! Thats alota code. I need to learn this slower lol.

Sega and Microsoft nothing but the best.
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 6th Mar 2005 18:54 Edited at: 6th Mar 2005 18:56
OK exactly what do you want to be able to do? I can break that code down for you. What kind of collision do you want?

Deadly Shadow
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Oklahoma , USA
Posted: 7th Mar 2005 01:53
Im pretty new to this. Collision as like boundaries kina? So things dont go through each other?

Sega and Microsoft nothing but the best.
Deadly Shadow
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Oklahoma , USA
Posted: 7th Mar 2005 01:56
Ok you know that tutorial on dbpro that uh alien shooting game tutorial? If you do it would be better if it was a little more complex. As in a little extra code like hmmm... muzzle flash.

How do people do muzzle flash??? I really need to learn that.

Sega and Microsoft nothing but the best.
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 7th Mar 2005 04:11
Most people just put a ghosted plain a little in front of the gun barrel and ghost it. Then you can show and animate it for a flash and re-hide it again.

Deadly Shadow
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Oklahoma , USA
Posted: 7th Mar 2005 11:29
How do you do the ghosted plain? Do you need to animate it for that?

Sega and Microsoft nothing but the best.
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 7th Mar 2005 14:33
`to load use this for each flash needed
load image "mmuzzleflash.bmp", flashimgnum
make object plain flashobjnum, 1, 1
set object transparency flashobjnum,1
ghost object on flashobjnum
disable object zwrite flashobjnum
set object ambient flashobjnum,0
texture object flashobjnum, flashimgnum
position object flashobjnum, x_pos#, y_pos#, z_pos#
lock object on flashobjnum
Hide object flashobjnum
fade object flashobjnum, 50

`when firing show the fire object for a certain amopunt of time.
`you can scale it to make it appear animated as well
show object flashobjnum

Deadly Shadow
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Oklahoma , USA
Posted: 7th Mar 2005 15:13
Thanks you I will check this out!

Sega and Microsoft nothing but the best.
Deadly Shadow
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Oklahoma , USA
Posted: 7th Mar 2005 15:38
Where in the code do you put this? Thanks again.

Sega and Microsoft nothing but the best.
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 7th Mar 2005 17:11
Do you have a link to the tutorial you are using?

Deadly Shadow
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Oklahoma , USA
Posted: 8th Mar 2005 04:13
Its built into darkbasicpro but I can post the code.

Also it says image cannot load but i made the image and added it to the media!

Sega and Microsoft nothing but the best.
Deadly Shadow
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Oklahoma , USA
Posted: 10th Mar 2005 20:45
Also got the image thing fixed, but on ever line illegal nember .!!!!!! Please help me. Thanks for all you help.

Sega and Microsoft nothing but the best.
geecee3
20
Years of Service
User Offline
Joined: 25th Feb 2004
Location: edinburgh.scotland.
Posted: 10th Mar 2005 21:46
@ deadly shadow:

listen mate, programming is hard, really hard. i should know i have been programming for ages and still get stuck on some problems (especially the math). Deciding to start with a FPS game is way above your skills, and even if you get it working how you want, the chances are you don't REALLY know what's going on in your code. asking about ghosting plains and how to make a muzzle flash shows just how new to programming you really are. this is really basic stuff.

Please don't make the same mistake a lot of newbs make, by attempting such a large program for your first project. think small!!! think about writing something that's NOT a game. start with some nice and simple graphics demos. that way you can learn all the commands and some of the bugs you will encounter when you do decide to make a REAL GAME. keep experimenting with small bits of code until you know exactly what is going on with each of the commands. remember there are loads commands and many of them are fairly complex.

Don't for an instant think that just beacause it's darkbasic pro, it's easy. it's not. it takes time and practice. after all it's just a programming language the same as any other (with the exeption of all tose lovely 3d commands at your disposal.)

I'm not putting you down in any way my friend, i'm just telling you how it is. take your time and learn how to code in a logical manner. programming games is one of the hardest things in programmig in general.

Stick with it though and don't dive in to the deep end just yet.

kindest regards, geecee3.
Deadly Shadow
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Oklahoma , USA
Posted: 10th Mar 2005 22:34
Ok....Im just using dbpro's tutorial but if you say so I will listen. But Lost in Thought this dosen't mean you can't help me anymore on it though!

And I though RPG'S were the most complex and hardest to program!

And im not attempting to make a large program! Im just souping up the tutorial and learning it's basic commands and etc.

But this dosen't stop me from building a team soon (I can 3dmodel pretty well) and thats why that dosen't stop that.

But thanks for all your regards and well Thank you

Sega and Microsoft nothing but the best.
geecee3
20
Years of Service
User Offline
Joined: 25th Feb 2004
Location: edinburgh.scotland.
Posted: 11th Mar 2005 00:30
it's only a bit of advice mate,

programming really is quite a mind job. but we all start somewhere and have to progress, I wish you every success in your programming quest. If 3d modelling is your stongest asset, then concentrate on the graphic demos, learning how to make media in such a way as to AID your programming skills is the best way forward. I class myself as a pretty good all rounder when it comes to computers and programming, and i made all the usual mistakes learning how to program games. I'm just trying to help a fellow coder avoid the pitfalls that most new programmers fall into.

did you know that most games deal heavily with database type data, even simple shooters. you have to keeep track of a massive amount of data as your program expands and becomes ever more complex. before you know it, your code is hovering about the 1000 line mark.

I wrote a simple asteroids game last year (very heavy on the graphics) and it was over 3000 lines in length. your average retail FPS game contains around 100,000 lines of code mabey a lot more. Doom 3 required 500,000 lines of script code and 25,000 texture images to make.(now thats a lot).

We all have visions of running our own team, I'm no different. But the simple fact of the matter is. most teams never get anything finished. Go for it on your own, make a simple game, post it and see what kind of response you get. it's always more interesting to see what one person can acheive on their own. Use the forum to get help on problem areas but remember it's your project. and the more you do by yourself the more you will learn. and that's what it's all about. learning.

stick in mate, and you'll do well.

kindest regards geecee3.
Deadly Shadow
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Oklahoma , USA
Posted: 11th Mar 2005 09:27
Thank you.

Sega and Microsoft nothing but the best.

Login to post a reply

Server time is: 2024-11-13 20:04:46
Your offset time is: 2024-11-13 20:04:46