GLBasic forum

Main forum => GLBasic - en => Topic started by: shawn on 2011-Jan-13

Title: New to programming. Advice welcome!
Post by: shawn on 2011-Jan-13
Hello everyone, I am new to programming (at 28 i left it a bit late). I have dabbled with a few languages before in my time the first of which was STOS on my atari st although I was about 8 and didn't have a clue what it was all about. I also made a small text adventure in qbasic in my teens (small as in about 5 rooms) and recently went through a hangman tutorial for python. Other than that I am totally new to this.

While doing the python tutorial I looked into languages dedicated to games and that is how I found GLBasic. I looked at all the other BASIC languages but GLBasics multi platform stuff is a HUGE bonus. I'm pretty excited about learning all this and want to do it the right way straight out of the gate so if anyone would like to offer me advice about learning the language and developing good habits then I would really appreciate you letting me know!

My current plan of action is to work my way through all the tutorials I can find and then make a few simple arcade games like pong, space invaders, frogger and breakout etc before moving on and making my first games.

So, if there is anything you wish you practiced or knew from the start, or if there is any advice at all that you think I would find useful don't be shy and tell me!

By the way, I noticed that the forum has already had 822 new members this year which is insane. Well done!
Title: Re: New to programming. Advice welcome!
Post by: erico on 2011-Jan-13
yep, I started with trs80 color basic long time ago, evolved to amos on amiga, where I just got insanely happy with the possibilities of mutimidia on basic, did a lot of games, some got into cover disks and so on, then pc...

... it has been about 8 years I have been researching languages to do the same, lots got close, but glbasic just hit the spot for me.

For the little time I have been on this (excellent) community, I can recommend mrTAToad's books to help out the learning stage. Other then that, start something up and share your problems with us if you ever get to any.

welcome.
Title: Re: New to programming. Advice welcome!
Post by: erico on 2011-Jan-13
oh, you can check the books on this thread:
http://www.glbasic.com/forum/index.php?topic=5238.msg40615#msg40615
Title: Re: New to programming. Advice welcome!
Post by: matchy on 2011-Jan-13
Quote from: shawn on 2011-Jan-13
My current plan of action is to work my way through all the tutorials I can find and then make a few simple arcade games like pong, space invaders, frogger and breakout etc before moving on and making my first games.

"Make a few simple arcade games"? :blink: My good habit advice is to think like a programmer, not a producer, and study areas like 3D, networking, etc, and know the limits. :whistle:


Quote from: erico on 2011-Jan-13
yep, I started with trs80 color basic long time ago, evolved to amos on amiga...

Me too!!!  :good:
Title: Re: New to programming. Advice welcome!
Post by: ampos on 2011-Jan-13
I started on Vic-20, C64 and Amiga using AMOS. I even started making a "lucalfilm" adventure about Bladerunner for a game company using AMos back in 1992-93!
Title: Re: New to programming. Advice welcome!
Post by: Ian Price on 2011-Jan-13
Welcome Shawn. :)

I think you've hit upon the right stratgey myself with remaking existing games. You will be able to borrow graphics and sound and try to simulate the originals by watching what they do. There's plenty of time for learning the more advanced stuff that Matchy mentions. No point in trying to run before you can walk.

And this forum is a wealth of information - there'll be an answer to any question you might have with regard to programming.
Title: Re: New to programming. Advice welcome!
Post by: Sokurah on 2011-Jan-13
Quote from: Ian Price on 2011-Jan-13
No point in trying to run before you can walk.

Welcome Shawn,

I completely agree with Ian. Don't aim too high in the beginning by fiddling around with 3D and networking.
Just learn the basics by making some small games first, and try to learn something new with every game you work on.

I've seen SOoo many announcements about complicated games, that has never seen the light of day, because people think they're ready to work on something really complicated, when they're not really ready for it yet.

So, go easy in the beginning and it'll be fun instead of endless problems. :)
Title: Re: New to programming. Advice welcome!
Post by: matchy on 2011-Jan-13
He was asking about bad habits and mentioned not to be shy but I cop a couple of fish slaps.  :noggin:
My advice were examples that I should have expanded to arrays and types. :zzz:
Title: Re: New to programming. Advice welcome!
Post by: Ian Price on 2011-Jan-13
No fish slapping implied here Matchy :)

