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.

Dark GDK / FPS Camera and Weapons

Author
Message
ReiKumar
16
Years of Service
User Offline
Joined: 23rd Sep 2008
Location:
Posted: 1st Oct 2008 23:10
How do I create/setup an FPS game, where the player has a gun next to him where ever he walks and turns.

Code Snippet would be nice.

BTW, if you post, please check back in case I have questions.
SushiBox
16
Years of Service
User Offline
Joined: 20th Sep 2008
Location: Ohio
Posted: 1st Oct 2008 23:46
First you are going to need a gun, this is typically a .x file and then has the included texture files included.

Use
and load up your gun. Lets say its "weapon.x". Then you are going to want to position this object to about where you want it on the screen. So we are going to use


Last but not least use the following to get this object locked to your screen.


I strongly suggest you use the search. This is your second thread open with commonly asked questions. I certainly don't mind answering, but it would really be easier for you!

Hope this helps!

www.Helios-Online.net
ReiKumar
16
Years of Service
User Offline
Joined: 23rd Sep 2008
Location:
Posted: 2nd Oct 2008 02:36
It didnt work!! It made my gun disappear!!
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 2nd Oct 2008 04:16 Edited at: 2nd Oct 2008 04:17
Ok, judging by your numerous posts all including "Code snippet would be nice." I think you need to get some practice before diving into an FPS, and once you do don't ask us for 'teh codez'. It's very annoying when people make know attempt to solve the problem then ask us to give them working code to fix their problem. Start with something simple.

ReiKumar
16
Years of Service
User Offline
Joined: 23rd Sep 2008
Location:
Posted: 2nd Oct 2008 04:43
Mr. AndrewT, you need to relax.

I'm not asking you to code my program for me.

I believe that there is no point in reinventing the wheel, but I don't expect you to code it for me. If you have something that you've already coded, or pseudo-coded somethings, it would be nice if you gave me a snippet and I would do the same for you.

Since you don't believe in sharing your intelligence, provided that you can call it that, you don't have to post a snippet, in fact don't post anything.

Thank You
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 2nd Oct 2008 04:49
Quote: "Mr. AndrewT, you need to relax."


I actually am quite relaxed, but thanks for your concern.
Quote: "
I believe that there is no point in reinventing the wheel, but I don't expect you to code it for me. If you have something that you've already coded, or pseudo-coded somethings, it would be nice if you gave me a snippet and I would do the same for you."


Actually, there IS a point in reinventing the wheel. It's called 'learning'. Take a look at my OOP wrapper. I could very easily use jason's which out-does mine in every aspect. However, I made my own, thus 'reinventing the wheel' and learning from it.

Quote: "Since you don't believe in sharing your intelligence, provided that you can call it that, you don't have to post a snippet, in fact don't post anything."


Actually I already have posted a snippet in one of your other threads, check it out. I'm not saying that you're telling us to code your game. But the way you're presenting your question makes it seem that way. Try posting what you have so far, then we can expand upon it and help you.

ReiKumar
16
Years of Service
User Offline
Joined: 23rd Sep 2008
Location:
Posted: 2nd Oct 2008 06:19
Quote: "I actually am quite relaxed, but thanks for your concern. "

That's good to know.

Quote: "Actually, there IS a point in reinventing the wheel. It's called 'learning'. Take a look at my OOP wrapper. I could very easily use Jason's which out-does mine in every aspect. However, I made my own, thus 'reinventing the wheel' and learning from it."

You chose to do that. Here's a thought: Go recreate iostream. Sure you'll learn something, but you'll waste your time learning something you don't need to.
Quote: ""Any fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction." --Albert Einstein"

Quote: ""The true sign of intelligence is not knowledge but imagination." -- Albert Einstein"

Quote: ""Great spirits have always encountered violent opposition from mediocre minds." -- Albert Einstein, In Humanity "


Quote: "Actually I already have posted a snippet in one of your other threads, check it out. I'm not saying that you're telling us to code your game. But the way you're presenting your question makes it seem that way. Try posting what you have so far, then we can expand upon it and help you."

Well in that case, thanks. I appreciate it. I like to present my questions as generally as possible so that its loosely coupled. You don't need to know how my gun works in order to tell me how to move my camera so that it stays in the screen, but if you really want to see my code, I'd perfer to email it to you because it too large to post in the forums.
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 2nd Oct 2008 07:55
Quote: ""Any fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction." --Albert Einstein"


Is it just me, or does that support AndrewT?

Windows Vista Home Premium Intel Pentium Dual-Core 1.6 Ghz 1GB DDR2 RAM GeForce 8600GT Twin Turbo
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 2nd Oct 2008 12:12
Quote: "Since you don't believe in sharing your intelligence, provided that you can call it that, you don't have to post a snippet, in fact don't post anything."


