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.

Dark GDK / Thinking about learning Dark GDK/C++

Author
Message
Kryogenik
15
Years of Service
User Offline
Joined: 22nd Sep 2009
Location: Heidelberg, Germany
Posted: 20th Jun 2010 20:02
Hey guys, this is my first post in this board (at least I think it is). I was thinking about learning C++ sometime in the future(at the very least until I finish my Zombie FPS Wip) since most games are made with it (or at least thats what wikipedia told me). I'm sure there are pages worth of them, but what are the differences between dbpro and c++? I'll probably use DarkGDK to help me learn it and to get started. Also, how does the 3d stuff work in C++? I heard its an object oriented language, but what does that mean? Does that mean you can load models as objects and number them like in DBPro. I used to use something called game maker which defined how an object would behave and would "instance" them wherever, is that how it works? Can you have plugins in C++. I could keep going on, but basically, I want to learn C++ sometime. How would I learn it, though? Anybody know some good tutorials leaning towards game dev for C++? I know I could just use the DBPro commands, but then I would just have to learn how to do it in C++ later. Thanks

Codesurge is so awesome, thanks Hyrichter.
_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 20th Jun 2010 21:06 Edited at: 20th Jun 2010 21:53
A while back I had to make the same decision. Move from (Dark)Basic to C++ & DarkGDK or not?
Well, now I'm very happy about having moved to DarkGDK. I takes some time but you'll begin to understand games and programming a lot better. What scared me at first was the 'look' (syntax) of C++ but once you start to learn how to read the code properly it all makes sense and you feel like possibilities are endless I think that's the interesting part about programming in general: being creative in such a strictly logical thing!
Plus when you use C++ you have access to lots and lots of great plugins/libraries. And if you come from DBPro and begin with using DarkGDK along with C++ there isn't really that much of a difference. You should also consider that C++ code runs faster in general. So since DarkGDK and DBPro are basically the same engine under the hood you have a speed advantage when using DarkGDK!
I hope this was helpful to you.

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
Bran flakes91093
16
Years of Service
User Offline
Joined: 13th Sep 2008
Location: Crazy Land
Posted: 20th Jun 2010 22:00
C++ is an awesome language to know.

DarkGDK, in essence, is basically the exact same thing as DBPro. All (most) functionality is incorporated with the prefix "db" i.e. "dbSync".

But just keep in mind that C++ has a lot more stuff to grasp hold of than you're used to, and things can get really technical, really fast. I would suggest learning how to write some console programs first (that's where most people start with C++). You may have trouble understanding some aspects at first, but don't get discouraged, you'll get it sooner or later.

Here's a great tutorial: http://cplusplus.com/doc/tutorial

“C++ : Where friends have access to your private members.”
-Gavin Russell Baker
Kryogenik
15
Years of Service
User Offline
Joined: 22nd Sep 2009
Location: Heidelberg, Germany
Posted: 20th Jun 2010 23:28
@Pauli Same here with the syntax. The semicolon after practically every command thing is weird. But besides that C++ sounds good from what you say with plugins and faster code, thanks for the response.
@Bran flakes91093 I actually did write some really simple console programs in the last hour. All I can do is put stuff in text get input and use variables. It was just a hello world tutorial pretty much. It told me what elseif was, something I saw Dark Coder rant about DBPro not having, and I'd say he's right, it looks too useful to not have. Thanks for the tutorial, looks like it covers a lot of stuff I'll put my wip on hold for a day or two to look at it, probably won't finish the tut. though Thanks for the response.

Codesurge is so awesome, thanks Hyrichter.
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 21st Jun 2010 00:00
Quote: "I heard its an object oriented language, but what does that mean?"


Its true that C++ supports object orientated programming(oop) but it does not force you to use it, like Java or C# does.
You should not have too much trouble just writing procedurally just like you do in DBPro. Whats great is that you can just learn oop and other C++ techniques at your own pace while you make games with GDK.

oop is a completely different way of programming and it will seem alien at first but its advantages are many.

Good luck.

Cuddle Bunniezzz 12
15
Years of Service
User Offline
Joined: 14th Jan 2009
Location: Buffalo, NY
Posted: 21st Jun 2010 01:39 Edited at: 21st Jun 2010 03:06
Well, C++ is difficult when you're first learning it (I had a butload of issues). But now 3 years later since my first "Hello World!" program; I'd say I'm at an intermediate to advanced level and I've been offer to proctor a college class at the local SUNY school.

What I do have to say about C++ is that it is the MOST versatile language out there. When someone asks me "What can you do with C++?", it's almost instant that I respond "WHAT CAN'T YOU DO WITH C++!!". An example of how C++ can easily kick DBPro's ass is that I showed a professor a program that I made with DarkGDK and the MySQL C API, simulating a MMO player's inventory, he was quite impressed (I think that is what got me the job offering). It may not sound that impressive, but once you figure out how to do it, you will feel very accomplished.


