Beginning programming for a teenager

Soldato
Joined
18 Oct 2002
Posts
15,711
Location
North Wales
Hi,

Does anyone know of any online resources aimed at teenagers wanting to start simple programming - no specific requirements on language but would be better something cross platform as their main computer is a mac.

Its for my other halfs little brother who wants to study programming (or similar) at college in the autumn but hasn't had any exposure so is very green to it. I'd like to give him something to try to see if he likes it.


Thanks
 
Soldato
OP
Joined
18 Oct 2002
Posts
15,711
Location
North Wales
Thanks for that, looks pretty good. It seems to be based on practical exercises, but does anything cover something of an overview of what programming is as a sort of introduction?
 
Soldato
Joined
2 May 2004
Posts
19,950
That does I think, it takes you through the very basics of your chosen language explaining everything as you go. Why you're doing it etc.
 
Associate
Joined
3 Nov 2013
Posts
320
Location
Surrey
Hi,

Does anyone know of any online resources aimed at teenagers wanting to start simple programming - no specific requirements on language but would be better something cross platform as their main computer is a mac.

(Posting this from my MBP) I use Code Academy, as it was recommended by a friend to learn various types of coding (mainly HTML and PHP in my case)

Very user-friendly pace and good simple exercises make it a definite winner for me
 
Caporegime
Joined
18 Oct 2002
Posts
32,623
I started programming when I was 12 (mistakenly in Qbasic) but when I was 14 I just dived into c++. What excited me was programming computer games, by 16 I had a fairly complete replica of the Quake 3 engine (graphics and physics). Programming 3D computer games is fun because you get to see the output of your coding, not just a program that spits out a number. You learn a lot of useful math (I was doing linear algebra long before I covered it in school), you also learn a lot of useful algorithms and data structures. Just don't use a preexisting game engine, build it up from scratch learning algorithms and data structures, not just plugging in existing engines).
 
Soldato
Joined
4 Oct 2008
Posts
6,693
Location
London
I think it is best to have a target/aim, it is the only way I find you can push yourself. I started programming on making automated bots for games. I quickly picked it up and made really complex and fun plugins that did all sorts of crazy things. I mostly did it for fun and actually seeing it work is a really fun.

After that I started to work on a simple C++ game that was psychics based and made good use for Box2D. It was the most fun I had coding, I would come home after college and just program for a few hours.

I had no formal education or any idea about a lot of the OOP aspects to development (C++ does force some OOP) but I had a great understand of the underlying data structures. Even today some developers I work with don't fully understand things like lists, hash tables, trees and so on.

I would highly recommend anyone that wants to learn programming to start off with a very high level language and once they find there feet to play around with a lower level language and try to understand too some degree what is happening and why.
 
Associate
Joined
24 Nov 2010
Posts
1,866
Location
127.0.0.1
What excited me was programming computer games, by 16 I had a fairly complete replica of the Quake 3 engine (graphics and physics).

I'm curious, how and where did you learn to build the Quake 3 game engine in C++?
I ask because I can already program professionally in many languages but building a game engine isn't simply an easy feat.

Also OP, I'm assuming your other half isn't planning on spending any money learning to program? The best learning resources cost money unfortunately.
 
Caporegime
Joined
18 Oct 2002
Posts
32,623
I'm curious, how and where did you learn to build the Quake 3 game engine in C++?
I ask because I can already program professionally in many languages but building a game engine isn't simply an easy feat.

Also OP, I'm assuming your other half isn't planning on spending any money learning to program? The best learning resources cost money unfortunately.

I started with tutorials at NeHe for OpenGL. There was also a website flipcode that had tutorials and a forum, there were others as well.

A 3D game engine (graphics and physics) is not that hard. OpenGL is very easy to render textured triangles with blended textures. The core of an engine is typically a scene graph with spatial partitioning. I started with simple quad and oct trees (split the world into 8 cubes recursively to a set of leaf nodes with only. Few objects), moved on to KD-trees and BSP trees. These data structures are very common in any dimensional data set where spatial relationships are important. This spar tion allows you to rapidly find out what items (walls, enemies, ammo boxes etc.) are visible and you basically send all that to the rendering pipeline.
At this time static lighting was the norm and you would pre calculate lightmaps. Basically you placed lights in the environ,net and for every wall or ceiling polygon you would run a simple illumination simulation. The illumination at a point p is proportional to the inverse square of the distance times the cosine of the angle of incidence summed over all lights (As a simple approximation). You then get these texture which you just blend with the base texture to get lighting.

Quakes dynamic lights were just done using making a sort of animation with multiple light maps. Quake 3 also had a few fancy things like bezoar splines to make smooth curved surface, again mostly just a little math and not too complex

The collision detection is just math. You use the same spatial partitioning scene graph to find proximal objects. Finding the intersection of a sphere or cylinder against a triangle is quite easy. This math gives a set of 'reflection' vectors for each triangle, which you sum to find the exit trajectory (imagine a billiard ball hitting off the cushion, the output vector is just a reflection of the incident vector minus a portion lost due to friction)


Basic Newtonian physics isn't hard to code but I did move onto using the ODE . E.g. F=ma (brut in 3D)

Sound I just used a sound library like openAL



The hardest thing was getting any kind of media and especially media or 3D models. This is where quake 3 was popular because the levels were easy to read (and there were available level editors) and the graphics were easy to use.


There were lots of easy tricks used at this time. The bullet holes/decals were just another texture layer for example. The reflective floors just involve rendering the world upside down, rendering the floor with some transparency and then rendering the world the right way up. Similar tricks for mirrors and puddles.


I kind of stopped when I was 18 and went to uni (too busy and too interested in girls and beer) but by then my engine looked identical to quake 3 and felt very similar in movement (but would get jammed way too often). It was also like 10x slower, had plenty of glitches and would crash really often. No characters/AI/animation.


I made plenty Of other engines. I loved making open world landscapes, these are actually dead easy. I always got excited about new idea, would stop what I was doing and start new. I had an unreal type engine, a flight sim, star wars game.


I really wish I had the time energy to do this now but it really takes a load of time and there is no way 1 person can make anything close to a modern games unlike when I was a teen in could get very close to a game a couple of years old. One could use a premade game engine but then you would miss out all of the fun and useful exercises Indeveloping your own data structures and algorithms.
 
Soldato
Joined
13 Jul 2006
Posts
3,371
Location
Hell!! \m/
Razzy Pi job if you are very new with Python shizzle. Always boring to me programming and electrics tntil I got into Raspberry I hope it's good from here!

For a nubster like me who's not interested till he's touching with this Rasp and seeing excitement whocj lanages? web or none, aimed more-at windows, linux (GUI), android, limiting for me it's about making a radoo or doorbell and saying you did then pulling up your pants.
 
Last edited:
Soldato
Joined
6 Mar 2008
Posts
10,079
Location
Stoke area
Razzy Pi job if you are very new with Python shizzle. Always boring to me programming and electrics tntil I got into Raspberry I hope it's good from here!

For a nubster like me who's not interested till he's touching with this Rasp and seeing excitement whocj lanages? web or none, aimed more-at windows, linux (GUI), android, limiting for me it's about making a radoo or doorbell and saying you did then pulling up your pants.

:confused: I can kind of grasp what you're saying but not confident enough to answer in case I've misunderstood you. Care to rewrite it in proper English?
 
Back
Top Bottom