Seriously what? You infer that he's stupid after he helped you?

He told you what to do, his code should work fine provided your media is rotated correctly and you give it the correct position, saying something stupid like "It didnt work!! It made my gun disappear!!" clearly shows you have no initiative and didn't even try, you probably just pasted his code into your game and didn't change a thing and wondered why it didn't work. It's seriously sooooo basic to position a gun at the camera, isn't it obvious? Let's see... you can get the position of the camera, and you can call dbPositionObject() and you can feed in the camera position, you can then rotate the object by the camera's angle which you can also get, amazing!!! Now if it needs to be offset you can just use freeflight commands after that which are amazingly simple, anyone could figure this out, surely?

Quote: "I believe that there is no point in reinventing the wheel"


In this case you have to, besides the wheel is what? 3 lines??? You expect someone to have a one-size-fits-all code solution to positioning weapons? Well it's not going to happen, in fact why don't you just play FPS games rather than code them, no point in wasting time reinventing the wheel is there?

Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 2nd Oct 2008 12:53
Quote: "It didnt work!! It made my gun disappear!!"


Did you debug it? Step by step?

When you have been trying everything, then show us the code..

Niels Henriksen
www.tales-of-the-realms.com
if Microsoft can sell software with bugs, so can I.
AlexI
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 2nd Oct 2008 13:13
SushiBox
16
Years of Service
User Offline
Joined: 20th Sep 2008
Location: Ohio
Posted: 2nd Oct 2008 21:11
ReiKumar, post your current source code here so we can help you. I'm sure its just a little bug.

I would agree though with everyone, you could have solved this by simply checking the help file.

www.Helios-Online.net
xix psycho xix
16
Years of Service
User Offline
Joined: 15th Sep 2008
Location:
Posted: 2nd Oct 2008 23:11
If no one minds my asking, where can i find your OOP wrapper AndrewT? I'd like to take a look at that...
ReiKumar
16
Years of Service
User Offline
Joined: 23rd Sep 2008
Location:
Posted: 2nd Oct 2008 23:37

ReiKumar
16
Years of Service
User Offline
Joined: 23rd Sep 2008
Location:
Posted: 2nd Oct 2008 23:48
Jesus you people are up tight. You guys really need to relax. Just because you know more than I do doesn't make you any better than anyone else. If some one asks for help, rather than complaining so much, you could just give the help or at least point them in the right direction. If you wanted my source code then you just had to ask! I still stand by my 'no need to reinvent the wheel' theory, but that doesn't mean that I don't want to learn. I don't reinvent the wheel, I make a brand new one and that's how I learn.

As for asking for the code snippets, I really don't see whats wrong with that. I don't expect you to. I just said it would be nice. Heck, for all I care, the function name is a good enough code snippet.

One thing you guys need to do is come down to the beginners level. Don't expect me or anyone new to know what they are doing. If a newb asks for help, it would be nice if you label out every step instead of being vague. But, I don't want you to write my code for me, cause that would just be retarded. Just a little detailed help would be nice. I mean isn't that what these forums are for? For programmers to help other programmers.
ReiKumar
16
Years of Service
User Offline
Joined: 23rd Sep 2008
Location:
Posted: 3rd Oct 2008 00:36
I fixed it. The error was that I was setting the object position in my main loop and that the gun was too small.
Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 3rd Oct 2008 01:34
ReiKumar - Now YOU need to relax. Did you read in the forum first? Did you see that people actually are posting source when they are asking?

You got a lot of clues in the right direction but for you it was just very easy to ask and ask. We have no problem with asking, but when people dont use the "penthouse" then we do have a problem.

I have been like you once and now I'm trying first to find the solution by using search in the forum and Google. If I cant find it, then I ask the forum.

If the forum give a clue then I'm trying that. Its not our "job" to give you sourcecode, but SushiBox did a good job with explaining what to do about your problem.

Then you just answered that your gun dissapeared.... Later you found out what the problem was.... AT THE SAME DAY!!!....

I dont know when you saw SushiBox's answer but you reported that it didnt work less than 3 hours after his posting... how much did you debug that?

BTW: Did you read the help file? That can also give you a lot of clues about where to go...

You are always welcome on the forum, but dont flame us for trying to help you.... then you will feel you very much alone here.

We have a great community and we are all helping what we can. But dont just come in at once and "how to do this.... how to do this"..

I better stop now.....