Well, if you're starting out with C++, I'd suggest this book for starters:
http://www.amazon.com/Beginning-Through-Game-Programming-Second/dp/1598633600/ref=sr_1_1?ie=UTF8&s=books&qid=1277072749&sr=8-1

It's a really good C++ book. When I saw that Borders had a copy of it in their programming section, it would be gone in about a week.

If you want to get started with DarkGDK programming, all you really need to do is just read the first 5 chapters and you'll be good. But I suggest to read the whole thing. Chapter 6 talks about references, they were slightly confusing when I first learned about them, and then I read chapter 7, which talked about pointers, and then I was totally lost. And the last three chapters (8, 9, 10) talk about Object Oriented Programming. It will kinda confusing, but not as much as pointers and references were for me. You might not see the point of OOP at fist, but once you experiment, you'll see it's power. If you have issues with chapters 6 & 7, re-read them, don't re-do the examples, just re-read it. It will help you make sense out of how memory works in C++.


If you're looking for a second book, I'd HIGHLY recommend:
http://www.amazon.com/Beginners-Guide-Second-Herbert-Schildt/dp/0072232153/ref=sr_1_1?ie=UTF8&s=books&qid=1277073069&sr=1-1

The only thing I can say about this book is "Wow". It is really all-inclusive about C++. This book is so great, if you had to chose to buy one or the other, get this one (yet I suggest getting both if you can).

If read all of the first book that I recommended, read the last five chapters of this one (8 - 12). They are all about OOP, but it's a really good coverage of OOP. If you're also struggling with memory, check out chapter 4, and the parts of chapter 5 & 6 where Schildt talks about references and pointers with functions.

This book is also available with a spiral binding instead of a spine. Get the spiral one if you can, it's really nice, just be sure that you'll need to take extra care of it.

If you're feeling cheap and don't want to get a copy, there is a free online version of it, via MSDN:
http://msdn.microsoft.com/en-us/beginner/cc305129.aspx
You will need an "XPS" viewer though.


What I did with these two books is that I read all of the first one, then the last five chapters of the second, If you can afford both, I'd highly recommend doing it this way. One thing to keep in mind is that the book only covers console programs. I was really disappointed when I read the first one because I thought I would be creating actual visual games. Working with the console at first will seem, really, reeeally boring. But stick with it, it's vital that you learn this way.

Lastly, if you have any questions about C++, feel free to ask. We're here to help for a reason.

http://ref.darkgdk.us/ <- Online DarkGDK Refernece. More content coming soon.
Malboro Jones
14
Years of Service
User Offline
Joined: 10th Dec 2009
Location: Wales - UK
Posted: 23rd Jun 2010 14:41 Edited at: 23rd Jun 2010 14:42
Just to let you know Object Oriented Programming has absolutely no relevance to 3D models

Don't make war, make tea.
Kryogenik
15
Years of Service
User Offline
Joined: 22nd Sep 2009
Location: Heidelberg, Germany
Posted: 25th Jun 2010 20:25
@matty halewood what does procedurally mean? I'm a noob
@Cuddl Bunniezzz 12 "If you're feeling cheap... there is a free online version of it" Cool. I'll probably do that. Console programs are pretty boring, as I've learned in the C++ tutorial I looked at, but its teaching my a lot of stuff.
@Malboro Jones I should have realized that, oh well. How do you load a 3d model? Probably some ungodly abomination of a code-snippet is required that I won't understand even after a year of learning C++, but just for giggles, I want to look at it. Anybody know what it it?

Thanks for the responses, guys.

cout<<"I'm learning C++, and this is all I know \n"
jamesL
14
Years of Service
User Offline
Joined: 31st May 2010
Location:
Posted: 25th Jun 2010 21:25
"How do you load a 3d model?"

i haven't tried this, but I saw it on youtube

http://www.youtube.com/watch?v=KXfKVJGKKmo

http://www.youtube.com/watch?v=UTKGyLVmo4U&feature=related

source code
http://rapidshare.com/files/202379900/3d_animation_code.txt

collision library
http://forum.thegamecreators.com/?m=forum_view&t=74762&b=5
Isocadia
15
Years of Service
User Offline
Joined: 24th Jul 2009
Location:
Posted: 25th Jun 2010 21:34
you load a 3D model with....

dbLoadObject ( int ID, X,Y,Z ) or something xD. piece of a cake

Zeus, it's over. I DIVIDE YOU BY...uhh. damn what was the number again?
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: &lt;script&gt; alert(1); &lt;/script&gt;
Posted: 25th Jun 2010 22:42


that's it..

all you need is an object to show, if you dont have an object on your hard drive, you can replace dbLoadObject ( 1, "object name" ); with dbMakeObjectSphere ( 1, 10 ); 1 is the ID and 10 is the radius of the sphere

Login to post a reply

Server time is: 2024-11-19 20:40:37
Your offset time is: 2024-11-19 20:40:37