How do you write your DLLs/Apps/Games?

Everything else that doesn't fall into one of the other PB categories.
..::Origin::..
Enthusiast
Enthusiast
Posts: 125
Joined: Sat Jun 17, 2006 3:15 pm

How do you write your DLLs/Apps/Games?

Post by ..::Origin::.. »

Are you a neat freak and like everything easyily read? Whats your style when writing apis?

My style:
I don't mind messy things, as long as they arent really really long. So i break them up into lots of scripts and place them in the same directory, i use the Include function when needing to call them. Works great for me :D

Whats your style?
DarkDragon
Addict
Addict
Posts: 2347
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Re: How do you write your DLLs/Apps/Games?

Post by DarkDragon »

..::Origin::.. wrote:So i break them up into lots of scripts...
What scripting language do you use? This is a PureBasic bulletin board, not a scripting language b.b.. :wink:

My engine has 2 files and about 10000 lines. 8) No useful comment or such.
I'm going to rewrite it :-P more OOP more engine features more planning.
bye,
Daniel
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Re: How do you write your DLLs/Apps/Games?

Post by Joakim Christiansen »

DarkDragon wrote:What scripting language do you use?
He breaks them up in lots of include files is what he meant.
I like logic, hence I dislike humans but love computers.
DarkDragon
Addict
Addict
Posts: 2347
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Re: How do you write your DLLs/Apps/Games?

Post by DarkDragon »

Joakim Christiansen wrote:
DarkDragon wrote:What scripting language do you use?
He breaks them up in lots of include files is what he meant.
But there are definately no scripts which can be used in PureBasic. Use the words code, source, includes, files, ... but NOT scripts. :wink:
bye,
Daniel
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Post by Joakim Christiansen »

I like logic, hence I dislike humans but love computers.
..::Origin::..
Enthusiast
Enthusiast
Posts: 125
Joined: Sat Jun 17, 2006 3:15 pm

Post by ..::Origin::.. »

They are scripts in my apps :)

I write in PB.. And yes i use the IncludeFile function for my ' Scripts '.

@Joakim
*writes and steals code*

Kidding :P

I write like that when i'm purposely trying to right clean code.. else its like

Code: Select all

if(test$="rofl")
pie=#true
else
pie=#false
endif
MessageRequester("Caption","PIE!!!")
Hard to read when theres alot of code :(
DarkDragon
Addict
Addict
Posts: 2347
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

..::Origin::.. wrote:They are scripts in my apps :)
So you don't use a compiler, right? How do you interpret PB code if you don't compile it to an exectuable?
bye,
Daniel
KarLKoX
Enthusiast
Enthusiast
Posts: 681
Joined: Mon Oct 06, 2003 7:13 pm
Location: France
Contact:

Post by KarLKoX »

"Qui baise trop bouffe un poil." P. Desproges

http://karlkox.blogspot.com/
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

I try to make my procedures so short that the contents are visible without scrolling, and I try to limit the number of nested blocks.
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

I am a total neat freak and everything must be coded to make reading it as easy as possible. IMHO there is no other way to code.
--Kale

Image
lexvictory
Addict
Addict
Posts: 1027
Joined: Sun May 15, 2005 5:15 am
Location: Australia
Contact:

Post by lexvictory »

i rarely comment stuff, lol.........

and looking at the screenshots from KarLKoX and Joakim i found that i'm not the only one who uses royale :lol: :D
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6172
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

i feel rather old fashioned... note that i'm normally working on dual monitor setup though

http://img122.imageshack.us/my.php?imag ... d02zo4.jpg
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Pantcho!!
Enthusiast
Enthusiast
Posts: 538
Joined: Tue Feb 24, 2004 3:43 am
Location: Israel
Contact:

Post by Pantcho!! »

when i program a new project in the new blank PB file i comment the WHOLE idea of the project, for fun (when you are in PB IDE i feel i am more concentrated).

I start creating the main procedures, i mostly work with procedures to make the main program loop short.

If the project consists many procedures i make diffrent includes files for each catagories of the procedures.

and i comment each include file also ;)

thats it basicly.

ohh and in start i code very bad, but when the project RUNS and works.
I then parse the whole code and check if it looks ok or i should change it (sometimes its a total mess!)
Killswitch
Enthusiast
Enthusiast
Posts: 731
Joined: Wed Apr 21, 2004 7:12 pm

Post by Killswitch »

I have a .pb template I use to start all of my projects, it breaks up the source into sections (Constants, Structures/Arrays/Linked Lists/Global Variables/Main Loop/Procedures) which makes everything a little easier.

From there I start coding the main procedures and any sub-procedures that I realise I need. If I have lots and lots of procedures which are, in some way, related, I put them in a seperate file. Arrays are also in their own little files.

The very last thing is the main loop, but that's because it's easy. I test all of my procedures into the ground before I even consider starting the main loop.
~I see one problem with your reasoning: the fact is thats not a chicken~
Post Reply