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.

Code Snippets / [DBC] New DBC Objects! Pyramids, Prism, Diamond, Disk, Trees, Capsules...

Author
Message
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 4th May 2008 20:48 Edited at: 4th May 2008 20:51
Hey guys!

This is v1.01 of my new objects.

(Edit) Don`t copy the code from the code snippet! The TGC server somehow doubled the enters (as you can see) and it will take up 2 times the space. Download the zip file, the code "objects.dba" is in it.



Here are my new objects!

Pyramid, Prism, Diamond, Capsule, Tree, Disk(No, I didn`t scale a cylinder 100,0,100)

How to use:

First, you have to include the functions into your program:

#include "objects.dba"

Note that the file "objects.dba" has to be in the same directory as your program!

Create object Pyramid(object,size,sides,flag)

Object=object number
Size=size
sides=3 to 4 sides
flag= if 0, your object will have limbs, if 1, your object will have no limbs

Create object Prism(object,size,flag)

Object=object number
Size=size
flag= if 0, your object will have limbs, if 1, your object will have no limbs

Create object Diamond(object,size,stretch,flag)

Object=object number
Size=size
stretch= if 0, your object will have 8 identical sides, if 1, your object will be stretched
flag= if 0, your object will have limbs, if 1, your object will have no limbs

Create object Capsule(object,size,type,flag)

Object=object number
Size=size
Type= if 1, your capsule will have rounded ends, if 2, your capsule will have pointed ends
flag= if 0, your object will have limbs, if 1, your object will have no limbs

Create object tree(object,size,cones,flag)

Object=object number
Size=size
cones=The number of cones on top of the trunk
flag= if 0, your object will have limbs, if 1, your object will have no limbs

Create object Disk(object,size,polygons,flag)

Object=object number
Size=size
polygons=The number of triangles shaped into a circle
flag= if 0, your object will have limbs, if 1, your object will have no limbs

Have fun!

(File attached)

TheComet

Oooooops!!! I accidentally formated drive c.

Attachments

Login to view attachments
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 8th Jun 2008 01:04
That's pretty impressive. I haven't had a chance to run the code yet, but I'll be sure to check it out when I get home

"I used to do a lot of time travelling when I was younger. I called it 'ta-kwee-la' You would drink this potion and wake up 3 days in the future!" - Craig Ferguson
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 10th Jun 2008 11:22
WindowsKiller

That link goes to the old functions, this is an update.

TheComet

Oooooops!!! I accidentally formated drive c.
Nano brain
15
Years of Service
User Offline
Joined: 7th May 2008
Location:
Posted: 12th Jul 2008 06:48
The Comet,

Thanks for your functions! I will probably spend some time soon converting them to DBP, using vertex data to create the objects...if that's okay with you.

This kind of procedural programming would be a great addition if TGC were to give the go ahead on creating a web version of DarkBasic! I'm working on 2d drawing functions right now(more complicated and useful shapes, in hopes that they will give the go ahead eventually). Also I will be working on 2d animation functions(kind of something that mimics flash vector graphics). Lastly I hope to dabble into a workable anti-aliasing for vector graphics.
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 13th Jul 2008 19:10
Quote: "Thanks for your functions! I will probably spend some time soon converting them to DBP, using vertex data to create the objects...if that's okay with you."


That`s fine with me, only if you use the functions in a game you publish, be sure to mention me!

Login to post a reply

Server time is: 2024-05-05 06:37:50
Your offset time is: 2024-05-05 06:37:50