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 / - DBPro Coding Challenges -

Author
Message
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 10th Jan 2006 07:44
what exactly are you trying to do there? It looks like you've got some kind of circular linking problem... Object one has limb two and you want to link then using object 3?!

RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 10th Jan 2006 07:53 Edited at: 10th Jan 2006 07:55
If anyone wants a robot for their shooter, here's one I made a long time ago.



Edit: Though I admit that I like Sven B 's running man better.


Open MMORPG: It's your game!
Image All
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: Home
Posted: 10th Jan 2006 08:01 Edited at: 10th Jan 2006 09:02
I got a lil demo of the HUD and stuff... Not much to do here except move around a bit; no collision detection either =P

If you were a big PC gamer back in the mid 90's you'll remember this...

D=Forward
E=Backward
LShift=Strafe Left
F=Strafe Right

<- And -> =Turn

Edit: added nice smooth ship wiggling =D



No stealing!

@RiiDii: When I try running your code it just ends (U5.9 and i think I have correctly installed the extras)

Drat...Just figured out that the code I posted won't help me with developing the rest of this FPS =P I need to use vectors...
Dangit, 6DOF is hard to prepare for

Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 10th Jan 2006 10:02
@ImageAll: Those are interesting controls... That code Riidii did is just a function, you'd need to embed it in some already working code.

Thebeely
19
Years of Service
User Offline
Joined: 4th May 2005
Location: Croatia
Posted: 10th Jan 2006 11:18
I'm working on my entry, I have made gun, terrain, water, health boxes, sky, shooting and bad looking explosions for now.

Za dom - spremni!
KimoSabi
19
Years of Service
User Offline
Joined: 18th Jan 2005
Location:
Posted: 10th Jan 2006 20:07
@Nicholas

Well, that was actually just the current crap that I had copied. I was trying to make another limb(child) onto the first limb and offset it so it would be off in the distance... you know what I mean?

Thanks,
Nicholas H.

P.S. I've tried e-mailing you but you don't reply, did you get a new e-mail?

My Website:

Image All
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: Home
Posted: 10th Jan 2006 20:32
@Nicholas Thompson: that's because the arrowkeys weren't made for banking and pitching

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 10th Jan 2006 21:43 Edited at: 10th Jan 2006 21:43
I'll join, but as usual I wouldn't hold your breathe waiting for my entry. Perfect time to try out my polygon fps collision.


Deadly Night Assassins
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 10th Jan 2006 22:16
'bout time you won one of these challenges isn't it, Phaelax?!

Segan
19
Years of Service
User Offline
Joined: 28th Aug 2005
Location: Canada
Posted: 11th Jan 2006 03:18
Well, I actually DID get some time, albeit small amount, to do a bit of coding this week. No time has been spend of the bare bone FPS stuff, but I have made a dungeon experience!



No comments, collision, good textures, AI, shooting, used yet, but I have tried to make the code as portable and expandable as possible (for a first draft). If anyone wants to use it, feel free (just give me a mention in your credits)!

Oh, and before anyone comes out accusing that this is mostly copied from the "huge dungeons" tutorial, it's not. While I have ran that tutorial and some ideas are from it, not one peice of code is copied!
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 11th Jan 2006 03:33
Segan
19
Years of Service
User Offline
Joined: 28th Aug 2005
Location: Canada
Posted: 11th Jan 2006 03:55
@Nick: Cool! I don't have much time to look at it in action right now, but I will definately check it out later!
KimoSabi
19
Years of Service
User Offline
Joined: 18th Jan 2005
Location:
Posted: 11th Jan 2006 04:09
Well guys, I realize that almost everyone that enters this challenge knows what there doing, but I don't lol . I know something but I usually scrape up other code look at it, and go off of that. So here is what I have come up with so far, but it doesn't work out as planned sooo... Could someone please tell me how to fix, and explain - why the camera is not placed correctly for the Y position and how to add another limb to the "gun" but offset it so I can hide that object and point object at it (bullets) and move them.

Here it is:


Thanks,
Nicholas H.

My Website:

DarkBasic Pro Guy
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location: Broomfield, Colorado
Posted: 11th Jan 2006 05:34
Image All has the feel I am trying to get, not the rough ground but the little gun and mouse control

Image All
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: Home
Posted: 11th Jan 2006 08:04
...Wha? o.O

Made some updates I know it's futile to persue this version of the code, but now the mouse controls the Y rotation of the ship and now the player is in something... Bad graphics, I know =P



Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 11th Jan 2006 08:27 Edited at: 11th Jan 2006 08:27
Quote: "'bout time you won one of these challenges isn't it, Phaelax?! "

i think you're right! i been with some of the earliest challenges in this thread, and have yet to win. I got a bday in about a week, so it'd be a nice present.


Deadly Night Assassins
Image All
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: Home
Posted: 11th Jan 2006 08:41 Edited at: 11th Jan 2006 08:42
Winning for a Birthday Present? That's cheap!!

Well I got my sliding collisions all figured out o.0 Pretty short function too



BillR
21
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 11th Jan 2006 09:12 Edited at: 11th Jan 2006 16:19
I entered the first few challenges, and had a great time!
Then got insanely busy with a new business.
I really missed programming in DBPro.

Ric, Kimo, RiiDii, Nicholas, everyone else, good to be back.

I just posted in the codebase, 'Scrolling Text with Animation' code, to kind of dust the cobwebs off, it came out kind of cool.

Anyway, I will try to enter this one with a 1st person shooter.
See you all at the finish line!
Image All
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: Home
Posted: 11th Jan 2006 10:06 Edited at: 11th Jan 2006 10:07
I wonder if I should just start editing my posts... O.o



Shooting works, atleast, theoretically. The energy and concussion missles go down, that's about it
But I can't get it to have a set amount of time for reasonably spaced-out shots 0_o;

RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 11th Jan 2006 16:49
Welcome back BillR. You are in time for a pretty nifty compo; an FPS shooter. Will you be giving it a shot?




Open MMORPG: It's your game!
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 11th Jan 2006 17:10
Added a world: water + sky.

I know the enemies aren't pretty challenging, but I had to test if the animation function also worked with different enemies.
It works, so that's a good sign

I have to add AI. And if I have some time left, add some animation when the enemy dies.

The code:


The controls stay:
ctrl: draw weapon or put it away. (Faster running when weapon is not drawed)
arrow keys: move/strafe
mouse: rotate
mouseclick: shoot when you're using your weapon.

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
KimoSabi
19
Years of Service
User Offline
Joined: 18th Jan 2005
Location:
Posted: 11th Jan 2006 17:11
Ahhh...

Look up ^please help me out^ im sure it's a simple solution but I was screwing around with it for a long time.

Thanks,
Nicholas H. (KimoSabi)

My Website:

Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 11th Jan 2006 17:18 Edited at: 11th Jan 2006 17:20
KimoSabi,

I don't really get what's wrong with the camera's Y position...

For adding a limb and offsetting it:
turn it into a mesh(make mesh from object mesh, objnr), add limb obj, limb, and offset it (offset limb obj, limb, x, y, z) or angle it (rotate limb obj,limb,x,y,z)

You can define a parent limb too, which makes all offseting and rotation depending on the parent limb's rotation and offset.
link limb obj,parent,child

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Image All
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: Home
Posted: 11th Jan 2006 19:34
Added "enemies"... They don't move any But atleast it's a start.

I can't figure out why lines 225-226 aren't causing the energy to drop at a controlled rate.. it seems logical to me! =P



Also, as you can see, I've prepared for the AI, but know jack about how to make it do its stuff

Also stumped when it comes to making bullets come out... Must examine Sven's code >u>

Controls stay, but there's two more:

D=Forward
E=Backward

LShift=Strafe Left
F=Strafe Right

Mouse=Turn
LClick=Lasers
RClick=Missles

W=Strafe Up
C=Strafe Down

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 11th Jan 2006 19:51
@Segan

Nice! That totally reminds me of Doom!

@KimoSabi

I like it, but I could swear that was Hamish McHaggis' code

@Sven

haha! love it, nice relfections too..

@Image all

I love that little crosshair you got there.