Niels Henriksen
www.tales-of-the-realms.com
if Microsoft can sell software with bugs, so can I.
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 3rd Oct 2008 01:35
So naive.
ReiKumar
16
Years of Service
User Offline
Joined: 23rd Sep 2008
Location:
Posted: 3rd Oct 2008 01:52 Edited at: 5th Oct 2008 02:52
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 3rd Oct 2008 02:49
^Not the right attitude. Seriously, follow this rule (I do): try to fix it yourself for awhile. It you can't do it (and have searched the forums and Google), then come here and post code that you have and ask for suggestions.

Windows Vista Home Premium Intel Pentium Dual-Core 1.6 Ghz 1GB DDR2 RAM GeForce 8600GT Twin Turbo
kBessa
17
Years of Service
User Offline
Joined: 8th Nov 2006
Location: Manaus, Amazonas, Brazil
Posted: 3rd Oct 2008 03:56 Edited at: 3rd Oct 2008 03:57
ReiKumar,

That's definately not a good behaviour. You better not do that or you will probably be banned from the forums.

What everybody is trying to say is that you should first try do things yourself, because everybody here is wiling to help, but only if you are patient and learn to respect the others.

I could probably start a FAQ section only with your questions, because you've asked a LOT in a couple of days.

Tell us one thing that nobody asked until now: What's your programming experience? Because from all you posts, I see you just took the Terrain tutorial and modified it, asked questions and put every source code people gave you in it. If this is your first time programming games, you should first relax, read a LOT about it and try easier things first.

For example, I'm kind of an experienced programmer, doing it for the last 6 to 7 years, daily! But I know I'm not able to put up a complete game in a couple of weeks. Even with little problems (like yours), I still have to sit and think how will I solve it.

Game programming is far from easy! It's easier with DarkGDK, no doubt. but if you can't wait to learn about it, just buy a copy of FPSC and develop some games with it. If you really want to make it yourself, be prepared because it won't be ready any time soon. Expect something like 6 to 10 months to have a first working demo.

I think that's what I have to say for now. I really hope you learn how to behave, because we're full of good and helpful people, but if you keep it like that, probably no one is going to help you. We've seen people with these attitudes come and go through the years. Try not to be the next, ok?

...

-Thiago

[center][center]
ReiKumar
16
Years of Service
User Offline
Joined: 23rd Sep 2008
Location:
Posted: 3rd Oct 2008 08:04
-_-

You guys think I'm trying to make a game?
Psh... I know I can't make a game myself.

I'm just messing around with code and doing as much as I can in as little time as possible.

How experienced am I? I'm not even experienced enough to be called a beginner. Why do you think I ask so many question?

The reason I took the terrian tutorial is because I didn't see a point in making a whole new terrain just too learn how to set some basic stuff.

As for getting banned, how hard is it to make another account?

I'm not trying to make a game, a working game demo, or anything that can remotely be called a finished product. I'm just absorbing.

BTW, I'm only having "trouble" with DGDK. If you see my Deoxyribose Nucleic Acid based artificial Intelligence, you'll quickly realize that soon enough you'll see me on T.V. and remember me as that bitch on the forums that couldn't do simple things.

Now since I have the problem figured out, this forum is dead.

Thanks for the help.

Peace
kBessa
17
Years of Service
User Offline
Joined: 8th Nov 2006
Location: Manaus, Amazonas, Brazil
Posted: 3rd Oct 2008 08:24
I'm not saying you can't ask anything, that's not a problem, me and the others are wiling to help.

One thing I'd recommend you is to take a look at the codebase. It is full of DarkBasic snippets, but if you take the time to UNDERSTAND them, at least 80% of the codes you asked are there:

http://www.thegamecreators.com/?m=codebase_list


-Thiago

[center][center]
Zombie 20
17
Years of Service
User Offline
Joined: 26th Nov 2006
Location: Etters, PA
Posted: 3rd Oct 2008 14:26
Quote: "BTW, I'm only having "trouble" with DGDK. If you see my Deoxyribose Nucleic Acid based artificial Intelligence, you'll quickly realize that soon enough you'll see me on T.V. and remember me as that bitch on the forums that couldn't do simple things. "


Wow you're an idiot, just please..my god...just shut up.


Quote: "As for getting banned, how hard is it to make another account? "


IP Bans, they're amazing.

Quote: "I'm not trying to make a game, a working game demo, or anything that can remotely be called a finished product. I'm just absorbing.
"


No you're trying to cover up that you couldn't do the absolute basics of a fps. Do me a favor and everyone else a favor, learn, ask questions sure but LEARN!! You are not here to learn with your current attitude.

Quote: "Now since I have the problem figured out, this forum is dead.

"


You're an idiot, please take your attitude and re-adjust it, or just go. This whole thread helped you, gee how do I know that I read it thats why, they even wrote it out in the simplest format. No paper needed to map your code, they did it for you, holy crap!! We're nice people and we'll help you gladly on any questions you have, but insults are by far the dumbest paths you can walk in TGC. You think we have a superiourty complex because we know more than you, insecure isn't the word for you.


