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.

Newcomers DBPro Corner / My Programming Journy

Author
Message
iSilver
13
Years of Service
User Offline
Joined: 20th Feb 2011
Location:
Posted: 30th Mar 2011 20:20
I posted this reply over at devmaster.net in response to someone who wants to do more game programming. I figured it might inspire a few lurkers here, so here goes:



-------------------------------------------
I think it's time for you to slowly progress to bigger stuff! The TLDR version of my answer would be that you already know some coding basics, so learn C++ and try DarkGDK (free 3D engine, sort of a wrapper for DirectX) and the Fulcrum wrapper for DarkGDK (wrapper for NVidia PhysX specifically written for DarkGDK).

As a young kid I fantasized about game design and cried foul about how the industry keeps releasing the same game types over and over (fps shooter), and leaving other great genres to die instead of innovating them if they're not "popular" (when was the last time you saw a Star Control or Sim City-like game?). I've had knowledge of coding since I was young, but I'd never written a 3D game. These are basically the things I knew about programming:

- How code works - principle of each line of code is a command, code is read line-by-line and does stuff, each line separated by a ; or just an enter

- How to use Variables to simulate real-world things through programming by turning it into math - so if I'm writing a bank program to show a user how much money there is in a bank account, I can make a variable called BALANCE and make it store/represent the balance in the bank account, change the BALANCE whenever the user deposits or withdraws money by adding or subtracting from BALANCE, then show what's inside of the BALANCE variable to the user when asked

- if... then... statements and other decision statements - how a computer makes a decision of what to do by comparing variables to other variables or pre-determined numbers (or strings or other things).

- Loops, GOTO statements, Functions - Computers can repeat groups of lines of code (commands) in different ways "automagically", often based on those decisions statements mentioned above.

- Arrays - groups of variables, imagine trying to tell the computer the names of 10 kids in a class, you can do something like NAMES[10] = { "Peter", "James", "Tessa", ....... }; And then you can refer to each one by number like print NAMES[1]; or use a for.. loop mentioned above to go through and print out everyone's name by using a temporary variable i as in print NAMES[i]; and then just changing the value of i.

- Pointers & References - Memory Addresses - a bit harder to explain, took me the longest to learn, still struggle a bit sometimes due to call convention and casting in Object Oriented programming... which brings me to ....

- Object Oriented Programming - Everything we see in our world is an object. If code is just a bunch of variable names and math, why can't we define and simulate each object as a group of variables? This is a world changing philosophy that makes things much easier and cleaner to program.

Anyway, after knowing those principles, I learned that all languages are pretty much the same, especially a generation of languages from BASIC to C/C++, to Pascal, to Java/Javascript, PHP, Perl. If you know one, then you can learn the others easily - just a switch in how the commands are written/formatted. BASIC forces you to make commands in separate lines while C++, Pascal, and Java just ask for a semi-colon, for example. I ended up sticking with C++ because it's powerful and flexible, although a bit more complex to design for sometimes because of pointers and objects.

I'd done many projects as a kid, but never a 3D game. I made BASIC text games with music, a text character graphics (ASCII Graphics) fighting game in BASIC, some Perl web programming, and eventually a Warcraft 3 map that was DOTA-like called 3 Corridors: Legends that was played by about 100 players daily (before DOTA came out), but still no 3D game from scratch.

Recently, I hunkered down and decided I was going to write one of my many dream games. With basic knowledge of C++ and help of the internet, I set out to find a game engine or 3D engine. Here are some of the things I looked at throughout my lifetime

- Irrlicht, Ogre 3D - syntax was a bit much for my beginner steps
- Unity - Didn't feel like real programming and you had to learn THEIR philosophy of doing things for everything you do, so there was still a learning curve and it wouldn't give you the control needed unless you learned even more stuff. May as well write my own code
- iPhone SDK and Objective C - Just, WOW. Looks so simple, but 2 hours of tutorials and I didn't understand how to write more stuff at all. It will be a lot easier when I'm more comfortable with programming and taking a huge learning leap into Objective C.
- DarkBASIC and later DarkGDK - Just what I was looking for! DarkBASIC is a beginner's dream, but I figured my knowledge of C++ would help give more power and control to my programs. DarkGDK was exactly what I needed, because it basically just provides me with simple C commands to make things appear on the screen! It's as simple as dbLoadObject ( 1, "meshfilename.x" ); and then moving it around with dbObjectPosition ()... dead simple! Along with that, I learned that I could use Fulcrum Physics (a wrapper for NVidia PhysX which gives you a bit of the power of PhysX, and a very simple interface) to provide me with yet more dead-simple commands that can help my objects interact with each other.

