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.

Geek Culture / Fundamental Programming and the proper place to start

Author
Message
Darth Vader
20
Years of Service
User Offline
Joined: 10th May 2005
Location: Adelaide SA, I am the only DB user here!
Posted: 30th Nov 2009 04:30
Well I'm taking next year off for a few reasons, some of them include missing the enrollment date for Uni(), Mum is suspected of having a serious heart disease and I want to help her, and I'm planning on working a little more (I need to start some serious saving).

But this isn't a personal exposition of my life! Since I won't be studying I'm going to have a fair amount of free time on my hands, some of which will be used for gaming (got a lot of catch up to do!), developing healthier hobbies (Yes I do mean the great outdoors...) and programming... That's were the reason for this post comes in...

I've masqueraded behind this mask pretending to be able to program for too long, I really suck! So once again I turn to this fantastic community for help. I'm going to be improving my mathematical skills this coming year so I should be set in that area (I've found out that friends dad happens to have a PhD in maths! Forgot the exact field but he knows his stuff and has offered to help me anytime...) but what I wanted to ask you guys that are in on the know how is, exactly how am I supposed to start?

From what I've read there are certain concepts that seem to carry on from language to language, but I seem to be unaware of them! I've basically got to this level of understanding Dark Basic Pro form reading tutorials and small experiments, but I really have no core knowledge! I did complete an intro to IT earlier this year (And managed to achieve a fairly high HD - that's High Distinction not High Definition...) but that covered the basic's and a littel HTML and CSS (Which was challenging to say the least...).

So I was looking at getting the Hands on books, but I'm not sure about that. I mean I don't want something that will teach me in a tutorial way, as in it presents the concept in a very linear way. I want to understand programming in a more proficient way. Maybe Dark Basic Pro isn't the right language to start off with? Maybe this idea that's come into my head is nothing more then a completely ignorant and stupid idea of programming.

If anyone can understand this really long winded post and enlighten me I would be eternally grateful, I'm also available on MSN, Yahoo and Google talk or email if you want a more personal chat.

Thanks again guys (and girls ) I know I can trust this community!

PS to the MODS. Wasn't sure exactly were to put this so I went to geek culture, I'm sure you'll move it if I've got the wrong section! Programming talk seems to have disappeared!

hyrichter
21
Years of Service
User Offline
Joined: 15th Feb 2004
Location: Arizona
Posted: 30th Nov 2009 04:54
I'd personally suggest going through some beginner C/C++ tutorials. You'll learn about functions, loops, variables, data types, etc. It's good to have at least a very basic idea of what's going on at the CPU level so you can understand how to write good software.

I've really taken a liking to this guys articles on software, and here's one of my favorite articles about why it's good to understand the basics:

Back to Basics

Don't worry if you don't totally understand what the code in his examples is doing. Just try to understand what he's trying to get at.

And finally, here's a decent place for some beginner C/C++ tutorials:
C programming

CodeSurge
Version 1.0 finally released! Code your DBP projects in style. (And save the kittens!)
AndrewT
18
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 30th Nov 2009 04:59 Edited at: 30th Nov 2009 04:59
Personally, I would recommend starting with one of the following:

-C++

Pros: Free, hundreds of external libraries that cover everything from graphics to data encryption to networking, not as hard as most people make it out to be, can be used either procedurally or with OOP, widely used in game industry.

Cons: Massive feature list makes it incredibly difficult to truly "master", easy to run into memory leaks and what not if you're not sure what you're doing, somewhat steep learning curve if you've never programmed before.

-Java

Pros: Free, applets can be embedded in web pages, fairly easy to learn, includes hundreds of classes for things such as graphics.

Cons: Totally object-orientation can make it hard for beginners to know what's going on.

-BlitzMax

Pros: Direct access to OpenGL, includes crazy fast and flexible 2D library, can interface with raw C/C++, modular design makes it easy to reuse code, has object-oriented features such as methods, inheritance, etc.

Cons: Costs money ($80), doesn't include native 3D library or GUI library.

I would only recommend DBP if you only want to design 3D games. If you're interested in any other area of programming at all, I would suggest something else. DBP has a very specific target audience, and if that audience doesn't include you you will regret purchasing it.

i like orange
Dragon Knight
18
Years of Service
User Offline
Joined: 10th Jan 2007
Location: Newcastle
Posted: 30th Nov 2009 05:37
http://www.directxtutorial.com/ I bought it a while ago and created an engine from it, which i'm still using now .

Math is key for games programming. (2nd year games student), we're currently doing physics and gosh darn it there's allot of math involved.

Things you might want to look into:
matrices, differentiating, integration, shaders, making your own terrain system with LOD.

Quote: "but I really have no core knowledge"
that's a dirty lie! hehe if you can make a game in DBP you can make a game in any language. The basics are how to solve problems within games. Could you make a formation of troops? If yes then you're pretty far on.

E.g. make the troops form a circle using sin and cos.

Anyway I say dive on into c++, I still use DBP for building proto-types.

Xarshi
19
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 30th Nov 2009 12:03
Quote: "Math is key for games programming. (2nd year games student), we're currently doing physics and gosh darn it there's allot of math involved."

You are required to take a bit of math for computer science in general. That's why, a lot of the time, you'll see that computer scientists have majored in mathematics and or physics as well. Most if not all professors at the university I'm going to attend have this.

I recommend studying mathematics personally. Programming is the easy part. The mathematics is a little more challenging, but nothing difficult. And it is quite fun. Especially when you get to calculus and get to see where all these formulas come from. It's exciting.
Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 30th Nov 2009 12:31
The problem with maths and games is you have no idea what maths you need to know. You have a problem, and there is a mathematical solution, but you won't know what maths to apply, unless you knows the maths already! This makes it difficult to specifically learn the simpler bits of maths that are useful.

So let me give you a very simplified overview of the fields. I am not particular good at maths, but I do know just enough to make my life easier.

Problem: I want to figure out the distance between this bullet any my player.
Solution: Pythagoras theorem. Very simple, plugging numbers into a formula. Essentials for working out distances, which is essential throughout game programming, for checking if objects are in zones, or have collided etc.

Problem: I have a top down car game. I want to move the car at an angle of 30 degrees (to the vertical) a distance of 10.
Solution: You could use the DBP move command, rotating the car to face the right way, moving it, then rotating back to whichever way it was facing before. BUT .. the mathematical way of SOH CAH TOA (Sine rule) is the correct way. You can use these formulas in a simple way to derive moves in the X,Y axis you can easily plug into you game. Being able to move an object around in 3D space using angles is very useful.

There are more, but I can't think right now! That's a simple maths perspective on learning.

Darth Vader
20
Years of Service
User Offline
Joined: 10th May 2005
Location: Adelaide SA, I am the only DB user here!
Posted: 30th Nov 2009 12:46
Quote: "I'd personally suggest going through some beginner C/C++ tutorials. You'll learn about functions, loops, variables, data types, etc. It's good to have at least a very basic idea of what's going on at the CPU level so you can understand how to write good software."
Thanks hyrichter, but you sure delving straight into C++ isn't too tough for a newbie? That article looks very good!

Thanks AndrewT that pro con list helps a lot. I often struggle when it comes to choices, I get to stressed and can't weight the options! So it helps when someone provides a guiding hand

Dragon Knight DirectX tutorial website looks awesome! Like the guy actually says it's hard to find anything on DirectX! At least for me...

Quote: "I recommend studying mathematics personally. Programming is the easy part. The mathematics is a little more challenging, but nothing difficult. And it is quite fun. Especially when you get to calculus and get to see where all these formulas come from. It's exciting."
I'm not entirely sure why, but that statement motivates me! Thanks Xarshi!

Quote: "The problem with maths and games is you have no idea what maths you need to know. You have a problem, and there is a mathematical solution, but you won't know what maths to apply, unless you knows the maths already! This makes it difficult to specifically learn the simpler bits of maths that are useful."
That's my problem! I'm sure of it! I want to do something, but my simplistic logic behind how it should function never actually works! Maybe it's because I don't know the correct formula?

Thanks guys this is really beginning to give me a clearer picture. Can anyone recommended a good C++ book? I find it easier to read books then websites. I can always print I suppose.

Peter H
21
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 30th Nov 2009 13:19
Flowcharts anyone?

http://users.evtek.fi/~jaanah/IntroC/DBeech/3gl_flow.htm

One man, one lawnmower, plenty of angry groundhogs.
Darth Vader
20
Years of Service
User Offline
Joined: 10th May 2005
Location: Adelaide SA, I am the only DB user here!
Posted: 30th Nov 2009 15:57
Peter H that link doesn't work...

Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 30th Nov 2009 17:06
Quote: "I've masqueraded behind this mask"


Are you a Clapton fan by any chance?

"everyone forgets a semi-colon sometimes." - Phaelax
Darth Vader
20
Years of Service
User Offline
Joined: 10th May 2005
Location: Adelaide SA, I am the only DB user here!
Posted: 1st Dec 2009 10:56
Quote: "Are you a Clapton fan by any chance?"

No. Should I be?

Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 1st Dec 2009 11:39 Edited at: 1st Dec 2009 11:44
It all depends on what you want to program. Don't get a book on HTML or CSS unless you want to make web pages. It won't teach you how to write games.

C++ is a great language but it might be too hard as your "first" language. My recommendation is to buy a license for PureBasic and read Gary Willoughby's excellent book on it (it's now free).

Once you get a good handle on the funamentals you can branch out into more advanced topics like the Win32 API (natively supported by PureBasic) and GDI. A great book for that would be "Programming Windows" by Charles Petzold.

Once you've got a real grip on procedural programming the book "C++: The Core Language" will bridge the gap between procedural and object-oriented programming.

If you want to try C++ Programmer's Notepad is extremely lightweight, straightforward, and easy to use. You can get a C++ compiler for free using the MinGW compiler (GNU C++ for Windows). Heavy duty IDEs include Eclipse and NetBeans. I don't recommend a full IDE if you're just starting. You'll probably get blown away by all the features and buttons.

Peter H
21
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 1st Dec 2009 11:42 Edited at: 1st Dec 2009 11:44
Quote: "Peter H that link doesn't work..."

really? still works for me...

well here's another (poor) example. Flowcharts can be used as abstractly or as detailed as you like.
http://www.technologystudent.com/comps/comp6.htm

One man, one lawnmower, plenty of angry groundhogs.
Darth Vader
20
Years of Service
User Offline
Joined: 10th May 2005
Location: Adelaide SA, I am the only DB user here!
Posted: 1st Dec 2009 12:05 Edited at: 1st Dec 2009 12:06
PeterH the link now works Thanks for the second example anyway!

Mistrel what you say makes sense, and it's very well laid-out. I'll look into PureBasic as well.

EDIT: At this time the PureBasic website is down will check later I suppose.

Xarshi
19
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 1st Dec 2009 12:08
Quote: "I'm not entirely sure why, but that statement motivates me! Thanks Xarshi! "

Hah, I guess without an explanation I couldn't expect you to know what I meant. But here's my idea behind it: A lot of 3d programming is mathematically based. As well as physics programming. Plus it's just nice to know, lol.
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 2nd Dec 2009 06:56
Quote: "EDIT: At this time the PureBasic website is down will check later I suppose."


Someone was DDOSing the forum yesterday which is connected to the main site. It's back up now but it's a little slow.

Darth Vader
20
Years of Service
User Offline
Joined: 10th May 2005
Location: Adelaide SA, I am the only DB user here!
Posted: 2nd Dec 2009 11:37
Quote: "Someone was DDOSing the forum yesterday which is connected to the main site. It's back up now but it's a little slow."
Yeah Had a really good look earlier on today! Got the book and am going to have a flick through

Thanks Mistrel!

Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 2nd Dec 2009 19:03 Edited at: 2nd Dec 2009 19:03
Another advantage of PureBasic is PureGDK. It's a direct port of DBP which means all of your plugins are compatible too.

If you want to keep learning how to program games with DBP but also learn a new language it's a great tool. If you decide to move to C++ then there is DarkGDK. Or C# with DarkGDK.NET.

gbark
19
Years of Service
User Offline
Joined: 14th Oct 2005
Location: US - Virginia
Posted: 3rd Dec 2009 07:01 Edited at: 3rd Dec 2009 07:18
So do you want to just "learn how to program", or are you actually majoring in Computer Science / Programming at University?


Java is a really good (in my opinion) language to learn for beginners -- It's Object Oriented, which makes it a littler tougher to learn at first, but then once you're familiar with the language, really easy to visualize segments of code for larger projects.

You learn a lot of basic programming necessities along the way, such as datatypes, recursion, encapsulating your code, etc -- All things that you will learn that will carry from language to language. One really nice thing that Java has over a language like C++ is that all the memory stuff is handled automatically for you -- When you're done with an Object, just null out any references to it, and you're done! Other languages might require you to handle about allocating/deallocating memory yourself, which just adds to extra overhead of things you're trying to learn.

Now that's good if you just want to "know how to program" in general; if you plan on majoring in it, math is going to be essential -- Multiple semesters of Calculus, Physics, and Discrete Math, just to name some. If you're math shy, brush up now!


But yeah, for starters I would definitely recommend Java. To be totally honest (and I really don't want to be one of "those people", but here it goes anyway...) if you want to get serious in programming, I would not recommend trying to learn another BASIC type language. Not that I don't like them (I love them!), but because BASIC is very rarely used in any sort of academic field anymore -- The only exception really would be VB.net, but you really don't typically start out learning that in college -- It's almost always Java or C/C++ that you start with. That's just for your academics though, you should still keep DBPro handy for leisurely game programming!



As for compilers/IDE's, as was suggested before, do not start with a full blown IDE like Eclipse or anything of that sort when you are just learning. Those are excellent for when you're already experienced, but number one they'll just confuse you with all the buttons and options, and number two a lot of the "tedious" code is automatically filled for you as you write -- Really handy for when you've got a large project to write, but really bad for when you're trying to learn the language and the program is writing the code for you.

TextPad is a nice free-ish (it technically costs money, but you can use the trial for as long as you wish, without limiting any of the features) editor that has plug-ins for compiling in many languages -- Sort of an "all in one" basic text editor/compiler.
Michael P
19
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 3rd Dec 2009 10:35 Edited at: 3rd Dec 2009 10:40
My university and many others start off with Java. It is much safer than C++, you can't do so many stupid things. I don't think it matters much though most languages that will be suggested are very similar.

C++ has a very good guide, I haven't seen one of such quality for any other language: http://www.cplusplus.com/doc/tutorial/ so if you are teaching yourself that is VERY useful.

Also, if you use C++ I suggest visual studio, and if you use Java I suggest NetBeans. The extra features shouldn't blow you away IMO, just ignore them until you need them. There is no sense in using a lightweight minimal one when eventually you will need the extra features and have to switch.

Darth Vader
20
Years of Service
User Offline
Joined: 10th May 2005
Location: Adelaide SA, I am the only DB user here!
Posted: 3rd Dec 2009 10:53
Thanks guys! I'm taking all your comments onboard and sort of figuring out a plan of action.

Quote: "if you want to get serious in programming, I would not recommend trying to learn another BASIC type language."
I was sort of thinking about that today. Lol the humorous thing is that I always thought Java was a web only language!

Thanks again Everyone!

gbark
19
Years of Service
User Offline
Joined: 14th Oct 2005
Location: US - Virginia
Posted: 3rd Dec 2009 15:55 Edited at: 3rd Dec 2009 15:55
Don't confuse Java with JavaScript, that's a very common mistake. Syntactically they're similar, but that's about the only thing -- Other than that they're as different as night and day.
Sid Sinister
19
Years of Service
User Offline
Joined: 10th Jul 2005
Location:
Posted: 3rd Dec 2009 17:48
Quote: "The problem with maths and games is you have no idea what maths you need to know. You have a problem, and there is a mathematical solution, but you won't know what maths to apply, unless you knows the maths already! This makes it difficult to specifically learn the simpler bits of maths that are useful.
"


I imagine perusing through here might turn up some good functions:

http://forums.xna.com/forums/45.aspx
http://creators.xna.com/en-US/education/catalog/?devarea=17

I know it sounds odd, but I think you should spend a few weeks learning VB.NET first. VB is not used for games, at all (well, I programmed one for my class final lol), but it does teach you a lot of important OOP concepts. Other languages do of course too, but VB is... well, Visual Basic, so it's easy to understand, and it was great stepping stone for me knowledge wise before moving into C++ where the syntax is harder.

I would focus on Vanilla C++ for a while too. Vanilla meaning plain, which also means without the 'game' focus. Concentrate on the language itself first and then focus on making games with it. Make a text adventure, this will really polish you before moving onto PureGDK or something.

Just my two cents. I realize not everyone will take the same path as I did, but since that's the path I know, and it worked for me, that's my suggestions

"If I have seen a little further it is by standing on the shoulders of Giants" - Isaac Newton
Current Project: http://strewnfield.wordpress.com/ (Last updated 06/11/09)
BearCDP
15
Years of Service
User Offline
Joined: 7th Sep 2009
Location: NYC
Posted: 3rd Dec 2009 21:19
Count another vote for Java from me. As for an IDE, Netbeans is my favorite, but if you want something that's a little more oriented toward beginners, then check out jGrasp. It's a very lightweight IDE geared toward Java beginners, and has a cool feature where it can automatically interpret a UML diagram from your code (it might reverse-engineer too), so it's a really good way to learn how to design a larger piece of software.

Netbeans has some amazing UML features as well, but they're more geared towards an actual production environment rather than as an educational tool.

Once you're familiar with Java and you want to start writing larger programs, check out the Head First Design Patterns book. It's not the final authority on design patterns, but I found it to be a really good introduction to learning how to make the best use out of object oriented programming.

I'll also cast a vote for math, I'm trying to learn more of this myself in my spare time. You can never have too much math.

Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 4th Dec 2009 10:37 Edited at: 4th Dec 2009 10:38
There's no point in learning Java unless you want to program Java. He'll gain a lot more experience programming in C or C++ and have access to a wide variety of libraries on top of that.

But the jump from a simple Basic dialect to OO is a huge jump, for C++ or Java. That's why I recommend PureBasic. It's just as powerful as C and can be used to learn many of the fundamentals of programming as well as become introduced to OS API through Win32, a daunting task in most other languages.

If you want something "else" I would recommend Python. It will be easier to grasp than Java, has procedural and OO concepts likr C++, and can be used as another stepping stone to Java/C++ like PureBasic.

I don't think Java or C++ is a good thing to throw at someone unless they're in a university setting or are dedicated and willing to invest in a couple of books. It's just too hard for a new programmer.

Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 4th Dec 2009 11:09
Yeah, PureBasic I think is a great example of where OO would benefit application development. That's not a criticism of PB, more an observation based on the amount that has to be done 'behind the scenes' with the API. The basic fact is that without good control, GUI programming for windows can be incredibly complex and messy - with some preperation you can maintain it, but the my point is that an OO environment would do a much better job of containing and managing those events.

I've been kinda lucky, in that the projects I've done with PB can lend themselves to a slightly more OO approach - taking control over the GUI handling, the independent thread actions that co-exist with the gui were actually quite easy. Some of it is born of common sense, often you'll assume that something should work a certain way, and it actually does just that. It's nice when common sense over-powers coder arrogance .


Health, Ammo, and bacon and eggs!
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 4th Dec 2009 11:30
Van B, you can do OO programming in PureBasic using interfaces.

See here:

http://forum.thegamecreators.com/?m=forum_view&t=159287&b=38

Login to post a reply

Server time is: 2025-05-25 15:02:14
Your offset time is: 2025-05-25 15:02:14