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 / Ortu's framework and build utilities - A fully packaged DBPro environment

Author
Message
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 25th Nov 2017 06:24 Edited at: 25th Nov 2017 06:39
https://github.com/Ortu-/DBProject

Ok, I've mentioned this thing a number of times and have been meaning to clean it up a bit and post it for a long time. Well... it's not super polished, and it's definitely still WIP with lot's of room for improvement, but here's a start.

It's a lot to dig through, and I intend to make some follow up posts covering the basics of the framework and modules, but I wanted to go ahead and get this initial post up.

======================
--- GIT / Getting the files ---
======================

First, for those not familiar with git / github: go get familiar with it

The preferred method of working with a github project is to fork it into your own repository, then clone your fork to your PC. Getting the files by cloning allows you to push changes back up, contributing to the main project if you wish.

If you don't want to mess with all of that, you can just download a .zip and go, but you will be working with a static offline copy and won't easily be able to get or give updates.



======================
--- Editor ---
======================

Second, this system utilizes a custom pre-processor which enables a non-standard syntax and commands. I use a .dbx file extension to denote when a file uses these commands or syntax, but the system will handle them in a .dba file just the same, and it is of course fine to just use plain old dark basic syntax in either .dbx or .dba

I recommend that you do not bother with the dbpro IDE (you won't be able to compile from it anyway) and instead use a modern, code focused text editor. I prefer Sublime Text 3, but there are a number of good applications out there these days.

I have included a language file for dbpro and my color theme in the 'redist' folder



======================
--- Dependancies / Redistributables ---
======================

Redist Folder:

Third, the build system uses the Microsoft Synchronization Framework for keeping the various scopes (debug, test, production, etc) in sync with source. This requires .net and the sync framework redistributables located in the 'redist' folder.

I've also included the directx 9.0c offline installer that has gotten DBpro working for me on a dozen systems from XP to 10, as well as a few other odds and ends.

DBPro Folder:

In here you will find a full, usable install of vanilla/official DBPro U77 ready to go. So many people come through here with trouble trying to get the open source version working or to get their old installation reinstalled or moved to a new machine. It includes many of the popular free community plugins. It does not include any of the paid plugins.

It also has a second copy of this version with Rudolpho's 9Ex installed over it.

You can reference your own dbpro installations as well.

The build manager lets you flip between compilers easily with a simple drop down select box. This is useful for compiling against different update versions of DBpro or with different installed plugins.

======================
--- Templates, Projects, and Scopes ---
======================

Templates are 'project archetypes'. They are generalized and contain nothing specific to any given project. These could be as basic as '2d games', '3d games', or more genre specific such as '2d platformer', '3d FPS', '3d RPG' and so on.

Projects are started from Templates. This is as simple as copying a template folder to the Projects folder, renaming it, and updating the project.json file.



textEditor will specify the default application to use when opening log files from the build manager. I'd recommend changing it to something other than notepad, I use Sublime of course

You must provide at least one compiler, you can point it to your own dbpro installation or update the default DBProject compilers paths to where ever you extracted DBProject to.

You must also define at least one scope. You can name / rename them however you wish. You can also define the opening / closing tags however you wish.

I like to have at least a development scope and a production scope. The production scope drops all of the extra debugging and logging processes (resulting in performance gain). By defining scoped content with tags, you can create different build versions without having to maintain separate code bases.

The Default template / Demo project is a 3rd Person template which uses Evolved's Advanced Lighting.

======================
--- Source and Publish ---
======================

Always work from src - do not edit publish.

Changes made to src are propagated to publish by the build manager. Changes made to the code in publish will just get overwritten by src. Changes made to resources in publish will break the synchronization state, this can be fixed, but even better: Always work from src - do not edit publish.

Each scope will have a directory in publish, within these are a compile folder which is used internally and can mostly be ignored, and a release folder which is your final distributable application.

======================
--- Build Manager ---
======================

DBProject.exe

This is where you will run your compile.

Load a project, by browsing/selecting the project folder:





======================

That's it for tonight's 'Getting Started'. I'll cover some of the actual framework in the next few days. Those that have been following my Sulium game project will be familiar with much of it.

Feel free to question, comment, and contribute.

Enjoy,
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
CumQuaT
AGK Master
13
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 25th Nov 2017 12:28
This looks great!

Does it at all fix the "maximum lines of code" glitch in the original DBP? I keep hitting it
Help out a fellow dev! Download and rate my games! They're free!

Wizzed Off! - (Android) (iOS)
God of Thunder - (Android) (iOS)
Extreme Lawn Mowing - (Android) (iOS)
Drunken Heroes - (Android) (iOS)

And you can get Fluffy Knuckleduster merchandise at our new store!
Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 25th Nov 2017 14:44
Looks like a highly remarkable aid for getting things setup, configured and done. Lovely work; DBP development just got easier.
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 25th Nov 2017 15:47
Quote: "This looks great!

Does it at all fix the "maximum lines of code" glitch in the original DBP? I keep hitting it "


It doesn't change the compiler at all, only what gets passed to the compiler. It does strip out comments and whitespace, I'm not sure if those affect compiler line limits or not to begin with though.

Doesn't the 9Ex compiler resolve this?
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
CumQuaT
AGK Master
13
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 26th Nov 2017 08:16
I thought it did, but then ran into it again at another line limit
Help out a fellow dev! Download and rate my games! They're free!

Wizzed Off! - (Android) (iOS)
God of Thunder - (Android) (iOS)
Extreme Lawn Mowing - (Android) (iOS)
Drunken Heroes - (Android) (iOS)

And you can get Fluffy Knuckleduster merchandise at our new store!
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 28th Nov 2017 05:03 Edited at: 28th Nov 2017 05:44
==========================
--- Pre-processor commands ---
==========================

The initial and primary purpose for creating the pre-processor was to provide content scoping / environment scoping via scope opening and closing tags:

<? //this is an opening tag
//content in here is only included in the compiled source when building for this environment
?> //this is a closing tag

simple enough right?

---

This next lead to some other simple text editing, such as using [] for arrays.

someFunction(myArray[tIndex].someAttribute)

becomes on compile:

someFunction(myArray(tIndex).someAttribute)

---

Then normalization of native dbpro commands to always use ()

typically commands which return a value use (), commands which do not return a value do not use ():



For the most part, I've stopped using this feature, because all the @ symbols started to feel too noisy, but I've left the functionality in.

---

Next in order for the pre-processor to properly handle references and dependencies across multiple source files, I implemented a $require command:

$require myRelativePathFilename.dbx
$require myOtherBasicSource.dba

which is just used the same as you would (and instead of) #include

---

Some more array fun: $push()

myArray[].$push(myVariable)

will be converted to:

array insert at bottom myArray()
myArray() = myVariable

also valid:

dim myUDTarray[] as myUDT

myVariable as myUDT
myVariable.propA = "foo"
myVariable.propB.attrC = 123

myUDTarray[].$push(myVariable)

---

Lastly, $construct and $new:

My framework uses a sort of loose object oriented by convention approach. This is of course not an actual implementation of objects or classes, mostly it is a "consistent" method of naming organization.

I'll go more into this later when discussion the framework, but to address these pre-processor commands, I came up against a memory leak involving strings in UDTs which these commands provide a quick shorthand method to resolve.



now watch the memory usage go up and up and up till crash.

However, the following does not suffer from the memory leak:



thus, $construct and $new:



which is converted to:




eliminating the need for a bunch of globals, and saving some memory and a ton of keystrokes on larger classes.

--------------

We'll that's the pre-processor in a nutshell. feel free to request additional features for it, though I can't guarantee a timeline on it
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 28th Nov 2017 07:23 Edited at: 28th Nov 2017 07:24
I recommend this for DBPro toolmaker status.
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 28th Nov 2017 13:07
Oh thanks man, glad you like it!
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Bored of the Rings
User Banned
Posted: 29th Nov 2017 08:51
thanks for this, this looks interesting. I use both DBPro (Rudolpho's 9EX version) and C+ for my tools and will download/check out.
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 1st Dec 2017 02:05
UPDATE:

I've just pushed an update to the github repo which fixes a crash bug in the file sync utility
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 5th Dec 2017 21:43
Good job on getting that toolmaker badge.
zero32
7
Years of Service
User Offline
Joined: 28th Jul 2016
Location:
Posted: 13th Dec 2017 08:29
i just downloaded it. it may take some time until i get used to it, but i like the features.

here is a little bug report:
if i run DBProject.exe, hit load project and then click on cancel, the tool crashes.

i always miss these kind of bugs in my own programms
"It is only slightly easier than changing all sugar in a cake into stevia after it has already been baked" -Bisqwit
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 14th Dec 2017 06:08
Quote: "i just downloaded it. it may take some time until i get used to it, but i like the features.

here is a little bug report:
if i run DBProject.exe, hit load project and then click on cancel, the tool crashes.

i always miss these kind of bugs in my own programms "


Ah whoops! good catch. I'll admit it isn't the most robust app I've ever put together It was mostly just slapped together for my own needs and it does need a pass at giving it some polish and proper error handling.

I've pushed an update to the repo to fix this.

Output of the filesync had been temporarily removed from being included in the build log, this has been restored on this update as well.
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 14th Dec 2017 19:57
Ortu wrote: "It was mostly just slapped together for my own needs and it does need a pass at giving it some polish and proper error handling."

Making things for other people forces one to go that extra mile not merely for quality's sake but the sake of one's own reputation.
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 4th Feb 2018 07:26 Edited at: 4th Feb 2018 07:28
The IDE will now correctly show the version as 1.077

It was previously displaying as 1.054 due to an outdated dbp_config.dll - the help files remain outdated and do not reflect all of the changes listed in the VersionHistory patch notes.

I've also included the updated version of Synergy Editor in the editor folder which has improved compatibility for windows 10
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Zep
21
Years of Service
User Offline
Joined: 31st Aug 2002
Location: From PA, USA. Currently reside in Hanoi, Vietnam
Posted: 4th Feb 2018 13:48
Quote: "The IDE will now correctly show the version as 1.077

It was previously displaying as 1.054 due to an outdated dbp_config.dll - the help files remain outdated and do not reflect all of the changes listed in the VersionHistory patch notes.

I've also included the updated version of Synergy Editor in the editor folder which has improved compatibility for windows 10"


So, The Online Version will work with Windows XP? Does it have all the plugin keys too?
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 4th Feb 2018 16:23 Edited at: 4th Feb 2018 16:24
The Online version is the original full paid version of DBPro and I have used it on XP yes.

It includes some of the common free plugins, it does not include any paid plugins.

DBPro is now fully open source and basically abandonware at this point, so I feel ok with distributing this portable copy.

A few of the paid pugins have also been made freely available on various threads here on the forums, but many of them have not, I would not feel ok distributing these even if I had all of them.

Some of the paid plugins may be included with the opensource version, you could copy those and their activation certs from that version to this one and they should work
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 5th Mar 2018 11:20
HI

Your editor is very interesting. Do you think we can get some of its features in AppGameKit ?
For example the terrain modeling ?


AGK2 tier1 - http://www.dracaena-studio.com
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 5th Mar 2018 16:32
The terrain modeling itself is part of Evolved's AdvancedLighting, my editor adds some controls and interface over that to access and manage its functionality.

I have been poking around at converting my framework to AppGameKit here and there, which at some point would require a conversion of the editor as well. It looks like there are a couple of different terrain projects in the works over there which i am watching with much interest as a good terrain system is one of my requirements before I can consider really and truly switching.

For now I have converted most of the low level core and am in the middle of the UI module, basically everything needed for simple 2d apps. After that at some point I'll start working on the 3d related modules, integrating with the Shader Pack in place of AdvLighting.

This is all fairly back burner though for now until the short game demo I am currently working on is complete.
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.

Login to post a reply

Server time is: 2024-04-19 02:08:14
Your offset time is: 2024-04-19 02:08:14