Pathetic seriously.


A sick, angry, programmer.


Coffee coffee coffee coffee coffee coffee cappacino, JAVA!
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 4th Oct 2008 01:09
Ooh, burn.


Sssssizzle.
kBessa
17
Years of Service
User Offline
Joined: 8th Nov 2006
Location: Manaus, Amazonas, Brazil
Posted: 4th Oct 2008 02:04
Quote: "BTW, I'm only having "trouble" with DGDK. If you see my Deoxyribose Nucleic Acid based artificial Intelligence, you'll quickly realize that soon enough you'll see me on T.V. and remember me as that bitch on the forums that couldn't do simple things. "


Ok, THAT was funny! If you said that you were using AI to work on some kind of DNA sequencer of something like it, I would say: Great Work.

I'm tryng to imagine how would an AI system be any more "inteligent" because of DNA...
Wait, does your system recreate a humam brain automatically in seconds?
Niiiiiiiiice! Let me take a look at it!

[center][center]
SushiBox
16
Years of Service
User Offline
Joined: 20th Sep 2008
Location: Ohio
Posted: 4th Oct 2008 17:45
I don't ever recall being mean to you in any of the posts I have answered haha.

As for your code, why don't you just pick a resolution and set it? Or create an options screen, so the user can choose their own resolution.

Good luck on your project and nice job figuring out the problem. I think the users here are just trying to push you to experiment on your own. It will be much more rewarding in the end for you, trust me.

Once again, good luck!

www.Helios-Online.net
ReiKumar
16
Years of Service
User Offline
Joined: 23rd Sep 2008
Location:
Posted: 4th Oct 2008 22:47
Quote: "Ok, THAT was funny! If you said that you were using AI to work on some kind of DNA sequencer of something like it, I would say: Great Work.

I'm tryng to imagine how would an AI system be any more "inteligent" because of DNA...
Wait, does your system recreate a humam brain automatically in seconds?
Niiiiiiiiice! Let me take a look at it!
"


It doesnt recreate the human brain, not exactly anyways. It takes DNA sqeunces, GACT, and uses them to morph and combine like real DNA mutating to create realistic responses in a given situation.
ReiKumar
16
Years of Service
User Offline
Joined: 23rd Sep 2008
Location:
Posted: 4th Oct 2008 22:50
Quote: "I don't ever recall being mean to you in any of the posts I have answered haha.

As for your code, why don't you just pick a resolution and set it? Or create an options screen, so the user can choose their own resolution.

Good luck on your project and nice job figuring out the problem. I think the users here are just trying to push you to experiment on your own. It will be much more rewarding in the end for you, trust me.

Once again, good luck!"


I think you are right and I really should experiment on my own and I have no problem doing so. Its just that I have a deadline in a few weeks for my first Game and Simulation Programming Class and I need to make a presentable one level demo, so I'm kinda trying to compress everything in as fast as I can.
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 5th Oct 2008 02:24
1. Yay, you've stopped being a bunghole.
2. Methinks the DNA thing is a lie to try to impress us.
3. LEARN HOW TO SPELL, FOO!
ReiKumar
16
Years of Service
User Offline
Joined: 23rd Sep 2008
Location:
Posted: 5th Oct 2008 02:52
Quote: "1. Yay, you've stopped being a bunghole."



Quote: "2. Methinks the DNA thing is a lie to try to impress us."


Actually its not. I have v1 compeleted, though, I made it so accurate that running at 3000 times per second it will take it about <1000000000000000000000000000000 x the time it took to create the universe> to come out with a correct answer.

Quote: "3. LEARN HOW TO SPELL, FOO! "

Huh?
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 5th Oct 2008 03:57
Deoxyribose Nucletic Acid. Duh. >.>
ReiKumar
16
Years of Service
User Offline
Joined: 23rd Sep 2008
Location:
Posted: 5th Oct 2008 09:49
Quote: "Deoxyribose Nucletic Acid. Duh. >.> "


You mean Deoxyribonucleic acid
http://en.wikipedia.org/wiki/DNA
SushiBox
16
Years of Service
User Offline
Joined: 20th Sep 2008
Location: Ohio
Posted: 5th Oct 2008 18:28
Can mods close this?

www.Helios-Online.net
ReiKumar
16
Years of Service
User Offline
Joined: 23rd Sep 2008
Location:
Posted: 6th Oct 2008 00:28
Quote: "Can mods close this? "


lol

Login to post a reply

Server time is: 2024-09-30 07:24:11
Your offset time is: 2024-09-30 07:24:11