KimoSabi
19
Years of Service
User Offline
Joined: 18th Jan 2005
Location:
Posted: 11th Jan 2006 20:05 Edited at: 11th Jan 2006 20:09
@Zotoaster

It partly is, if you read the above post (and the rules) I tend to take other code and build on it. It gets me started and then lets my imagination run .

Quote: "I love that little crosshair you got there."

Should be:
Quote: "I love that little crosshair you have there."

...Im picky lol.

Now you know,
Nicholas H. (KimoSabi)

[EDIT]
BTW If you are wondering what I meant when I said "and the rules", they say that you are allowed to use other code as long as it is greatly modified - and im working on it .

@Nicholas T.
I was wondering if for each entry, for the website, you wanted a screen shot and/or a short video so people that don't have DBPro can still view what the codes look like, tell me what you think .

My Website:

DarkBasic Pro Guy
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location: Broomfield, Colorado
Posted: 11th Jan 2006 20:56
sorry I ment Kimo has got the feel I am looking for lol!?!

Image All
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: Home
Posted: 11th Jan 2006 21:07
Hmm...The enemies in my entry could look like little rockets if people don't know what they are

They are Class 1 Drones with pulsar laser cannons at the end of their arms

DarkBasic Pro Guy
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location: Broomfield, Colorado
Posted: 11th Jan 2006 21:46
hehe, just testing my new sig

Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 11th Jan 2006 22:19
@Kimo - screenshots for all entries would be great - the problem is there are 148 entries! Site space isn't really an issue, its just the time it'd take someone to sit there, get the code in, get to a point where a screenshot would look nice, print screen, photoshop it down to a normal size (about 640x480 normally), save it as JPEG or PNG or whatever... ITs gonna take the best part of a long afternoon!

These entries are looking damn good - I would do one tonight but I'm totally knackered. Went out ot an office party last night and didn't get home till 2am. Then had to get up at 6am for work again. I actually fell to sleep in the upright position this afternoon!!!

Neofish
20
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 11th Jan 2006 22:27
dude i rule at staying awake after days like that i went to see one of my favourite bands and went to school the next day, got only like 3 hours sleep and still didn't sleeP!

(however i do drink one hell of a lot of coke)

challegne-wise i wont be entering as im currently writting an ogl fps

New site!
KimoSabi
19
Years of Service
User Offline
Joined: 18th Jan 2005
Location:
Posted: 11th Jan 2006 23:05
@Nicholas T.

Well, you could post a link on your website which could go to one of my domains or, just have a simple code for the picture to pop-up in a new window... I have some GREAT Java if that sounds ok?

The entries are looking great, will show you what I have added later tonight.

Adios,
Nicholas H.(KimoSabi)

My Website:

DarkBasic Pro Guy
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location: Broomfield, Colorado
Posted: 11th Jan 2006 23:52
why don't you let everyone make screenshots of their own entries, then have them upload the image to imageshack.us or somewhere, give the link to you, then you just need to put them on. and any entries that screen shots were not taken just have a volunteer take screenshots of them.

Just an idea, if you like it

KimoSabi
19
Years of Service
User Offline
Joined: 18th Jan 2005
Location:
Posted: 12th Jan 2006 00:38 Edited at: 12th Jan 2006 00:43
That would work except for the many many previous entries. It also takes alot of the... "Code, enter, win" kinda thing of the competition. Not all people are going to want to have to take a screenshot and enter it. I would be willing to do the work, I was just asking Nicholas how he would want to present it .

Thanks for the idea,
Nicholas H. (KimoSabi)

[EDIT]
Well, I as usual don't like FPS' so I'll give up on this challenge. Good lukc to you all and have fun . I'll check in regularly to see how you guys are coming.

My Website:

Image All
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: Home
Posted: 12th Jan 2006 04:10 Edited at: 12th Jan 2006 04:14
My entry has a bug!



Array DRONESTAT is not being read as Global. It says "Array does not exist or array subscript out of bounds at line 388"

DarkBasic Pro Guy
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location: Broomfield, Colorado
Posted: 12th Jan 2006 05:38
err ok, can I have your code then? I will add enemies and everything

Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 12th Jan 2006 12:29 Edited at: 12th Jan 2006 12:33
@ Image All:

You have what's known as a 'user type array' in that function. First, you need to define your user type, like this:



here, you we've created a user type called 'mytype', and then, between the type and entype commands, you can create any 'fields' you like - these act like array subscripts. Then, you have to create the array 'dronestat', using the 'dim' command, and link it to your user type. Sticking the command 'global' infront will make it usable from inside functions too:




where 1000 should be changed for the number of slots you want in your array.

You can then store values or extract values from your fields loke this:



where n is the slot number in the array.

Image All
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: Home
Posted: 12th Jan 2006 13:41 Edited at: 12th Jan 2006 14:20
Enemies flying around!

..realy retarted enemies who just want to ram their head into the walls



Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 12th Jan 2006 14:30
Quote: "
"


Why not just 0.2? Lol!

KimoSabi
19
Years of Service
User Offline
Joined: 18th Jan 2005
Location:
Posted: 12th Jan 2006 16:40
LOL, ya nice code

My Website:

Image All
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: Home
Posted: 12th Jan 2006 18:23
Cuz 0.2 would be about as fast as the player moves in any direction (as long as the player isn't trichoording) so I have to push the player back a bit more than they go each step

Maybe I should just change the collision detection to LOCKSTATE like the Class1 Drones O.o

KimoSabi
19
Years of Service
User Offline
Joined: 18th Jan 2005
Location:
Posted: 12th Jan 2006 18:48
@Image All
Oooo, I see. Never thought of that - good idea though .

GL,
Nicholas H. (KimoSabi)

My Website:

DarkBasic Pro Guy
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location: Broomfield, Colorado
Posted: 12th Jan 2006 20:20
with all these really good entries I don't know if I can make something to come even in third.

With only two weeks I don't think I can make it!

Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 12th Jan 2006 21:23
You can try. See it as a good practice.

My entry has been updated:

features:
infinite levels, with 2 enemies more every level.
the enemies have an AI. The range of the bullets force you to get closer to the enemies(so just shooting around won't help). But, if you get close, the enemies will sense you coming and attack you. Ofcourse, they also have a gun.

Controls:
arrow keys: move/strafe(you'll need it!)
mouse move: rotate
mouseclick: shoot bullet(infinite ammo)
controlkey: draw weapon/put it away(you can run faster if you're gun is put away).
shiftkey: ghost object. Comes in handy if you can't see what you're doing.

The code:

This is close to the final version. Maybe some minor updates later for fixing bugs.

Enjoy!

Sven B

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 12th Jan 2006 22:28
Good work Sven. Nice touch adding in the reflection, too. I'd personally set the camera a little higher, so that you can see over the character, rather than trying to see through him.

@ DBP Guy: Don't give up yet! That way you'll never get better! Don't worry so much about beating the other entries - concentrate more on improving. Do that, and then eventually you WILL win!

DarkBasic Pro Guy
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location: Broomfield, Colorado
Posted: 12th Jan 2006 23:02
there is only three contestants right? currently I have land, working on enemies, and I will add a river and stuff like there is on halo

Image All
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: Home
Posted: 12th Jan 2006 23:25 Edited at: 12th Jan 2006 23:26
I think my enemies are workable now...it's just that I don't know how to make them attack or evade yet, letalone shoot your own weapon



DarkBasic Pro Guy
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location: Broomfield, Colorado
Posted: 12th Jan 2006 23:31 Edited at: 12th Jan 2006 23:36
@Image All nice,
@everyone encouraging me, thanks, but I defintly can't beat svenb's in a million years.

edit: I just have to mention.

hehe 2,600 posts (this is the 2,600th post for counting references)

Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 13th Jan 2006 01:49
You can win - there have been some real "dark horses" in the winners list.

DarkBasic Pro Guy
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location: Broomfield, Colorado
Posted: 13th Jan 2006 06:28
yeah I have seen. In the name generating thing that thing was coming up with things like done and sup (if you add randomize timer()_)

Login to post a reply

Server time is: 2024-11-24 06:42:10
Your offset time is: 2024-11-24 06:42:10