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
flashing snall
20
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 13th Jul 2008 20:37
... <heavy cheering for Virtual Nomad>
That would be kinda cool. never really watched them to much though.


This is my WIP, not even ready for a WIP thread yet though.http://smallgroupproductions.com/
BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 14th Jul 2008 06:57 Edited at: 27th Jul 2008 09:16
Sorry this took so long, I have been super busy at work.
So here goes...

Challenge: Olympic Event!

The objective of this challenge is to see who can create the most fun Olympic event to play. It can be 2D or 3D.

Your event can be from the Summer or Winter Games.
As usual a little extra flair gets extra points!

Deadline: July 27th, 2008 @ 11:59 PST (Pacific Standard Time - San Francisco Time)
You Have Two Weeks!

Good Luck to all who enter!

@Virtual Nomad - Thanks for the idea!
I am also in the Bay area, San Francisco.
Jimmy
22
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Back in the USA
Posted: 15th Jul 2008 03:48 Edited at: 15th Jul 2008 03:48
Hope y'all are bringin' your A games.



Nuff sed.

"Oh hey, nice website Jimmy, it's really nice and fancy." -- That C++ Nerd
Visit. Website. NOW!
Jeff Miller
21
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 15th Jul 2008 05:19
From what I read on CNN today, to simulate an Olympic event at the upcoming Beijing Olympics you will need to include the command FOG DISTANCE 1.
BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 15th Jul 2008 09:01
Jimmy - Nice curling Stone.

Good Luck to all!
Virtual Nomad
Moderator
20
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 15th Jul 2008 09:22 Edited at: 15th Jul 2008 09:23
here's hoping i can actually finish a challenge. figured i should atleast try!

>> badminton anyone?



edit: gotta love dbpro collision...

Virtual Nomad
AMD XP 1800+ (~1.6 Ghz) / 1.5 GB RAM
ATI Radeon 8700LE 128 MB / Windows XP
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 16th Jul 2008 17:44
looks pretty good


Moe
20
Years of Service
User Offline
Joined: 1st Apr 2006
Location: Sunny California
Posted: 24th Jul 2008 06:46 Edited at: 24th Jul 2008 07:37
Heres my attempt at olympic archery

Im not done yet, im working on adding a scoring system, after which, i'll seperate play mode into 1. practice mode and 2. Genuine olympic rules mode.

parrot
BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 25th Jul 2008 07:12
Moe - Nice work so far!

I know you're not finished yet, as few observations...
1)Start from farther away by default
2)Have the camera look at the target from the start
3)When I set the distance to >100 the target disappears sometimes
4)Maybe have the aiming point move as if you were breathing

Good Luck!
BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 27th Jul 2008 09:15 Edited at: 27th Jul 2008 09:15
Tomorrow, Sunday is the final day, I will judge them at midnight, San Francisco, California time (PST).

Post any code you have, even if it is not finished yet.
Just so I can see and judge everyones work up to this point.

Thanks
darkvee
20
Years of Service
User Offline
Joined: 18th Nov 2005
Location:
Posted: 28th Jul 2008 08:13
Hi This is Vee
A New member to join the dbp challenge forums.
I have came a long ways, about got pac-man 3D done lol.
Sorry I didn't finish my Event project, I had plans I wasn't aware of.
But here is what I got

