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.

DarkBASIC Professional Discussion / First Person Shooter

Author
Message
3than
14
Years of Service
User Offline
Joined: 22nd Sep 2011
Location:
Posted: 12th Oct 2011 13:22 Edited at: 12th Oct 2011 16:21
Hi, I've just bought the DarkGAME Studio for $50. My intention after buying it was to be able to make my own first person shooter. I've searched on the internet for tutorials, but nothing came up. It would be great if someone could give me a tutorial on making one...
I've already made a REALLY simple first person shooter, and here it is:



Here's what I want answered
. How I can make a sprite be clicked on
. How I can cut off bits of an image(in this case, I want to cut off the white section of an image of a gun so you can only see the gun, and not the white background)
. Where I can download .X models of maps (or levels) to set my first person shooter in
. How to set collision for every single part of the model(Making limbs around the object is too much work)
. How I can make multiple DO and LOOP statements(for example, one loop would be for the main menu, and another could be for the actual gameplay)
. How I could enhance my game with Dark Physics(You don't have to answer that if you don't have dark physics)
. How I could enhance my game with Dark AI(don't answer if you don't have it)

I really want to make a First Person Shooter, and that's the main reason I got Dark Basic Pro. I know, I know, you're probably thinking "Well, then why didn't you get FPS Creator?" I don't like clicking together my games, I prefer coding them.

Any help would be greatly appreciated

*EDIT
I want a place to be able to download .X maps because I don't have any programs to make a map myself.
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 12th Oct 2011 16:52 Edited at: 12th Oct 2011 16:55
Quote: ". How I can make a sprite be clicked on"

Sprite or object? : Sprites you check a zone area, ie if your coords are within x,y,w,h. Objects can be checked using PICK OBJECT.

Quote: ". How I can cut off bits of an image(in this case, I want to cut off the white section of an image of a gun so you can only see the gun, and not the white background)"

You can do this using the IMAGE COLORKEY which will set an unused colour transparent.

Quote: ". Where I can download .X models of maps (or levels) to set my first person shooter in"

DeleD, Mapscape and other level editor that export .x or .dbo will do the job just fine. I've used DeleD in the past with the .dbo exporter and found it to be very easy to use. And it does light-mapping. I don't know about Mapscape but it also does light-mapping.

Quote: ". How to set collision for every single part of the model(Making limbs around the object is too much work)"

You will be much better off using Sparkys collision plugin. For multiple limbs just sphere cast from the limbs position.
Sparkys is also extremly useful for level collision too. You can set your level up as a complex object.

Quote: ". How I can make multiple DO and LOOP statements(for example, one loop would be for the main menu, and another could be for the actual gameplay)"

Split your code into seperate files and use more funtions to do different sections of your game. You can then work on one file ie. for your menu. Another file ie. for controlling your player. etc.

Quote: ". How I could enhance my game with Dark Physics(You don't have to answer that if you don't have dark physics)
. How I could enhance my game with Dark AI(don't answer if you don't have it)"

Sorry, don't know...

EDIT: Couldn't test your code as it doesn't have the media with it. But from the looks of it you've got a fair idea on coding.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
3than
14
Years of Service
User Offline
Joined: 22nd Sep 2011
Location:
Posted: 12th Oct 2011 18:16
Thanks.
But I really don't want to download any DLL's for Dark Basic Pro for collision... My friend download a couple, and they worked out fine, but the last one he tried to use stuffed up Dark Basic Pro. He couldn't even re-install it. I'm not going to be taking any risks here...

With the multiple files idea, I think it's great, but how am I going to switch between one file and another in one program?

And I meant SPRITE, not object. Clicking on an object would be useful, too, so thanks. But can you (or anyone else viewing this post) tell me how to click on an image or a sprite?

And I think I'll try out DeleD, or another modelling program. I hope they turn out well.
Thanks for replying, WLGfx!
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 12th Oct 2011 18:32
Yes, breaking down your project in the IDE so that you have multiple files makes coding so much easier. The first file your project starts with is the main one and your program starts there, the rest are as if they are included. Its a simple as "Add New File" to your project.

Sprites have their own collision system built into the function list. But sometimes you might need to add your own. Two ways of doing this is checking whether a point (x,y) is within a rectangle, or to check whether 2 rectangles are over-lapping.

99% of the plugins are very safe to use, I have quite a few of them and have had no problems what-so-ever with any of them. I've also written a plugin and working on a few others. The way the plugins work is that if you use any of the functions from within a plugin then just a small section gets added along with your executable, most of the time, just a few extra kilobytes. So there's no need to worry about copying dll's around with your exe file.

Without the use of plugins DBPro can become restricted, plugins open up other worlds of coding your games. Especially Matrix1, Sparky's collision, etc...

For example, Sparky's and DeleD: Build a level in DeleD, load it into your code, setup complex collision on it. In your code you can have your FPS type character sliding along walls etc which cannot be done in DBPro normally.

I usually get plugins that have been tried and tested and are not in the WIP stage.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
3than
14
Years of Service
User Offline
Joined: 22nd Sep 2011
Location:
Posted: 12th Oct 2011 18:45
Ok. I'll download Sparky's Collision and DeleD and see how they go. I hope they're good. And I hope they don't stuff up DBPro
Nahh, joking. I'm sure they won't. If so much people have used them, it probably wouldn't. Does Sparky's Collision provide help files or tutorials? 'Cos I don't really want to download it and not use it at all.
Thanks a lot for posting, those plug-in's sound like they're really going to help with making my games!
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 12th Oct 2011 18:49 Edited at: 12th Oct 2011 18:50
Yes, Sparkys comes with help files and some basic examples and you can also do a forum search because there's lots of examples in the forums too. It is a very popular plugin because of the speed of it.

Good luck with your coding! There's always someone on hand when you have a question.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
3than
14
Years of Service
User Offline
Joined: 22nd Sep 2011
Location:
Posted: 12th Oct 2011 20:16
Thanks
I'm hoping to make something really good with that plugin. It sounds awesome! I'm on my phone right now, so I can't download it yet. It's too late to go on my computer now :/ I'm excited to test it out Thanks for telling me about this!!


Omg it's 3:00am and I can't sleep o.O

Login to post a reply

Server time is: 2026-07-11 09:49:28
Your offset time is: 2026-07-11 09:49:28