Original Post

I wish I had something like this when I started. So I made one. This is for complete total virgins to computer programming. I didn’t know anything about any of this and had to ask a whole buncha questions. Hopefully, this document will put all the questions about making a Hello World-type document to rest. All I knew when I started was BASIC, in particular, batariBASIC. So read this and give me feedback on it
my vb programming tutorial

12 Replies

I read it over, and I have a few suggestions…

I would get rid of sentences / phrases like this…

So, you want to make a Virtual Boy game, huh? Well, it takes a buncha hard work to make a homebrew Virtual Boy game, but with a little patience, anyone can make one!

They really don’t add any value, and just make it seem sort of unprofessional. I am not saying it has to be as dry as a chemistry textbook, but in this example above, of course I want to make a VB program or else I would not be reading that document!

The first paragraph talks about what you need. This is a perfect way to start, but I would make a list with the program name, latest version, and current direct link, like this…

You will need the following programs and files before you get started
1) VIDE version x.x (link)
2) gccVB version y.y (link)
3) INCLUDE.vpg (last updated mmddyyyy) (link)
4) Reality Boy version z.z (link)

Lists are easier to follow than a paragraph, and much easier to mentally “check off” that you downloaded all the needed files. I get lost easily in paragraphs, and I don’t want to re-read stuff, so using a list makes it simple for me to know exactly what I need without getting lost in the middle of a paragraph.

Then I would talk about setting up your enviornment (such as installing programs or how to set up folders), maybe with a few screenshots if necessary. You already did this a little, but it could be more detailed.

Maybe it doesn’t need more detail, just splitting it into sections would be more helpful (just generic ideas for sections are Introduction, Required Programs and Files, Installation, Working With Images, Programming, Compiling, Running, Resources, Final Thoughts).

As far as the rest of it, an example program is extremely important. Even if it is just a box that you move around the screen with the d-pad, it gives people example images, and code to start with. The idea is just make something simple that takes up a minimal amount of code but uses the control and the display. And then you would include everything in a zip, including the working *.vb file. Don’t just leave it up to whoever is reading to come up with something, because they don’t know what they are doing!

Another thing that would be nice is screenshots of steps! What and where is the red pyramid with the arrow on it? I don’t know, but a picture would tell me (I never ran the program, so it may be really obvious, just using it as an example).

In order to get the instant gratification that every beginner programmer wants, a good introductory tutorial would include everything that is necessary for someone to compile and run a program without having to think. Plus it instantly verifies that your dev enviornment is set up correctly.

A good way to “test” your tutorial is to physically follow it step by step (from downloading to installing to running), and be real strict to never do anything that your document didn’t say.

Yeah, all I said would be a lot of work to implement, but I think it would make the tutorial a little bit more valuable.

It’s definitely a good start :thumpup: (I like the heading names :-)) and I hope you keep working on it.

It could use some formatting/style (like bold headings) which I assume is forthcoming. Also, why is the example code an image? Maybe a “pre” tag is in order? There is also a tiny typo:

“…make a folder called ggcvb and put it in your c drive…”

Now, about the content itself:

I know about your BASIC background, but you probably shouldn’t be advocating using labels and “goto” for C programs (I haven’t even used those much in my BASIC programs). The following would be much better:

vbDisplayOn();
vbDisplayShow();

while (1) {
    // Infinite loop to prevent reboot
}

Maybe with an explanation as to why not putting one’s game code inside an infinite loop results in a reboot.

At the very least, vbDisplayOn() and vbDisplayShow() shouldn’t be inside the loop…

When you polish this up some more, you should think about adding this to the Wiki.

Keep up the good work!

EDIT: I started writing my post before mbuchman posted his, but I agree with pretty much all of what he said πŸ˜€

It’s a good start, but yeah, your coding style is VERY non-C like. I’d recommend using an existing example for the tutorial, or better yet, use an existing example to learn proper C style, then make your own example πŸ˜‰ .

DogP

What’s with all the opposition towards BASIC? I don’t think there’s anything bad regarding his coding style. And shouldn’t using a goto be faster than putting everything in a while(1) loop?

I don’t have anything against BASIC, but in C (and IMO BASIC as well), the coding style of using goto for everything really shouldn’t be used. It makes the code REALLY hard to follow (hence the name Spaghetti Code http://en.wikipedia.org/wiki/Spaghetti_code ). There’s very few legitimate uses for goto… if everything is in a loop, you can clearly see the structure of the program flow, and know the condition for where it’ll exit the loop.

As far as speed… there’s no reason it’d be faster, and it’d most likely be slower, since the optimizer can’t do things like unrolling loops, since you’re not using them πŸ˜‰ .

DogP

I worked on this a little more. Tell me what you think now.

I would LOVE to create a Virtual Boy game, but I’m a TOTAL programmer virgin, I have very lil Basic programming knowledge (safer to say none) and none of C.

What’s the best way for me to get on with creating a game?

~John

@Johnny

I would not suggest using VB dev’ing as your first introduction to programming. Find a good beginner’s C tutorial or maybe a tutorial on the basics of programming itself. I would start making simple command-line programs and such until you feel comfortable with concepts like variables, functions, loops, and conditionals.

Then, when you can read and understand C code, get familiar with the VB’s internals and the code in the “standard” (and I use the term loosely) VB library, and look at some of the example code out there.

Also, when you do start a VB project, make sure and post questions here (or even if you need help on a command-line “Hello World” or something, of course that would go in “Off-topic” ;-))

@ V.Chris

It’s definitely coming along. I’m glad you’re still working on it.

Hi, thanks for the guide! I’ve just used it to get my first “hello world” running. w00t!

A small suggestion, you could provide a sample image for people to use. It took me a good 20 minutes to find a jpg I liked and then I had to resize it and so on. Also, some information on the maximum dimensions and so on would be great.

Thanks!

Related to jpg images… in general, they’re not good to use for VB images because of the compression artifacts. Typically you want a lossless compression or uncompressed image, or you’ll run out of space because of chars that look almost identical, but have minor differences due to compression.

DogP

I’m back working on this again. This is sort of like a Wiki, only it’s for people who have no knowledge of programming whatsoever and are as stupid as I am (hey, it *might* be possible…) Anyway, I’ve updated the first page, and added a second one. You can view them here: http://www.atari2600land.com/vbdev/

Corrections and feedback appreciated.

 

Write a reply

You must be logged in to reply to this topic.