`**** Archery Event By Vee
Hide Mouse
Sync On : Sync Rate 60
Set Display Mode 1024,768,32
Randomize Timer()

Type MatrixType
MatrixNum As Integer
PosX As Integer
PosY As Integer
PosZ As Integer
Height As Integer
Width As Integer
SegX As Integer
SegZ As Integer
EndType


Type ArrowType
ObjNum As Integer
PosX As Integer
PosY As integer
PosZ As Integer
Speed As Float
EndType

Type ShaftType
ObjNum As Integer
PosX As Integer
PosY As Integer
PosZ As Integer
EndType

Type TargetType
ObjNum As Integer
PosX As Integer
PosY As Integer
PosZ As integer
EndType

Type CloudType
ObjNum As Integer
PosX As Integer
PosY As Integer
PosZ As integer
EndType

Global Matrix As MatrixType
Global Arrow As ArrowType
Global Shaft As ShaftType
Global hold As Integer = 0
Global ReleaseArrow As Integer

Dim Target(20) As TargetType
Dim Cloud(200) As CloudType
SET IMAGE COLORKEY 255, 0, 255

MakeMatrixTexture()
MakeCloudTexture()
MakeTargetTexture()
MakeLand(1)
TextureMatrix()
MakeArrow(1)
MakeShaft(2)

For CountTargets = 1 to 20
MakeTargets(CountTargets)
Next CountTargets

For CountClouds = 1 to 200
MakeCloud(CountClouds)
Next CountClouds


Backdrop On
Color backDrop rgb(0,150,200)

SET AMBIENT LIGHT 1
point light 0,0,0,0

Set Camera Range 0,10000000

Do

ViewCam(x,y,z)
ShootArrow(40000,200,10,5)

For CountClouds = 1 to 200
MoveClouds(CountClouds)
Next CountClouds


Text 20,20,"Pull Back: " + str$(Arrow.Speed)
Text 20,40,"Hold: " + str$(hold)
Sync
Loop

Function MakeLand(i)
Matrix.MatrixNum = i
Matrix.Height = 100000
Matrix.Width = 100000
Matrix.SegX = 50
Matrix.SegZ = 50
Make Matrix Matrix.MatrixNum,Matrix.Width,Matrix.Height,Matrix.SegX,Matrix.SegZ
Randomize Matrix Matrix.MatrixNum,1
Update Matrix Matrix.MatrixNum
EndFunction


Function MakeArrow(i)
Arrow.ObjNum = i
Make Object sphere 1,1
Scale Object 1,35,35,100
Color Object 1,RGB(0,0,0)
EndFunction

Function MakeShaft(i)
Shaft.ObjNum = i
Make Object Cube Shaft.ObjNum,1
Scale Object Shaft.ObjNum,60,60,1600
Position Object Shaft.ObjNum,object position x(Arrow.ObjNum),object position y(Arrow.ObjNum)-0.5,object position z(Arrow.ObjNum)-8
Color Object Shaft.ObjNum,RGB(250,0,0)
glue object to limb Shaft.ObjNum,Arrow.objNum,0
Fix object pivot Arrow.ObjNum
Fix object pivot Shaft.ObjNum
Position Object Arrow.ObjNum,Arrow.PosX,Arrow.PosY-3,Arrow.PosZ+10
lock object on Arrow.ObjNum
lock object on Shaft.ObjNum
SET OBJECT COLLISION TO POLYGONS Arrow.ObjNum
SET OBJECT COLLISION TO POLYGONS Shaft.ObjNum
EndFunction

Function MakeTargets(CountTargets As Integer)
Target(CountTargets).ObjNum = CountTargets+10
Make Object Cube Target(CountTargets).ObjNum,1000
Scale Object Target(CountTargets).ObjNum,200,200,20
Target(CountTargets).PosX = 20000+2000*rnd(34)
Target(CountTargets).PosZ = 20000+2000*rnd(34)
Target(CountTargets).PosY = Get Ground Height(Matrix.MatrixNum,Target(CountTargets).PosX,Target(CountTargets).PosZ)
Position object Target(CountTargets).ObjNum,Target(CountTargets).PosX,Target(CountTargets).PosY+1010,Target(CountTargets).PosZ+1500
Texture Object Target(CountTargets).ObjNum,10
SET OBJECT COLLISION TO POLYGONS Target(CountTargets).ObjNum
EndFunction

Function MakeCloud(CountClouds As Integer)
Cloud(CountClouds).ObjNum = CountClouds + 200
Make object Plain Cloud(CountClouds).ObjNum,128000,128000
Cloud(CountClouds).PosX = -100000+4000*rnd(200)
Cloud(CountClouds).PosZ = -100000+1000*rnd(400)
Cloud(CountClouds).PosY = 20000+1000*rnd(80)
Position Object Cloud(CountClouds).ObjNum,Cloud(CountClouds).PosX,Cloud(CountClouds).PosY,Cloud(CountClouds).PosZ
Rotate object Cloud(CountClouds).ObjNum,90,0,0
Texture Object Cloud(CountClouds).ObjNum,2
Ghost Object On Cloud(CountClouds).ObjNum
Disable object zwrite Cloud(CountClouds).objNum
EndFunction

Function FlyCamera()
x# = WrapValue(Camera Angle X() + MouseMoveY())
y# = WrapValue(Camera Angle Y() + MouseMoveX())
If MouseClick() = 1 then Move Camera 392.101
If MouseClick() = 2 then Move Camera -392.101
Rotate Camera x#,y#,z#
EndFunction

Function ShootArrow(Width,Height,FarView,Distance)

If MouseClick()=1
hold = 1
PullBackArrow()
Else
If hold = 1
ReleaseArrow = 1
Endif
hold = 0
Endif

If ReleaseArrow = 1
If Arrow.Speed < 1200.0

Arrow.Speed = Arrow.Speed + 1.0
Move Object Arrow.ObjNum,Arrow.Speed

Arrow.PosX = Object Position X(Arrow.ObjNum)
Arrow.PosY = Object Position Y(Arrow.ObjNum)
Arrow.PosZ = Object Position Z(Arrow.ObjNum)

x = WrapValue(Camera Angle X() + MouseMoveY())
y = WrapValue(Camera Angle Y() + MouseMoveX())

REM This is a thrid person view camera
Position Camera Arrow.PosX+Width,Arrow.PosY+Height,Arrow.PosZ-FarView
Move Camera 0,Distance * -1
Rotate Camera x,y,z
Endif
Endif

EndFunction


Function PullBackArrow()
If Arrow.Speed > -0.1

Arrow.Speed = Arrow.Speed - 0.001
Move Object Arrow.ObjNum,Arrow.Speed

Arrow.PosX = Object Position X(Arrow.ObjNum)
Arrow.PosY = Object Position Y(Arrow.ObjNum)
Arrow.PosZ = Object Position Z(Arrow.ObjNum)

x = WrapValue(Camera Angle X() + MouseMoveY())
y = WrapValue(Camera Angle Y() + MouseMoveX())

Rotate Camera x,y,z
Endif
EndFunction


function ViewCam(x,y,z)

x = WrapValue(Camera Angle X() + MouseMoveY())
y = WrapValue(Camera Angle Y() + MouseMoveX())

Arrow.PosX = Object Position X(Arrow.ObjNum)
Arrow.PosY = Object Position Y(Arrow.ObjNum)
Arrow.PosZ = Object Position Z(Arrow.ObjNum)

Rotate Camera x,y,z
Position Camera 40000,200,0

EndFunction

Function MakeMatrixTexture()
REM Make fast image
Create Bitmap 1, 128, 128
ink rgb(0,0,0),0
Box 1,1,128,128
ink rgb(0,0,0),0
Box 1,1,2,2
Rem make noise
For i = 1 to 512
dot rnd(128),rnd(128)
Next i
ink rgb(0,155,0),0
For i = 1 to 512
circle rnd(128),rnd(128),6
Next i
Blur Bitmap 1,4
Get Image 1,1,1,128,128
Set Current Bitmap 0
Endfunction

Function MakeCloudTexture()
Create Bitmap 2,32,32

Rem make noise
ink rgb(0,90,90),rgb(0,90,90)

For i = 1 to 100
circle 5+rnd(20),5+rnd(20),1
Next i
ink rgb(0,0,0),rgb(0,0,0)
For i = 1 to 60+rnd(120)
circle 5+rnd(20),5+rnd(20),1
Next i

Blur Bitmap 2,3
Get Image 2,1,1,32,32
Set Current Bitmap 0
EndFunction

Function MakeTargetTexture()
Create Bitmap 3,1000,1000
ink rgb(0,0,0),0
box 1,1,1000,1000
ink rgb(255,255,255),0
for i = 1 to 8
grow = grow + 50
circle 512,512,grow
next i
ink rgb(255,0,0),0
for i = 1 to 10
grow2 = grow2 + 1
circle 512,512,grow2
Next i

Get Image 10,1,1,1000,1000
Set Current Bitmap 0
EndFunction

Function TextureMatrix()
Prepare Matrix Texture Matrix.MatrixNum,1, 1,1
EndFunction

Function MoveClouds(CountClouds As integer)
Move Object left Cloud(CountClouds).ObjNum,400
If Object Position x (Cloud(CountClouds).objNum)= -300000
Cloud(CountClouds).PosX = 300000
Position Object Cloud(CountClouds).ObjNum,Cloud(CountClouds).PosX,Cloud(CountClouds).PosY,Cloud(CountClouds).PosZ
Endif
EndFunction

Vee
BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 29th Jul 2008 02:38
Hi Vee, welcome to the challenge forum.
Try to use the:

when you post code, thanks.

What version of DBPro are you running?
When I run your code all I get are white and blue objects everywhere.
I am running 1.069.
BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 29th Jul 2008 03:16 Edited at: 29th Jul 2008 03:21
Time For Judging!
It looked like several good ideas starting out, but not much code was posted.

Vee - Archery
You entry was a little late, but I took it anyway since I hadn't judged yet.
Good textures, but impossible to aim or hit any targets!
I had to rem line 79;point light 0,0,0,0, otherwise everything was blue and white on my system.

Moe - Archery
A playable archery game, I posted some ideas for better default settings up a few posts
I liked it, and I could hit the target!

Virtual Nomad - Badminton
You showed us a screen capture, it showed great promise.
But alas, you never posted any code to try.

Jimmy - Curling
You made a GREAT curling stone!
But you never posted further code to make a playable game, too bad.
I was looking forward to playing your game.

The runner up is:


And The WINNER is:


These challenges are a great place to learn programming skills.
Having a smaller challenge or project to work on helps focus your efforts on smaller achievable goals,
rather than a big project that never gets completed.

I hope everyone will put forth a little more effort into trying these challenges,
and posting updated code, we love seeing your ideas and learning from all of you.
MickeyIII
19
Years of Service
User Offline
Joined: 12th Aug 2006
Location: Louisiana
Posted: 29th Jul 2008 18:02
Hey moe...I haven't seen a bunch of racing games from DBPro that much...maybe when you set the next challenge, you can do something like that...it could be a "race" againts time, an actual race like a simple Mario Kart with a few tracks, simple Extreme G(the Sci-Fi Bike racing game, I have XG 2 for N64 and XG 3 for GCube...), F-ZERO X, like the N64 version, have that too. I think it would be an excellent challenge as it would be sweet to see someone make there own tracks with a little track editor, I THINK I could make a really REALLY simple one, or get a little more advanced and make your track objects sections using memblocks, I've almost got the hang of that and can post some quick links to some basic tutorials later. Then, like in FZero X, for the loops that you race through, you could use intersect object to sort of cast a ray on the section ahead and then one directly below your vehicle and make it react a certain way on the track when it gets to the "loop-de-loop". And in the track editor you can make little waypoints for the computer machines/karts/bikes or whatever so they have a place to go to...

Just thought I would throw that out there, might even try it myself if Moe agrees to this...Unless someone has a better idea?

MickeyIII
Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 30th Jul 2008 09:36
Heh, i don't really feel like i deserved that win. I had some more updates but, unfortunately, they got corrupted while they were on my USB drive... Eh, maybe next time, i had added in some flags and a better scoring/aiming system.

Aaanyways, onto the contest.

I was thinking i was the only person that had XG2. Racing game it is! there are no real rules here, except
1. have an opponent or record time
aaand 2. Have a boost button

The track can be completely straight, or including but not limited to, curvy tracks, loop-dee-loops, jumps, lava, meteors, time travel devices, teleporters, rockets, and any combonation of the above. Preferrably loop-dee-looping lava meteors travelling through time....
1d 2d 3d or 4d racing games are permitted... bonus points for 1d or 4d...

Deadline: august 9th, 12:00 Pacific coastal time.

i'm here to put the F U back in Fun!
darkvee
20
Years of Service
User Offline
Joined: 18th Nov 2005
Location:
Posted: 30th Jul 2008 10:09

Hi thanks BillR I am glad to join, but how do I add code to a snippet? slash code then close the code or?
Next time I will finish a working project.
So whats the next challenge, since this challenge is over?

Vee
RedFlames
18
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 30th Jul 2008 23:26
@Vee:
err sorry u are only Runner Up which means 2nd Place, so you can only set a new challenge if Moe doesnt post one... although id like that challenge... or was it only a suggestion? (dont think so because of Deadline etc.)

Moe
20
Years of Service
User Offline
Joined: 1st Apr 2006
Location: Sunny California
Posted: 30th Jul 2008 23:32
Ah, crap, i forgot.... yesterday i remembered the password to my neuro fuzzy account... i hate the name moe... AAAnyways, i'll repost what i said on this account, and use this profile for the remainder of the challenge to prevent confusion.

Quote: "Heh, i don't really feel like i deserved that win. I had some more updates but, unfortunately, they got corrupted while they were on my USB drive... Eh, maybe next time, i had added in some flags and a better scoring/aiming system.

Aaanyways, onto the contest.

I was thinking i was the only person that had XG2. Racing game it is! there are no real rules here, except
1. have an opponent or record time
aaand 2. Have a boost button

The track can be completely straight, or including but not limited to, curvy tracks, loop-dee-loops, jumps, lava, meteors, time travel devices, teleporters, rockets, and any combonation of the above. Preferrably loop-dee-looping lava meteors travelling through time....
1d 2d 3d or 4d racing games are permitted... bonus points for 1d or 4d...

Deadline: august 9th, 12:00 Pacific coastal time."



Good luck!

parrot
BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 30th Jul 2008 23:39 Edited at: 30th Jul 2008 23:41
Gah, you scared me for a second, I'm already a good ways into my entry, didn't even realize he had a different name .

Oh, and Vee, just use the CODE button above the message entry field, then paste your code, then click the CODE button again.

RedFlames
18
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 31st Jul 2008 03:24 Edited at: 1st Aug 2008 19:52
Ooh Kolp try72y is Vee i thought neuro fuzzy was Moe
soo...
Kolp try72y = Vee
Neuro Fuzzy = Moe
ok so that really is the new challenge... sry & nvm ^^

MickeyIII
19
Years of Service
User Offline
Joined: 12th Aug 2006
Location: Louisiana
Posted: 31st Jul 2008 03:39
Cool! Looks like I might even join this time. I think I can handle this. Will try. Oh, and yeah, that is freaky about the two user accounts for Moe/Neuro Fuzzy...I got confuzed there for a sec in my E-Mail.

Anyway, how do I figure out how to convert time zones,(i.e. 12:00 Pacific coastal time to Central Time? like here it's about 7:40 P.M. C.T. for this particular post...)thanks.

MickeyIII
darkvee
20
Years of Service
User Offline
Joined: 18th Nov 2005
Location:
Posted: 31st Jul 2008 15:38
Hi bmaczero
Thanks for telling me how to post code.
I guess, I will give us a challenge then.Cause Moe hasn't said nothing.
Ok here is what were going to do. Were going to make a racing game. Good luck! Deadline 2 weeks !

Vee
MickeyIII
19
Years of Service
User Offline
Joined: 12th Aug 2006
Location: Louisiana
Posted: 31st Jul 2008 16:04 Edited at: 31st Jul 2008 16:12
Um...Moe already said we were doing the racing challenge and the Deadline is August 9th, 12:00 Pacific coastal time. I think you missed the whole fiasco with Moe having TWO accounts...look up a few posts and start reading, Moe already set the challenge.

MickeyIII

Edit: Never mind about me entering this challenge. I'm working on something else for my brother and I to do multiplayer with and this will just slow it down. Plus with the set deadline I don't think I will be able to finnish it anyway. Thanks for making this the challenge though so I can learn from it.

MickeyIII
BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 31st Jul 2008 16:30
@Moe - the deadline is too soon, a racing game is very hard, and will take 2 weeks at least.
darkvee
20
Years of Service
User Offline
Joined: 18th Nov 2005
Location:
Posted: 31st Jul 2008 18:33
Hi this is Vee
I am planning on finishing my programmnig code this time.
Here is what I got so far.
Hope you like it.



Vee
BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 31st Jul 2008 21:57
I dunno, I'm already almost through with the basic engine for mine - acceleration, steering, level editor, terrain, checkpoints, and rocket boosters

DarkBasic Pro Guy
22
Years of Service
User Offline
Joined: 4th Jun 2004
Location: Broomfield, Colorado
Posted: 1st Aug 2008 07:53
I wish I knew more about DBP lol I wouldn't mind joining in one of these challenges. Good luck everyone

P.S. Moe sounds like he wants to take a joy ride in a Chevy Corvette, you better get something good going)
BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 1st Aug 2008 19:50
Hey, if anyone can make a medialess Corvette, I'll gladly put it in my game and call them a genius

DarkBasic Pro Guy
22
Years of Service
User Offline
Joined: 4th Jun 2004
Location: Broomfield, Colorado
Posted: 1st Aug 2008 20:00
I imagine that would be tons of code but I'm sure it's possible
Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 1st Aug 2008 23:24
Nice Vee, fun to play! The only problem is that after a while, you start going through the boxes.

also, i realized that a media-free racing game really can only be linear, eh, oh well.

...and i want my corvette!

XD
Jimmy
22
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Back in the USA
Posted: 2nd Aug 2008 00:35 Edited at: 2nd Aug 2008 00:37
Teaser....



Also, if anyone knows how to medialessly and individually texture each side of a DBP box primitive, that would be great info for me.

"Oh hey, nice website Jimmy, it's really nice and fancy." -- That C++ Nerd
Visit. Website. NOW!
McLaine
20
Years of Service
User Offline
Joined: 20th Feb 2006
Location:
Posted: 2nd Aug 2008 02:35
Why does a media-less racing game have to be linear?

Think Scalextric.

It's not my fault!
BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 2nd Aug 2008 03:45 Edited at: 2nd Aug 2008 03:47
@Jimmy:

http://forum.thegamecreators.com/?m=forum_view&t=104675&b=6

@All:

Here's a little preview of mine...



Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 2nd Aug 2008 04:38
Eh, i was just thinking it'd be too hard to make a curving track, but, nevermind

XD
Jimmy
22
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Back in the USA
Posted: 2nd Aug 2008 08:24
@bmaczero:

Yeah, that seems to be the only way. I had tried it, but the lighting goes wacky on plains when they're limbs for some reason, which is why I resorted to boxes with very small depths. It works enough for me. Thanks for finding that link, though

"Oh hey, nice website Jimmy, it's really nice and fancy." -- That C++ Nerd
Visit. Website. NOW!
darkvee
20
Years of Service
User Offline
Joined: 18th Nov 2005
Location:
Posted: 2nd Aug 2008 14:57
Hi this is Vee
Thanks Neuro Fuzzy glad you like it.
One thing though,the reason sometimes it doesn't do collision, is that to do with dbp collision commands or my arrays ain't set up right?
Either that or dbp collision commands isn't made to do accurate collision at very high moving velocity speeds.

So I am trying to figure out if its the commands don't work with high speed of moving objects, or I have something wrong in my array I ain't seeing yet. If I find out its the collision command, maybe I need something more like distance function so I can have better collisions on the boxes, or maybe it be more accurate or something.

Hi, Jimmy it looks awsome dude.
I like how you made your own textures to produce that look alike sponge bob face on there. I Can't wait to see what else you got in
store for us or see it in action.

Hi Bmaczero
That is looking good also, like how you did the curves.
I was thinking of adding curves to mine also, but trying to figure out a good way to do it. But I can't wait to see yours in action, also with the track editor.

Well everyone keep up the good work, this is going to be a good contest here, I just have that feeling.

Vee
jason p sage
19
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 2nd Aug 2008 15:47 Edited at: 2nd Aug 2008 15:49
Collision doesn't work by speed. It works by testing (per frame) if one poly slices through another. The problem with "high velocity" is you might be skipping right by the "frame" situation that would report the collision - making the game seem like collision isn't working - when its the program that isn't working ideally.

I ran into this first hand making bullets in the DBPro version of Iron infantry (source code included): http://code.google.com/p/ironinfantrydbpro/

What I did was in between frames - is move the bullet multiple "smaller" steps per frame - increasing the chance that the collision wouldn't be missed. Basically - if "TimeElapsed" = 100 milliseconds, I would instead of moving object speed * somespeedfactor * TimeElapsed - I would instead use this number to find out how far I'm supposed to move my object - then divide that by some amount (say 10) to perform "mini steps" one after another.

this helped drastically - if adding overhead for accuracy - seemed like a good trade off. Anyways - I also "cheated" I made my bullets like a scale 30 feet long LOL... So a tiny bullet was really more of a harpoon - again to increase chances I wouldn't miss anything. The actual best way in this scenario - is to make the distance you need to travel divided by the smaller of the dimension for the object (length,width.,height) and move the object repeated this amount - - that should kill the chance of a miss. If this is too slow - then make some variation to balance performance with accuracy...

Note also - that some people use ray casting (intersect object) to "poke around" for hits along the "tradjectory" (maybe like a procupine with not to many porc's LOL) as an alternative - or perhaps you might just ray cast the distance you need to travel per frame - perhaps a few - front top, front left front right front bottom - to see if there would be a ray hit in front of you.. maybe sides too) for distance you need to travel - if not - just move it and use the collision you have now afterwards. (This is more efficient then many tiny steps for sure... but the lower the number of ray casts the more inaccurate this trick gets. With games - everything is a balance - "visually appealing" "Processing Needs" "Game play speed" is a constant battle in it of itself trying to get the right "mix" that hits the "sweet spot"

Good Luck.
--Jason

BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 3rd Aug 2008 06:36 Edited at: 3rd Aug 2008 06:41
Testing?

Ok, I'm having trouble posting my code - "Unknown System Error. Sorry but I have to abort now. Please try again later". Please see the attached text file to read my post. If somebody could post it up and see if it works for them, that would be great.

McLaine
20
Years of Service
User Offline
Joined: 20th Feb 2006
Location:
Posted: 3rd Aug 2008 12:46
I tried, it wasn't having it

It's not my fault!
BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 3rd Aug 2008 16:22 Edited at: 3rd Aug 2008 16:23
Thanks anyway, McLaine.

One last quick updata here, I realized I forgot the boost function

This attachment is just the game's code, that should make it easier to test.

jason p sage
19
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 3rd Aug 2008 17:02
@Jimmy - you can make a Object dynamically to texture each face individually. I personally start with a base object of a triangle 1,1,1,1,1,1,1,1,1, /.... all ones... then Add limbs - where each limb is a simple plain with a texture - oriented appropriately.

--Jason

Jimmy
22
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Back in the USA
Posted: 4th Aug 2008 03:15 Edited at: 4th Aug 2008 03:26
UPDATE

I have attached the TXT file due to largeness.

The code is an absolute mess and chock full of redundancy. I don't suggest reading it.

ALSO: Hold down the right mouse button and you can rotate the camera around spongebob for a better look at'im

"Oh hey, nice website Jimmy, it's really nice and fancy." -- That C++ Nerd
Visit. Website. NOW!
darkvee
20
Years of Service
User Offline
Joined: 18th Nov 2005
Location:
Posted: 4th Aug 2008 04:29
Hi This is Vee
Hi Jason, i tried them techquies you used but i couldn't get it to work , so I used something else.
I used raycasting for collision and that solved it.
Only thing is now, my track that used to be linear, is now 3d track.
Hi Mclaine
It toke me a while to figure out, how I would make it a 3d track.
But finally I got it lol. I also got the controls working also for the car.
Here is a couple of screenshots.

top view


3d view


Vee
Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 4th Aug 2008 04:51 Edited at: 4th Aug 2008 05:59
great entries people!
bmaczero- Checkpoints end in really fun gameplay. The whole thing need to be a bit spedup though.
jimmy- also fun, and cool to look at. The sounds and models are great. I think that it seems more setup to have some kinda 2 player or Versus with some kinda cheap AI.
vee- Great, glad you solved the problem. It looks really promising!

XD
Image All
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: Home
Posted: 4th Aug 2008 06:21
Getting started on mine. Got my course done, matrices ftw

I'm thinking I'll have the player go through the course once, then race his ghost image when he completes a lap. Each time he completes a lap, a recording of his last lap will be added to the race.


Remember those old guys? They made epic renders, I think one of them was called DaVinci, and all they used was MS Paint. Sometimes it's just skill....
Jimmy
22
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Back in the USA
Posted: 4th Aug 2008 09:56 Edited at: 4th Aug 2008 09:58
I'm almost done.

Only thing left is 2nd player.

Hope you enjoy the obstacles!

TXT file attached.

"Oh hey, nice website Jimmy, it's really nice and fancy." -- That C++ Nerd
Visit. Website. NOW!
jason p sage
19
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 4th Aug 2008 14:07
Mr Tank
23
Years of Service
User Offline
Joined: 25th Nov 2002
Location: United Kingdom
Posted: 4th Aug 2008 23:52 Edited at: 5th Aug 2008 02:03
I made a start. Making a simple track editor first. Basically you click the mouse to add points, and it joins them up smoothly. Many things i could do to make the editor better, but time is an issue.

Next task: loading and saving tracks, then collision detection with the track edges, which i have a good idea how to do. If time permits i'll generate a 3d object track using memblocks, otherwise just drive on the image.



SUPER BADASS SPACESHIP X: WEBSITE
FORUM TOPIC
MickeyIII
19
Years of Service
User Offline
Joined: 12th Aug 2006
Location: Louisiana
Posted: 5th Aug 2008 03:25
Hey Mr. Tank, could you provide the code you have so far for getting those splines? I've always wanted to do something like that, just couldn't figure it out...yes this means that I change my mind and I am working on a racing game right now. I'll just need some help, if that's alright.

No, I don't plan on taking code, just looking at it and making my own code my own way, method, etc...I just need SOMETHING to start on...some theory.

Thanks,

MickeyIII
Mr Tank
23
Years of Service
User Offline
Joined: 25th Nov 2002
Location: United Kingdom
Posted: 5th Aug 2008 03:47
Sure. Here is the code i'm working on right now.



Sorry if it's a bit poorly commented and confusing at the moment. It's a lot simpler than I make it look. I'd like to clear it up at some point and make it into a snippet, but the deadline for this is coming up fast so i'll probably not do that before.

I think the system i'm using is known as "cubic splines". Try sticking it into google.

SUPER BADASS SPACESHIP X: WEBSITE
FORUM TOPIC

Login to post a reply

Server time is: 2026-07-10 23:32:27
Your offset time is: 2026-07-10 23:32:27