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 / I will forget how to program with this language

Author
Message
Takis76
21
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 20th Jan 2011 01:13 Edited at: 20th Jan 2011 01:18
Hello ,


I am trying to program with this language and I receiving strange errors which there is not error in my code.


I have create one project which my game will be.

This project have seperate files for each of my functions.


All my types I have put them in one file types.dba
All my variables I have put them in one file variables.dba


I have create one main file which is my main file to know where my program starts , like similar with c++ we have a main program with the main function.

There is no main function in darkbasic , but I used to have one main file which the main function will be there , I simulate one main function.


In fact there is not main function , but the main game loop. I call this file main.dba

I have all variables and types called from my main file with #include function and I put these files at the top of my program which I will initiate all my global variables and types.

In the top of my main file I have this code




These files are also in my project.

My viariables files contains this code:




And types file contains this code:



Somewhere in my main file I call one function keyboard_commands()

Which there is one seperate file keyboard_commands.dba which contains all my code which player will have all keyboard input commands like , move player with arrows , turn player arround in the level.

The keyboard_commands.dba file is in the project as well.

somewhere in my program , I need to create one 4 dimensional array which initialize all my levels of my game.

In my variables.dba file I use:



Which for me means , I get ready for my 10 levels with 30x30 squares and each square have 4 sides.

So far so good. But somewhere I am calling one function:



Which calls one function from a seperate file init_levels.dba from my project , this file also included in my project , not called with #include command , but just included in my project at the left of my IDE.


I am calling the function init_levels() to empty all cells of my array and give default value 0 to all squares and levels.

The init_levels.dba file contains this code:



This function scans my big 4dimensional array and put 0 value to everything.


When I run my program , I have this error:


Cannot find structure 'init_levels:plevel' in local declaration inside types.dba.

There is not any type with plevel in my types.dba file
My variable plevel was global and included in variables.dba at the main file at the beginning of my program with #include command.

Why the compiler doesn't recognize my plevel variable and the error is very strange (discribe it as structure) and the IDE does not indicates "highlights" and I don't know where is the error.

All my variables are global , and my types are global and have already initialized at the beginning of the program.



Another one thing I tried , was to run my initializing of my array with type.

Like this:





And another strange error appeared:

Variable in FOR NEXT loop cannot be a complex data type at line 327.

The line 327 does not exist , but is the line 3 of this file.

The IDE does not calculate the error line correct and as I know in c++ at least , you can use for loop , with structs (types in basic)

Why darkbasic doesn't allow types in one for next loop.

Many times , I tried to program , normaly with this language , and strange errors always received and I stop my game.

And my code was correct...
BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 20th Jan 2011 04:49 Edited at: 20th Jan 2011 04:56
Quote: "I will forget how to program with this language"

Maybe a little bit overdramatic?....
try not to double space your post

Every, and I do mean Every programming language has its own idiosyncrasies and ways of doing things, DBPro has some too.
DBPro is an amazing fast prototyping language, it is not really meant to be compared to C/C++ type of structures or ways of doing things.
I think you will retain your programming skills just fine.

I don't think separate files for each function is the way to go with DBPro.
I don't personally use so many include files, this may be why DBPro is missing the line number with the error

Quote: "Variable in FOR NEXT loop cannot be a complex data type"

It sounds like you need to use simple variables in your for next loops
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 20th Jan 2011 08:50
Included files can only contain functions - so you'd need to wrap all that in a function and call the function from your main source.

But really, very few people use includes to that extent, we tend to do all the initiation stuff in the main source, personally I don't even use includes unless it has a lot of benefits. For example I might have an engine include, so that a level editor and game can share the same code. Obfuscation is not a good idea with DBPro, your really better off just getting stuck in on a single .DBA, then split it up when it gets difficult to manage. Especially when prototyping something, as the line numbers in error messages get messed up as BillR says.

