Author Topic: Learn to code through a series of challenges?  (Read 6274 times)

technozombie

  • Hero Member
  • *****
  • Posts: 730
Learn to code through a series of challenges?
« on: September 29, 2016, 04:29:02 AM »
So, like many people I've always want to learn to program/code, but have never really pursued it. I did take a beginners C++ class, and that is the extent of my experience. I've tried to watch Youtube videos, but I usually run into one of two scenarios. Number one: the beginner videos are for the absolute beginner and I get bored and distracted because I already know some of the stuff. Number two: most of the videos are in the format of "here type this,' and you are just following along trying to alt tab and type what they type.  I know there are several people on this site who program and I was hoping someone could issue me a series of challenges that increase in difficulty and complexity.

For example: Some experienced person says "Make a program that does 'X' thing" and then I go research on the internet and figure out how to do it, come back here with the source code, and proceed to the next challenge.

Also, if anyone else on the site is interested in participating in these proposed challenges then they are more than welcome. As a matter of fact if anyone has any good ideas on how to learn to code or even how to keep oneself focused on task/hobby/learning goal, then feel free to add that here. I get distracted easy, even when playing games I tend to play 4 or 5 in short bursts and seldom complete anything.

MrBroadway

  • Hero Member
  • *****
  • Posts: 2070
Re: Learn to code through a series of challenges?
« Reply #1 on: September 29, 2016, 07:21:29 AM »
What I did to brush up on things is to try to make one really big thing. I tried to create an in-depth data-analysis program in C using Win32. It helps to slowly add things here and there until you're competent. For Java, making a calculator got me to master some of the basics.

That said, I'd be interested. Are you still doing C++?

technozombie

  • Hero Member
  • *****
  • Posts: 730
Re: Learn to code through a series of challenges?
« Reply #2 on: September 29, 2016, 07:37:43 AM »
I thought C++ would probably be the best way to go, but I'm open to other ideas.

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: Learn to code through a series of challenges?
« Reply #3 on: September 29, 2016, 03:02:08 PM »
I thought C++ would probably be the best way to go, but I'm open to other ideas.

IMHO, it depends upon how much interest you have, and what your eventual goal is.

What kinds of things would you like to program?

If you can analyse why you have some interest in learning, then it would be easier to make recommendations.

Way back-in-the-day, everyone wanted to make simple games written in BASIC on home computers with simple graphics.

That's an excellent way to start because you get fast feedback, and learn simple logic.

And that's a skill that you can then build on to take the next step.

Learning from modern C++ aficionados who just want you to string together pre-written functions from the std:: namespace isn't going to teach you how to think and problem-solve, or much about how stuff really works.

technozombie

  • Hero Member
  • *****
  • Posts: 730
Re: Learn to code through a series of challenges?
« Reply #4 on: September 29, 2016, 03:26:17 PM »
Well i definitely wouldn't mind learning to make simple games. Actually, my son likes to do some pixel art, and I would like use his art in a game as well as be able to teach him how to do it.

As far as why I have interest in learning, it's really because I like challenging myself with new things. I recently tiled in a shower in one of my bathrooms, it was a difficult, but rewarding experience. Like any kid who grew up with a Nintendo, I've pretty much always wanted to make my own game.

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: Learn to code through a series of challenges?
« Reply #5 on: September 29, 2016, 03:48:31 PM »
The whole pixel-art aspect can wait until you get a little further down the path!  :wink:

The classic starting-point is to recreate the old Atari "pong" game.

You can break it down into a number of steps ...

