New to programming. Advice welcome!

Previous topic - Next topic

Ionise

Quote from: Slydog on 2011-Jan-13
I think it's a good idea to start with a Pong clone like you said, as it's the closest to a 'Hello World' game as I can think of.

It gives you some game programming foundations like:
- menus / loading screen, etc
- input (just up and down for the paddles perhaps)
- basic animation / sprite displaying (ball, paddle)
- collision detection (either sprite based, or manually by ball / paddle position)
- score and lives management / display
- sound if you want to go there
- most important, project management.  (how you lay out your code, and make use of GLBasic / programming features such as:
   -> TYPES
   -> FUNCTIONS
   -> STATE management (what your game is doing right now (either MENU, PLAYING, GAMEOVER_DISPLAY, etc))
   -> Multiple project files / modules that handle specific functions (may be overkill for pong, but a good habit to learn), ie: Input, Sound, Display, etc.

Apparently OOP isn't a requirement just learn it if you feel like it.
Please remove upon installation.

Slydog

I agree, but GLBasic really doesn't have many OOP features in my opinion.
TYPES are like C structures, and I think are essential in game programming.
Sure you could work around them, but the benefits are tremendous and make your code more flexible, readable, stable, etc.

Now, 'TYPES with Functions' are more OOP like in that they resemble a simple Class type structure, but really aren't classes by any means.
The other OOP concepts are missing (without going directly to inline C), like inheritance (and one I miss, function overloading!)

So sure, skip any feature that you don't feel comfortable with, as there almost always is more than one way to handle things, then eventually you may want to add that missing skill to your list.
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

kamakazieturtle

Quote from: Slydog on 2011-Jan-13
So sure, skip any feature that you don't feel comfortable with, as there almost always is more than one way to handle things, then eventually you may want to add that missing skill to your list.

Indeed, I actually didn't fully understand arrays until almost 2 years in. And it really never stopped me from doing what I needed. After I learned it, it of course made things way easier though. And you should definitely post any problems you have, I think I may hold the record for some of the dumbest questions asked, and they still answer every one of em'.  :S

Millerszone

Welcome Shawn!

I was basically in the same position as you before finding GLBasic.
I think what helped me the most was reading and reading the GLBasic Help Manual.

Then reading the source code from 'Glowing Rocks from Outer Space' helped me with functions, types, etc..
the game uses a little of everything, and is a very good game.

Then of coarse, this forum has a lot of resources, and if you can't find what you need, just ask, you will most
likely get a replay within minutes.

Glowing Rocks from Outer Space with Source
http://www.glbasic.com/forum/index.php?topic=5036.0

My first GLBasic game: 'Just Pong'
http://www.glbasic.com/forum/index.php?topic=5099.0
Hardware: iMac 27", MacBook Air, PC 3.5Ghz Quad
Developing Tools: GLBasic SDK, Gideros Studio, PureBasic
Developing for: iOS, Android, Windows, OS X, webOS, HTML5

Hatonastick

Just dive right in I say.  Usually works for me. :)

If you can handle that sort of thing, reading the manual first is a good idea -- which doesn't just mean reading the tutorials and notes, but also going through all the commands just to see what there is and what they do.  Can help to familiarise yourself, although it isn't necessary you remember it all.  Just feed the subconscious to start with. :)

Then come up with a project (a very small one) such as converting a simple old BASIC game into GLBasic, and go from there.  Hands on works best in the end.  Depending on how you are wired that is. :)

Another ex-STOS programmer here too, although my first language was on the Amstrad CPC.
Mat. 5: 14 - 16

Android: Toshiba Thrive Tablet (3.2), Samsung Galaxy Tab 2 (4.1.2).
Netbook: Samsung N150+ Netbook (Win 7 32-bit + Ubuntu 11.10).
Desktop: Intel i5 Desktop with NVIDIA GeForce GTX 460 (Win 8.1 64-bit).

erico

I agree with you hatonastick, that's the best way.

shawn

Thanks for all the advice and welcomes everyone! I'll try to take it all on board.

Now on with learning, i've got a lot to get through.

=D

Sokurah

Quote from: shawn on 2011-Jan-14
Thanks for all the advice and welcomes everyone! I'll try to take it all on board.

Now on with learning, i've got a lot to get through.

=D

Perfect. You have until monday.   :D
Website: Tardis remakes / Mostly remakes of Arcade and ZX Spectrum games. All freeware. :-)
Twitter: Sokurah

matchy

Yeah. Post code or never happened!  :zzz:

XanthorXIII

One thing I like to do in my coding is breaking it down into blocks of what something is doing and try to package it as reusable as I can get.
For your first programs you probably won't be doing that just yet but you may want to start looking at what your doing over and over again.
For example, calling blocks of code over and over again. I'd say slap that into a function and make those calls.
Using multiple variables that all relate to the same thing? Time for an Array.
Just little things like that.

Owlcat has wise

erico

Quote from: matchy on 2011-Jan-14
Yeah. Post code or never happened!  :zzz:

hehe Matchy and Kuron's posts are just the best!

shawn

#26
Hey, have a look at my very immature (in more ways than one) pong game attatched to this post. It's called "What's that Pong?". I've been doing the pong tutorial in MrTAToads book.

Having fun so far....

To be honest it's a bit surreal that I have actually made a game, considering I have been wanting to do it my whole life. I would be lying if I said I fully understood the code though.


[attachment deleted by admin]