Health, Ammo, and bacon and eggs!
Jeff Miller
21
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 20th Jan 2011 12:25
One of the errors that you have encountered is not all that rare. When you use a global variable as an iteration variable in a function, you often provoke the error message that you received regarding "plevel". I work around this by declaring a local iteration variable within the function.
JDforce
21
Years of Service
User Offline
Joined: 27th Jul 2004
Location: Sea of Tranquility
Posted: 20th Jan 2011 13:25
The secret to learning a new programming language is to avoid thinking that the one you are new at is even similar to the other languages. Adapt yourself to BASIC without pretending it is C++.

May the 3d force B with U
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 20th Jan 2011 14:26
Quote: "Many times , I tried to program , normaly with this language , and strange errors always received and I stop my game.

And my code was correct... "

Sorry but if the code was correct you wouldn't get an error.

No two languages are the same and we always have to adapt our thinking to suit new languages. It's a pain sometimes but it's normal. As a programmer it is overcoming these issues that makes us better programmers; learning to think around 'obstacles' or 'problems' is part of the fun isn't it?

I hope you don't give up and keep trying until you find a way to 'think' DBP. It's a great language for learning many aspects of game creation.

Takis76
21
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 20th Jan 2011 18:57
Ok about all of these.

How do I will solve my problem? , including all of my source code in only one huge source file? (This is not organize the project well and only one huge file , you will be lost after 100.000 lines of code).

Is better have a lots of small files than a huge file.

I have Darkbasic 6 Years now , and always something happen and I can't finish my game , is there any special document which discribes all of these programming anorthodox , idiosyncrasies?


Why IDEs does not calculate the error line numbers correct and when I have an error at line 120.542 and my error will be in line 5 in one of my too many source files? (Later I will have 1000s different source files) And what will happen if the IDE will not provide you which file have the error?

And why is not allowed to have in one for loop a type variable?
All languages allow this , even the normal basic , (Quick basic or Visual basic).

And I didn't understand why , compiler can't find my plevel or any other variable , and I have declare it as global , but in other seperate source file and I have included it(I think) in my main file at the beginning of my program.

Will you please explaign , these idiosyncrasies?
What do I need to do?
Write the game from beginning?

Another thing I have found , and I had posted in the past was , when I am open one file , as all we know in all basic langueges , when we put a semicolon ";" at the end of the open function we are able to put a string in one file and avoid to have the "enter" charachter like chr$(13) when we write one string in one file.

In Darkbasic , you can't avoid this , everything you write in a text file , put the chr#(13) charachter at the end of the file and you need to create a complex algorithm to have a lots of strings without change a line in the opened text file.

The code below must open a file and put out

hello world



and no

hello
world

All of these years in basic languages we know that , why now have changed?

And other things , I am not remember now...
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 20th Jan 2011 19:28
The truth is you won't need 100,000 lines of code with DBPro. It's very much a game programming language, you can't compare it with any other language. The biggest game I've written is less than 10,000 lines of code, FPSC is about 50,000 lines, and that's a game creation system. If you need 100,000 lines of code then your doing something wrong. We all learned DBPro by following other peoples examples, you need to go with it's flow, instead of trying to make it work like other languages.

When compiling, DBPro creates a single source file from all your includes, then returns the line number from that - so any included source code is added at the end of the compiling code. Included source files have to use functions so that the code can be called, so you'd need a variable initiation function, and call that function from your main source. Thats why most people make an init subroutine inside their main source for variables, types etc etc.

If you can't get used to DBPro, there is always GDK, if you know C++ then you might make quicker progress with that. But you'll soon get used to how DBPro works - I'm writing a game in DBPro and C++ at the same time, the code logic is pretty much the same except development in DBPro is much faster.

Health, Ammo, and bacon and eggs!
Takis76
21
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 20th Jan 2011 22:48
You didn't answer all of my questions.
Read my last post again.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 20th Jan 2011 22:49
Quote: "including all of my source code in only one huge source file"