[uldecimal][li]get a 1-pixel ball moving from the top-right of the screen to the middle-left of the screen[/li][li]reset the position of the ball back to the top-right when it goes off the screen[/li][li]add a "bat" on the left hand side of the screen, and bounce the ball off it when it reaches that point[/li][li]allow a joystick to move the bat up-and-down under human control[/li][li]get the ball to figure out whether it hits the bat (or not) when it gets to the left side of the screen[/li][li]... ... ... and then there's more when you get all of that working![/li][/ul]
You could either do that in BASIC on a Commodore 64 (or an emulation of one), or in GameBASIC on a PC, or in HuC on the PCE (probably the hardest to do, but the one where you'll get the most help from other folks here).

Does that make any sense?

Arkhan

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
Re: Learn to code through a series of challenges?
« Reply #6 on: September 29, 2016, 04:42:00 PM »
BASIC on PC is a good place to start learning programming.

anyone who tells you learning via BASIC is dumb, is dumb.

They even came back with BASIC for Windows, https://www.microsoft.com/en-us/download/details.aspx?id=22961
[Fri 19:34]<nectarsis> been wanting to try that one for awhile now Ope
[Fri 19:33]<Opethian> l;ol huge dong

I'm a max level Forum Warrior.  I'm immortal.
If you're not ready to defend your claims, don't post em.

MrBroadway

  • Hero Member
  • *****
  • Posts: 2070
Re: Learn to code through a series of challenges?
« Reply #7 on: September 29, 2016, 04:50:57 PM »
Visual Basic is actually very useful for Excel macros. (Well, VBA.)

NightWolve

  • Hero Member
  • *****
  • Posts: 5277
Re: Learn to code through a series of challenges?
« Reply #8 on: September 29, 2016, 05:26:32 PM »
Visual Basic is actually very useful for Excel macros. (Well, VBA.)

Ya know, I still use VBA under MS Access for my translation software. Access was a pretty competent solution to manage complex cases for what I did, games like Ys VI/Felghana/Ys Origin that separated the script out to ~1,300-1,766 individual files... I could abstract that into one database, one table, one view for the translation, and suddenly what was a nightmare or just not feasible, was a no-brainer (as in, why didn't I think of this sooner?), etc. Those projects would never have happened without Access!

In the case of Felghana, the translator could then translate the whole thing in 22 days as a result.. Of course, the bastard also then secretly exported the results to XSEED Games, got himself into the videogame industry off my back, ideas, work hours, etc. But yeah... Access is quite dandy if you learn how to make use of its power...and it led to XSEED getting a sweetheart deal where ~24,000 Falcom/Ys strings in total were pre-translated, ready for delivery/export, and not having to pay professionals at industry rates to start from scratch...

Anyway, for actual videogame development...well, I have actually seen games coded in good ole Visual Basic 6, straight up... It looks messy though, I'll say that...but, it's a great learning environment for sure! Why do I still like VB6 more than the mess that is VB.NET ??

technozombie

  • Hero Member
  • *****
  • Posts: 730
Re: Learn to code through a series of challenges?
« Reply #9 on: September 29, 2016, 05:54:45 PM »
The whole pixel-art aspect can wait until you get a little further down the path!  :wink:

The classic starting-point is to recreate the old Atari "pong" game.

You can break it down into a number of steps ...

[uldecimal][li]get a 1-pixel ball moving from the top-right of the screen to the middle-left of the screen[/li][li]reset the position of the ball back to the top-right when it goes off the screen[/li][li]add a "bat" on the left hand side of the screen, and bounce the ball off it when it reaches that point[/li][li]allow a joystick to move the bat up-and-down under human control[/li][li]get the ball to figure out whether it hits the bat (or not) when it gets to the left side of the screen[/li][li]... ... ... and then there's more when you get all of that working![/li][/ul]
You could either do that in BASIC on a Commodore 64 (or an emulation of one), or in GameBASIC on a PC, or in HuC on the PCE (probably the hardest to do, but the one where you'll get the most help from other folks here).

Does that make any sense?
This is what I'm looking for, some objectives to work on. I'm working the graveyard shift right now, but I'll try to start on this when I wake up tomorrow.

esteban

  • Hero Member
  • *****
  • Posts: 24063
Learn to code through a series of challenges?
« Reply #10 on: September 29, 2016, 06:10:13 PM »
This is what I'm looking for, some objectives to work on. I'm working the graveyard shift right now, but I'll try to start on this when I wake up tomorrow.

YOUR OBJECTIVE: Develop a BLODIA clone after finishing PONG clone.

There will be no further warnings.

Your prime directive is BLODIA.
  |    | 

TheOldMan

  • Hero Member
  • *****
  • Posts: 958
Re: Learn to code through a series of challenges?
« Reply #11 on: September 29, 2016, 07:00:41 PM »
Quote
...after finishing PONG clone

Pong is a good starting point, actually. Teaches the basics of joypad handling, sprite control and collision checks.

Follow it up with a breakout clone. That should teach you how to do quick screen updates and tile checks.

technozombie

  • Hero Member
  • *****
  • Posts: 730
Re: Learn to code through a series of challenges?
« Reply #12 on: September 29, 2016, 07:24:47 PM »
If I can somehow find a way to do a Breakout/Blodia mashup then I'll really be onto something.

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: Learn to code through a series of challenges?
« Reply #13 on: September 30, 2016, 04:14:05 AM »
Pong is a good starting point, actually. Teaches the basics of joypad handling, sprite control and collision checks.

Follow it up with a breakout clone. That should teach you how to do quick screen updates and tile checks.

Exactly my thought!

I would avoid sprite-handling on pong, and just suggest developing it in a classic BASIC environment with a "plot" command to draw a point on the screen.

IMHO, it's best to get the basic programming thought-process (of de-composing a problem down into variables, conditionals, loops and subroutines) before dealing with stuff like sprites and attribute-tables.

Something on the PC that has a good debugger would be best, since a good debugger makes everything so much more pleasant, especially when you're starting off.

It doesn't look like Microsoft's SmallBasic has anything better than its version of "printf".

VB6 would be an alternative ... but you can't get hold of it freely.

Jeez ... why is it so difficult to find a simple environment with a decent debugger!

NightWolve

  • Hero Member
  • *****
  • Posts: 5277
Re: Learn to code through a series of challenges?
« Reply #14 on: September 30, 2016, 04:37:54 AM »
It doesn't look like Microsoft's SmallBasic has anything better than its version of "printf".

VB6 would be an alternative ... but you can't get hold of it freely.

Jeez ... why is it so difficult to find a simple environment with a decent debugger!

I forget, but didn't VB.NET take away the instant code rewrite AND continue ability you had in VB 6 during debugging/tracing ? That's the thing I loved about it! When you grew up with TASM, Borland C++, etc. and encountered such a feature for the first time, it was amazing! Lot of my early work involved maintaining legacy apps, and nobody likes to document their shit, so if I had to debug to track down a problem, nothing was ever better than VB 6! Perhaps its power and ease allowed software developers to be a bit more lazy than they normally would though, but companies just want apps running as fast as possible and if they're mostly providing the needed solution, they don't care how messy things are under the hood.