Shawn just stated that he wanted to do start with simple remakes and didn;t mention 3D or networking. We were bringing it back down a level - those are included in the next lesson :P. Arrays and Types are indeed better examples.
Title: Re: New to programming. Advice welcome!
Post by: XanthorXIII on 2011-Jan-13
That's always a good idea so you know what you need to accomplish and can work your way to getting there. I did that for my Pong Clone I coded using C#/XNA and turned that in for my Final for my first C# Class.
I'm currently slightly doing that for my first game in a way however the game idea and setting is much different.
It's like Missile Command in a sense.
Title: Re: New to programming. Advice welcome!
Post by: Ionise on 2011-Jan-13
I agree mostly with the guys/gals here i began my coding out of C64 mags and i too never knew what they were about and would always get a syntax error.

I never knew what syntax ever meant until i got my Amiga and a copy of Easy Amos then i moved to Amos creator then eventually Amos Pro.

The beauty of this SDK is in its power and familirality to past BASIC and the fact that it seems to ease you into 3D only when ready.
3D always scared me but with this SDK i have a better understanding which will hopefully hold me in good sted. you will also learn some C concepts whilst using this language such as OO which is a boon for BASIC compilers
Title: Re: New to programming. Advice welcome!
Post by: Ian Price on 2011-Jan-13
Quoteyou will also learn some C concepts whilst using this language such as OO which is a boon for BASIC compilers

That's not strictly true - you CAN learn IF you want to. It's not a requirement of GLBasic to be familiar with C/C++ or OOP.

Quotei got my Amiga and a copy of Easy Amos then i moved to Amos creator then eventually Amos Pro.
I started Amiga programming with EASY AMOS then moved onto AMOS PRO too. Happy days :) But I enjoy GLB even more!
Title: Re: New to programming. Advice welcome!
Post by: mentalthink on 2011-Jan-13
Welcome, well about your age don´t worry I have a little more, and I begin whit Glbasic a 1 year ago, is a powrfull tool, and very very easy, can be done everything ewhat do you want, have a little limitations, but they are very good suplent by the easy use, and the portability to another platforms, in one only click.

Welcome, and enjoy this forum, too much people have a hoge kwnoleges abot Glbasic and anohter questions, you will learn too muhc.

Kind Regards,
Iván J.
Title: Re: New to programming. Advice welcome!
Post by: Dabz on 2011-Jan-13
Biggest advice from me would be to learn how to use Photoshop alongside learning GLBasic...

Because its obviously game dev related, you'll save a fortune doing graphical work yourself, granted, you may need an artist for a few things... But, generally, being able to at least draw odds and ends will go a long way!

Dabz
Title: Re: New to programming. Advice welcome!
Post by: 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.

If you finish and fully understand your code, then you are ready to move on the something larger and more aggressive.  Plus you have a framework / template from which to start.  A full platformer / sidescroller game next wouldn't be out of the question!
But these are just my opinion.  (but based on 30 years of programming, ha! :nw: ya I started out on the Vic 20, C64 too! :good:)
Title: Re: New to programming. Advice welcome!
Post by: Ionise on 2011-Jan-13
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.
Title: Re: New to programming. Advice welcome!
Post by: Slydog on 2011-Jan-13
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.
Title: Re: New to programming. Advice welcome!
Post by: kamakazieturtle on 2011-Jan-13
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
Title: Re: New to programming. Advice welcome!
Post by: Millerszone on 2011-Jan-13
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 (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 (http://www.glbasic.com/forum/index.php?topic=5099.0)
Title: Re: New to programming. Advice welcome!
Post by: Hatonastick on 2011-Jan-14
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.
Title: Re: New to programming. Advice welcome!
Post by: erico on 2011-Jan-14
I agree with you hatonastick, that's the best way.
Title: Re: New to programming. Advice welcome!
Post by: 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
Title: Re: New to programming. Advice welcome!
Post by: Sokurah on 2011-Jan-14
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
Title: Re: New to programming. Advice welcome!
Post by: matchy on 2011-Jan-14
Yeah. Post code or never happened!  :zzz:
Title: Re: New to programming. Advice welcome!
Post by: XanthorXIII on 2011-Jan-14
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.

Title: Re: New to programming. Advice welcome!
Post by: erico on 2011-Jan-14
Quote from: matchy on 2011-Jan-14
Yeah. Post code or never happened!  :zzz:

hehe Matchy and Kuron's posts are just the best!
Title: Re: New to programming. Advice welcome!
Post by: shawn on 2011-Jan-16
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]