Jump to content

  • Log In with Google      Sign In   
  • Create Account

Retro Grade

[Beginners] How to get better? Program your algebra homework.

Posted by , 27 February 2013 - - - - - - · 2,182 views

Being an intermediate developer, getting better is a huge focus of mine. I read e-books, program constantly, and follow established programming rules (S.O.L.I.D.), however getting better is still hard. I've come to the conclusion that the only true way to get better is to program (following rules from books, however).

How can you program constantly? You run out of ideas, and you still aren't ready to embark on a big project. There has to be some way to get better at programming every day.

And there is.

Program your Algebra homework. Or, if you're out of Algebra, program the lesson's on Khan Academy.

"What?", you ask. "How does programming my Algebra homework help me at all?". "What does it even mean to 'Program your Algebra homework'?".

Well, it's simple. Algebra follows rules. Repetitive rules. And what are computers best at (If you don't know the answer to this question in less than a second, go read some more beginner books.)? Repetition. Procedural programming is focused on repetition. The idea that you can do the same code many times forms the base of Computer Science.

So, to get better, and learn far more about programming (Especially design), program your Algebra homework.

What do I mean? Put what you're learning to solve, or do, or simplify into a program. You'll quickly find yourself with a large library of Algebra programs.

Want an example?

The quadratic formula (and discriminates). Why did I choose this as an example? Because it's very easy, making it a great example. All you need to solve quadratic equations is to plug in a, b, and c (From standard form:)
Posted Image
into the quadratic formula:
Posted Image
Do this every night, and you'll be a better programmer in no time.

(To see the example, download the file below. The code is in C++, however it should be easy to understand for programmers of all languages as it only uses basic conditional / loop statements, variables, and functions.)

Attached Files

[Development] DarkBASIC is Terrible, and Space Invaders!

Posted by , 09 February 2013 - - - - - - · 1,395 views

Hello all! I have had a very long absence (Okay, it was only a month, however I still feel bad Posted Image).

If you couldn't tell from the title, the first basic game I will be creating is Space Invaders!

I love Space Invaders, and allows me to flex some new graphics programming muscles, including (but not limited too Posted Image):
  • Projectiles
  • Efficient Collision Detection (There will be 20 - 25 Space Invaders Per Level)
  • File Loading (I need to load the maps from a file)
  • State Machines
  • And Pre-Visualization!
I'm in the process of planning, however I will start official programming tomorrow!

And now to explain my long absence:

In the time being, I have:
  • Learned BASIC
  • Learned DarkBASIC
  • Learned far more about JavaScript
Yes, I have learned DarkBASIC.

I have been wanting to learn DarkBASIC for some time. Originally I believed DarkBASIC was a quick way to prototype games and program graphics.

And wow, was I wrong.

Although DarkBASIC has probably helped me become a better quality, the only real redeeming quality I've seen is learning BASIC. It's a great beginner language, however it can only really achieve 2001 level graphics. It's more for learning basic graphics programming (Even then, it's procedural programming syntax is horrendous. Imagine C, however you must use:
REM User-Defined type
Type myType
  REM You can't have functions in objects, making them more like glorified containers.

REM For some reason, you must also use "End" to show DarkBASIC where your program ends, and you may
REM only declare functions after your program ends.

REM A function
function myFunction(x#, y#)
  returnValue = x# + y#
EndFunction returnValue
REM The returnValue goes after EndFunction (God knows why)
this code)

I imagined it as a mix of Basic, PHP, and a bad version of C.

There are so many bugs, and the people who work at "The Game Creators" don't even know how to code. They hire a new programmer to fix bugs because there sole goal is making money off new programmers who believe DarkBASIC is a good way to get into graphics.

Spoiler: It Isn't.

There are literally no redeeming quality's of this language.

Also, when you create Sprites / Images, Three-Dimensional Objects, or almost anything important involving graphics, they don't allow you to name it (At least with variable you only have to put symbols after their names or use a terribly inefficient AS command). You give every object a number.


A Number. How are you supposed to tell what different objects do?

And this is why I hate DarkBASIC. It makes its users write terrible code (I don't believe it's possible to write good code using the "number" system), and advertises itself as a "professional game engine" that will help its users.

I'm abandoning DarkBASIC for normal BASIC (From what I've seen, the Graphics Libraries for plain BASIC are even better, never-mind Visual Basic), and programming Space Invaders in C++.

Also, Hooded is still on Hiatus (Sorry Posted Image)

Cheers Posted Image!