You certainly don't need to use one huge file. Practice with a small project with, say, three separate source code files till you understand how the system works. Then you can sort out your bigger projects.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 20th Jan 2011 23:02
Modularly designed code is definitely possible with DBPro, if you follow a few easy-to-follow rules.

See all of my posts in the following thread for full breakdown: http://forum.thegamecreators.com/?m=forum_view&t=180209&b=1

Writing modular code allows you to write and test each module, independently of other modules, BEFORE you add it to your main program.

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 20th Jan 2011 23:49 Edited at: 20th Jan 2011 23:50
Quote: "You didn't answer all of my questions.
Read my last post again."

Please try not to sound rude. People try to answer as many questions as they can to help each other out in my experience here.

That said:
Quote: "And why is not allowed to have in one for loop a type variable?
All languages allow this , even the normal basic , (Quick basic or Visual basic)."

You can use defined UDT's in for loops but you cannot define them in a for loop, why? Because you would be trying to define a type with the same name as an existing type... why would you want two UDT's that are exactly the same with the same name? I may be misunderstanding you.

Quote: "And I didn't understand why , compiler can't find my plevel or any other variable , and I have declare it as global , but in other seperate source file and I have included it(I think) in my main file at the beginning of my program."

Can you show how you have done this? With code maybe?

Quote: "Will you please explaign , these idiosyncrasies?
What do I need to do?
Write the game from beginning?"

Are you trying to translate a game from another language into DBP? If so then I'm not surprised you are having difficulties. It might be worth learning a little more about DBP before you try a task like that.

Quote: "Another thing I have found , and I had posted in the past was , when I am open one file , as all we know in all basic langueges , when we put a semicolon ";" at the end of the open function we are able to put a string in one file and avoid to have the "enter" charachter like chr$(13) when we write one string in one file."

DBP is under no obligation to react like any other language. There are ways to do what you are attempting. Instead of asking TGC to change the language or why they did it the way they did, you will get further if you just accept it is the way it is and learn how to program in DBP correctly.

It works fine for me and many other programmers here who have experience of other languages. I learned to program in basic about thirty years ago now and use C#, python and several other languages now. I didn't find DBP so strange.

Maybe you were expecting to find a cat and found a dog. Dogs aren't so bad.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 21st Jan 2011 00:19 Edited at: 21st Jan 2011 00:50
Quote: "Modularly designed code is definitely possible with DBPro, if you follow a few easy-to-follow rules.

See all of my posts in the following thread for full breakdown: http://forum.thegamecreators.com/?m=forum_view&t=180209&b=1

Writing modular code allows you to write and test each module, independently of other modules, BEFORE you add it to your main program."


