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 / RTS Source Code in DBP

Author
Message
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 4th Feb 2013 10:52 Edited at: 9th Feb 2013 15:54
Hey guys,

No one ever checks the WIP board, so I'm posting this here.

I've been working on an RTS for the past few months and would like to release the source code for it.


Why?

I've come to realize that DBP is not suitable for a game of this scale. I'm re-writing the game in C++, and the DBP code has become meaningless to me, so I decided to just release it. This is also my very last proper project I'll make in DBP, and I wanted to thank you all for being a great community and providing help whenever I needed it by giving something in return.


What's in it?

"Everything but documentation". Well, the comments in the code are very good, so understanding the easier parts will be no problem.

-Custom script engine
-In-game console (press <insert>
-GUI framework, integrated into the scripting engine
-Unit handling
-3D Effects
-Pathfinding
-Other stuff that might be useful

Everything is tied in with the scripting engine.


Why would I need this?

The code is split up into a lot of separate, self-contained files. You can copy any one of them into your own project without much fuss and use it yourself.

A very useful thing I'm using is an in-game console and script engine. You can strip the game from everything except for that part, and then build your own DBP game from it for example.


Give me!

Source code: https://bitbucket.org/TheComet/ponycraft-prototype/src

You can manually download it, or use git and clone the repository. You may even make changes to the code and submit them.



If you want a binary release, you can download those here:

32-bit: http://0xff.avxc.net/PonyCraft_Prototype/PonyCraft_Prototype_x86.exe
64-bit: http://0xff.avxc.net/PonyCraft_Prototype/PonyCraft_Prototype_x64.exe


Plugins

You will need the following free plugins in order to run this.

-Matrix1 Utils
-Sparky's Collision
-ImageKit V2
-Advanced2D
-IA::Astar pathfinding

You will also need Multijoy, but it's a paid plugin. No worries, you can just add this function to the program:



If it doesn't run, please let me know!

TheComet

http://blankflankstudios.tumblr.com/
"ZIP files are such a retarded format!" - Phaelax
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 4th Feb 2013 11:51 Edited at: 4th Feb 2013 12:01
TheComet - Wow, can I add this to my repository along with a link back here? as well as inserting the information above to the repository file description...

Thanks for sharing this, if I get the chance I may have a peek

I will be announcing my repository later tonight

EDIT

Nevermind, I did not realise it was an SVN site... but if there was a way to archive into a single zip/rar file it would be handy it I could store it away

TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 4th Feb 2013 12:28
Quote: "Nevermind, I did not realise it was an SVN site... but if there was a way to archive into a single zip/rar file it would be handy it I could store it away "


You can download the entire project. There's a "download" link on the overview page : https://bitbucket.org/TheComet/ponycraft-prototype/overview. I have no problem if you wish to upload it and add it to your database.

TheComet

http://blankflankstudios.tumblr.com/
"ZIP files are such a retarded format!" - Phaelax
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 4th Feb 2013 13:02
Ah, I see it was to the right, I was not looking there, just clicked the download tab across the top and it said no downloads... kind of odd lol

I have uploaded it to the repository, and added the information from above to the description

Posted to the TGC Forum Repository here

Woo, the first of many deposits

Jamez0r
11
Years of Service
User Offline
Joined: 30th Jan 2013
Location:
Posted: 4th Feb 2013 14:29
Hey Comet - I'm curious, at what point did you realize that you needed to switch to C++? As you probably noticed in my other thread, I'm in a similar situation. Was it a speed issue for you, or utilities (plugins, etc) issue, or compatibility?

Have you decided what API you're going to use? I've been looking into what is available for 2D games and haven't come to a conclusion on what would be the "best". Seems like C#/Visual Studio/XNA is popular. Do you plan on writing the game engine from the ground-up or do you know of a good 2D game engine / API / plugin library that have pre-built commands like DBP has for sprites?

Best of luck on your new journey
Sergey K
20
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 4th Feb 2013 15:14
personally i watched that project comming along from ZERO
TheComet did really good job on this one! too bad he found out at that late stage that DBP is not suitable for this kind of project.

I consider this source code very valuable! you can learn a lot out of it.
it has Scripting system, perfect collision, animation, bones, music, GUI, sounds, Effects and more!.
basicly everything that a good game needs to have.

Good luck with your future PonyCraft project on new engine, and i hope to see some results quick as possible

Advanced Updater for your games!
Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 4th Feb 2013 17:55
So how's the C++ version going; a lot more smoothly I guess. Class inheritance, delegates and the works must be really comfortable; but is the workflow as quick as with DBP?

TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 4th Feb 2013 18:19 Edited at: 4th Feb 2013 18:19
@ MrV - Thanks!

@ Jamez0r - The choice was based on a combination of the things you mentioned (speed, compatibility, utilities). Speed was the deciding factor, I could have lived with less support for other things. And it wasn't even the rendering speed, it was the processing speed of everything. It took just as long to process the game as it took to render a frame (stress test with 100 units). Perhaps that's a sign of poor code (you can check the source), but I knew that even if I managed to double or triple the speed, most of the planned mechanics would be too much for DBP to handle.

I've looked into a few and have settled on Ogre3D. It's the most supported, still being actively developed on, and pretty well documented.

For 2D games in C++ I recommend looking at SMFL.

I was looking for a complete RTS engine, and a few exist (best known is "SpringRTS"), but from what I could find out about them, they aren't as dynamic as I hoped they'd be. PonyCraft is a hybrid between an RTS and RPG, and has other special needs that can only be programmed directly.

So I had the choice to either learn how SpringRTS works internally, or I had the choice to just learn how to use a graphics engine, which would benefit me far more in the long run.

So will I be building it "from the ground up"? That's a tough question to answer in C++, because the defining level of "the ground up" would be to start with assembler. I will certainly be programming most of it using existing libraries.

Thank you!

@ Sergey K - Thanks for the very kind words.

@ Chris Tate - A tough question to answer. The workflow is very different, and since I'm not yet accustomed to most of Ogre3D's power, it's hard to judge. Some things are much, much faster workflow-wise. I was able to get an XML parser up and running within 10 minutes (RapidXML). 3D pathfinding with navigation meshes? No problem! Looking for a way to project decals onto a terrain? Ogre has you covered!

As to the structure, it's far more complex and takes a while to get your head wrapped around the different design patterns (Listeners, factories, singletons, inheritance etc.) and the big problem with the language is that it allows you to do anything - including doing everything wrong.

I'm happy with the decision though, in the long run everything will turn out. I may still prototype things in DBP just because it's faster to set up, but that's it.

TheComet

http://blankflankstudios.tumblr.com/
"ZIP files are such a retarded format!" - Phaelax
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 4th Feb 2013 18:55
Quote: "I was looking for a complete RTS engine, and a few exist (best known is "SpringRTS"),"


Have you looked at Glest or ORTS?

"You're not going crazy. You're going sane in a crazy world!" ~Tick
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 5th Feb 2013 19:43
Glest looks very promising, I might actually derive some of my code from it. I tried out the game and almost all of the mechanics need some serious improvement. Thanks for the suggestion, I didn't know about that until just now.

TheComet

http://blankflankstudios.tumblr.com/
"ZIP files are such a retarded format!" - Phaelax
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 6th Feb 2013 04:10
I did a lot of research on existing RTS engines years ago when I started work on one. There's a few other links in my old thread, but most of it is probably out of date projects.

"You're not going crazy. You're going sane in a crazy world!" ~Tick
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 6th Feb 2013 19:37
Wow, that's a whole bunch of files you've got there! I thought the DBP editor's tab-scroller had gotten stuck in an infinite loop! And it crashes when I try to do anything (are there any good editors for DBP?)

Good luck, it's a pain that you have to discard so much work but you'll do even better next time! Maybe it is a release to be free from that old code after all.

^ That's what she said.
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 9th Feb 2013 06:07
Comet,
How did you generate a 64 bit exe of ponycraft?


[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 9th Feb 2013 16:02 Edited at: 9th Feb 2013 16:06
@all - The first post is updated with links to the required plugins.

Quote: "Wow, that's a whole bunch of files you've got there! I thought the DBP editor's tab-scroller had gotten stuck in an infinite loop! And it crashes when I try to do anything (are there any good editors for DBP?)"


Yeah, I don't think Lee expected a crazy guy to write 25'000 lines of code.

The editor "Indigo" handled it with no problems, and is overall a very feature-full editor. You should check it out!

Quote: "Good luck, it's a pain that you have to discard so much work but you'll do even better next time! Maybe it is a release to be free from that old code after all. "


Thanks!

Quote: "Comet,
How did you generate a 64 bit exe of ponycraft?"


I'm using Sergey K's update system. The exe you download is exported from his program. When you run it, it contacts a server and downloads the latest game files automatically (saves having to download updates manually).

So no, there is no 64-bit DBP executable, but his system runs on 32-bit or 64-bit.

TheComet

http://blankflankstudios.tumblr.com/
"ZIP files are such a retarded format!" - Phaelax
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 10th Feb 2013 01:40
Quote: "So no, there is no 64-bit DBP executable"

Tease!

"You're not going crazy. You're going sane in a crazy world!" ~Tick

Login to post a reply

Server time is: 2024-05-04 07:56:40
Your offset time is: 2024-05-04 07:56:40