Anyway, that's my programming life story. If you don't know some of the programming concepts above, you can always google it - TONS of tutorials out there on each subject. I usually read a few and then I can understand the basics. Dark GDK is a breeze and comes with instructions and examples on how to use its commands, as does Fulcrum.

What I've got so far is a pair of spaceships flying around in space controlled by keyboard. If they collide into each other Fulcrum does its job and they get knocked around realistically. When I press Space one of them shoots a ball that also behaves according to physics and knocks around whatever it runs into. Right now, I'm finally writing my engine according to an Object Oriented Game Design article in the articles section of this site.

I wish you good luck on your journey! Tons of help all around, and I've talked way too much


Thanks for your time,

Flamesilver



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

PS: If anyone read to the end, can you please drop a reply?
Lucas Tiridath
AGK Developer
16
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 31st Mar 2011 00:16
Hi. Nice post, always interesting to see how people got in to programming and as you say, it will hopefully give some confidence to people just starting out.

Have to say I was the other way around from you. I started with DBP and worked down rather than starting with lower level languages and working up.

Maybe a little more detail on how you actually got to grips with all those principles though? For a lot of newcomers to programming, they may be the major stumbling block rather than the conversion to DBP from another language.

Anyhow as I say, nice post.
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 31st Mar 2011 16:16
Lawl. I just don't understand why use DarkGDK, while DBPro is easier and as powerful as DGDK, still, more supported by TGC and it's users (more plug-ins). I was always interested of game making, so... here's my small 'journey'

-|Macromedia Fusion / Game - Gothic I & II (LOL, that was weak )
-|LUA / Game - None started, got bored with it very fast
-|C lite / Game - None started... Althrought i think it was very nice programming language i've met with
-|C++ - None started. DOH! Tried to make something but... lol. I hate 'void'
-|SDLBasic - Used it to make games on PSP, but it wasn't any powerful, also it was SLOW and outdated.
-|DarkBasic Pro - Very cool as i find it now. The only one i have really learned.


Ofcourse i am also learing Pascal (bleh, but necessary). Had a try with Java and something other i don't remember...

Also i used Click game makers, such as:

Game Maker 7 (or something like that)
Multimedia Fusion 2 (It was good )
RPG Maker 2003 (Nice too, but too weak as for me)

The last one is some kind of real past for me. Used to be long forums user, but... how long could i sit on Clicks?

Much of my friends who used RM 2003 now started to leave it, new generation comes on it i believe. So... Yeah. I am the only one from my whole family and friends whos interested in coding Kinda pisses me off, but atleast i made my twin brother learn some 3d modelling !

WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 11th Apr 2011 06:13
@iSilver
I stumbled across this and it made me smile. Thanks for that.

I started out in the 80's sometime long ago just after the dinosaurs left. ZX81, Vic-20, Spectrum rubber key 48k. Taught myself programming from magazines like Your Sinclair, etc(after hours or days fixing typos). The Speccy I learned machine code. Moved onto the Atari ST and it's 68000 processor and bought DevPac. Also started with C then. Tried STOS and GFA Basic (GFA was much better) and when I got my Amiga 1200 (with and 030 upgrade and extra 32Mb memory) I bought DevPac and C for it. I tried AMOS on that too. All along I've preferred the power and flexibility of C and Assembler. I even wrote tons of libs for AMOS in those days. They were the days when coders struggled on their own or disassembling someone elses intro to fathom how they did it and still didn't get it.

Programming is maths and maths is making stuff do more stuff. And making stuff do stuff to other stuff makes it work.

The basic language is nowadays a powerful tool compared to them olden days. But still I stick with C/C++. C/C++ lacks the speed of hard coded machine code which I miss.

I read every line of your little insight too.

Warning! May contain Nuts!

Login to post a reply

Server time is: 2024-11-16 20:02:08
Your offset time is: 2024-11-16 20:02:08