Some really useful suggestions in there which I hope to implement in my current project (if I've understood them correctly).

Edit I've just re-read the thread and tried to plan my present project using it and realise I haven't understood your suggestions at all. See my comment on that thread. Perhaps it's just too late in the day for me.
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 21st Jan 2011 00:45
My current project has ~5000 lines spread over 9 source files, and it's working fine. You just need to follow the rules as IanM said.

[b]
miso
16
Years of Service
User Offline
Joined: 16th Jun 2010
Location: Budapest, Hungary, 127.0.0.1
Posted: 21st Jan 2011 01:14
@IanM

My Types are after my Globals. I know I can change the order, but didn't experience any problem with that. I wonder what errors it may cause if I choose not to change this. Can you tell me any example? Do you suggest to reorganize all my modules?

No place like 127.0.0.1 .
Takis76
21
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 21st Jan 2011 02:18 Edited at: 21st Jan 2011 02:19
I think , I am not rude , I just try to find answers....

Ok , I have one zip file attached , and I am writing my rpg engine from the beginning , and I am trying to organize things better.


Compile the project and see the error.

You need enhancements library activated
and you need D3D Fast Text Functions library installed.


All files are in the zip.
When everything compiles correct , you will see the just interface of the engine.
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 21st Jan 2011 11:19
Your types.dba file has no function - wrap the Type initiation in a function and call it from your main source file, that will initiate that type. Same goes for your variables.dba, This is the third time I've said this....

Included source code is not automatically ran, you have to keep all your commands inside a function, then call that function from your main source file.

Why not just have your defines.dba function define the types and variables as well, instead of using 5 different source files.

Health, Ammo, and bacon and eggs!
Scraggle
Moderator
23
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 21st Jan 2011 11:48 Edited at: 21st Jan 2011 11:48
Quote: "But really, very few people use includes to that extent"

I guess I must be the exception to the rule then!

My current project has ~12000 lines of code but the "main.dba" file is just this:


Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 21st Jan 2011 11:53
You have an initialise() function, Takis has...

defines
init_levels
inits
types
variables


I guess I'll just go back to my single source file projects and leave you guys to it, happy obfuscation.

Health, Ammo, and bacon and eggs!
Scraggle
Moderator
23
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 21st Jan 2011 11:59 Edited at: 21st Jan 2011 12:00
I have many more includes that are called from within others (24 in total).
I find it much easier to work when you know where your code is.
A single source file takes way too much scrolling through.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 21st Jan 2011 13:36
Quote: "A single source file takes way too much scrolling through."


Of course - but there's no need for includes either. Just add separate dba files to your project and you can view them in the editor on a separate tab for each file if you wish. It's very easy to use.
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 21st Jan 2011 14:14
Why? - does nobody else use the function list to go to the desired function, or the subroutine list - nobody really scrolls all through their code, surely!.

Health, Ammo, and bacon and eggs!
Scraggle
Moderator
23
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 21st Jan 2011 14:55
@GG That's what I do ... that's what I call include files.

@VanB I use that too but I just find it easier to know that (for example) all event code/user input is in the userInput tab .. personal preference I guess.

Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 21st Jan 2011 15:04
Ahh, see I'm still using the default (old default) IDE, which is horrible for multiple source codes. I would rather scroll through 100,000 lines of code than use the original IDE with 2 sources - in fact I tend to have a copy of the IDE open for each source. It's a nightmare.

I'm the opposite when using C++, Xcode in particular - it's common sense to use multiple sources with that.

Maybe it's time I switched IDE's - I have tried to switch before but I keep going back to the original IDE.

Incidently Takis, I loved those sorts of games, Eye of the Beholder, Captive was my all time favorite. Anyway I like this webpage about Captive, it get's really technical and I think it's well worth a look, it actually explains a great deal of how the game was made, how the maps were created, lots of interesting stuff in there.
http://captive.atari.org/index.php

Health, Ammo, and bacon and eggs!
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 21st Jan 2011 16:54
Quote: "Maybe it's time I switched IDE's - I have tried to switch before but I keep going back to the original IDE."


Probably.

I used to use the original IDE with only the occasional glitch. When the new one came out I found it to be even better once the important glitches were removed.

Quote: "@GG That's what I do ... that's what I call include files.
"


Ah, I thought you meant you were using the INCLUDE statement. No need now of course.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 21st Jan 2011 20:38
@miso,
I'm pretty sure you'd be OK with what you have (it compiles for you, after all). It's a long time ago that I encountered it, but IIRC, the problem occurs when you have types defined after the functions that use them, but what that problem was exactly I can't remember.

Other than the few 'must do's, everything else is just a matter of personal style/preference.

Anyway, anything that I ever write should just be used as a guideline - I'm as prone to mistakes as most people, and in some cases, what I write may not actually be what I mean

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 21st Jan 2011 20:42
Quote: "I'm as prone to mistakes as most people"


I hope not. We all rely on you.
enderleit
19
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 21st Jan 2011 23:58
Quote: "Quote: "I'm as prone to mistakes as most people"

I hope not. We all rely on you."


Aahh... the pressure...

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 22nd Jan 2011 00:17
Takis76
21
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 27th Jan 2011 01:17
So , what is the conclusion?

To put my types and my variables in one function and the call them?
I will try it and I will tell what happened...
Takis76
21
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 27th Jan 2011 01:58
I tried to put my variables in one function and at the beginning of my source code.

And now I receive this error:

Cannot find structure 'init_levels:plevel' in local declaration at line 368.

The plevel variable , is declared as global in top of the main source code.


I have the main source code , and I removed #include function.
Why is there #include function?
I thought #include function is like c++ include , to tell to include this filename in your code.






I have to say , with c++ , my game went farest , than with darkbasic.

The problem , I had with c++ , was , it was very difficult to have infinity items and save my arrays , and Darkbasic have the save array function which is very convenient.

Yes you will say , to use the DarkGDK , I used allegro game library and I didn't have problems.

My problems was about , using huge arrays , and I needed to create dynamic memory allocation and I didn't know how to do that and my game stuck.

But why languages are so different between.
This language is very unorthodox , if I have problems creating separate source files and the compiler doesn't recognize my variables , and IDE indicate my error number wrong , and when I want to open a file and when I need to put one string and avoid to have the chr$(13) , (I had posted one message about this before).

Look this code and all normal basic can handle this.



It must give "hello world" in output and no

"hello
world"

with 2 lines.

And don't convince me , and call me rude and everything you want.

I can't program with this language.

And if we go to the past in older versions , thing was worst , the newer updates corrected a lots of things.

I did more things with one free c++ language and one free Dev C++ compiler or codeblocks free compiler , than with one paid compiler.

Guys , I have to say , Darkbasic IDE (Sucks) and ask a lots of people in the community , is a shame other people create external IDEs , as synergy or darkIDE or indigo and so many IDEs , I have seen here , some people suggested me , and the whole company , doesn't have an decent IDE.

I have to say it , as a paid customer and as programmer , this language , needs a looooooooots of improvements.

Stop create plugins and improve the core of the language.

Thank you , but someone needs to say that...
BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 27th Jan 2011 02:45 Edited at: 27th Jan 2011 02:46
In DBPro when you open a file to write to
you must check if it already exists, and if so delete it first,
then open to write a new version of the file.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 27th Jan 2011 12:06 Edited at: 27th Jan 2011 12:26
If you want both words to appear on the same line then build up your string in stages before writing it.

For example



Quote: "I tried to put my variables in one function and at the beginning of my source code.

And now I receive this error:

Cannot find structure 'init_levels:plevel' in local declaration at line 368.

The plevel variable , is declared as global in top of the main source code."


I can't help you with that problem without seeing the code.

Your first snippet doesn't compile because functions such as "init()" seem to be missing.

Edit Have a look at this thread, especially enderleit's and IanM's posts on 21 Jan where they show you how to do it. Their advice works perfectly for me.

problems with include files
Takis76
21
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 27th Jan 2011 19:00 Edited at: 27th Jan 2011 19:13
If you look in my posts here , I have attached my project and you can see.

Quote: "
Your first snippet doesn't compile because functions such as "init()" seem to be missing
"


You need to download whole project. The init function exists in other file init.dba , I had posted the main source code only.

@baxslash
I am programming gwbasic for years 1986 - 1990
I am programming Quickbasic for years 1991 - 1995
I am programming Viqual basic 3-4-5-6 for years 1993 - 2011
I am programming c and c++ in years 1996 - 2011

This Basic language is not the same (I speak about in core fundamental level) , comparing with other basics.

So many years in all basic languages the semicolon ";" used as no return charachter and we used it in all file functions and string functions.

Is like if you don't put "\n" in c++

I don't translate my game from c++ , I write it from the beginning in Darkbasic , but the main engine was written in c++ , and I will copy and paste ideas from there , I have wrote whole angine from scratch



I put my variables in a function and the game was run
I didn't put my data types in a function but I #include them at the top of my main file and the game run so far.

When I tried to put my data types in function I got error.
But when I included as external file at the top of main source file
the game worked well.

So I understand now , variables can be called(declared) at the beginning of the main source file or from function.

And types can be (declared) indluded with #include function or put on the top of the main source code file.

I will use this kind of preperation of code , that worked.
Takis76
21
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 27th Jan 2011 19:11
I say about the IDE , do you remember the old IDE , how many times you saved your source code and then after you load , all code was disappear.

I have lost thousands lines of code.
The old IDE cost me a whole game destruction.
I just saved all and when loaded all back , I had empty .dba files
a work of 2 years disappeared with one save.

Even .bak files was destroyed.

But these are serious problems of a good programming language...
Takis76
21
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 27th Jan 2011 19:27 Edited at: 27th Jan 2011 19:33
@Van B

Quote: "
I guess I'll just go back to my single source file projects and leave you guys to it, happy obfuscation.
"


You are the moderator , you are programmer and are you programming in a single huge file?
Is this a good advice from an experienced programmer to others?

If you programming in one single file , then your code organization is false , all programmers have multiple small files , and don't get confused where the funtions are!!

And you say about my obfuscation?
So why IDEs supports multiple source files?

You are spending 1 hour in programming and 2 hours in scrolling...


And something else , you are in danger to loose all your code from old IDE magic code disappearance....
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 27th Jan 2011 23:35
I haven't lost any code in about.... 3 years now - as long as you update the old IDE (sorry, no idea where the IDE update is).

But my point is that you cannot take standard coding principles from C++ and apply them to DBPro, DBPro is very heavily geared towards straightforward game programming. You can't even apply other programming techniques to game programming, not if you plan on finishing projects. Whenever I try and over-think a DBPro project, it get's caught in procrastination - I prefer to make quick prototypes and work from that. I don't work the same way in other languages, it just seems to be productive for me to work organically with DBPro. Not trying to blow my own trumpet, but I've written a snowboarding game, an RTS, a shooter, platformer, puzzle games, a sudoku game, an arkanoid game... I'm not saying everyone should work with 1 huge source file, but I think I have enough experience to be able to say what works for me.

Your kinda in an unusual position, a bit like devolution - because most people would see DBPro as a stepping stone to C++, maybe taking DarkGDK on and going from there. If you have C++ experience already, I don't understand why you don't use DarkGDK, which is DBPro's engine for C++, most of the same commands, but with C++. I would switch to DarkGDK myself, if it wasn't for AppGameKit - I would rather try and make multi-platform games and hit a bigger audience. I will probably code in AppGameKit very differently to how I work in DBPro - I don't think AppGameKit will be quite as forgiving as DBPro when it comes to code layout.

Health, Ammo, and bacon and eggs!
BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 28th Jan 2011 02:45 Edited at: 28th Jan 2011 02:48
@Takis76 - DBPro is an great fast prototyping language that can do some amazing things...so I hope you will stick with it.
Or, use DarkGDK, then you can still use C++ that you are used to and still get the advantage of using the DarkGDK graphics library - Sweet!

You will NEVER lose a programming project if you will learn to rev your software saves with version numbers
source-1.dba
source-2.dba, etc.
Save a new version after making significant changes or every day or so if you feel like it.

My current project is at rev# 88.
In 35 years of programming I have never lost a whole project.
Every programmer should rev their source code so that a bad save for whatever reason NEVER trashes all your source code.
It just makes sense.
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 28th Jan 2011 06:12
@ Takis76:

Yes, it's great advice. I do what VanB does too. One source code is easier to work with than multiple sources. It's easy to navigate with our modern IDEs ability to jump to any function or label. And most have the ability to look at different areas of code at the same time like BlueIDE allows 4 different sections at once (see attached image).

I also do what BillR mentioned and save new changes under different file numbers. My current project is at #29... if that one goes horribly wrong there's #28 but Indigo and BlueIDE don't eat code so there's no worries.

Login to post a reply

Server time is: 2026-07-16 12:19:35
Your offset time is: 2026-07-16 12:19:35