Page 7 of 7

Re: What do we want in a tutorial?

Posted: Sun Aug 23, 2015 10:40 am
by dougeff
My understanding is that 'short int' is stored 16bit and uses math 16bit, but the upper 8bits are masked out (like I said "shoves a 0 in the upper byte"), and so 'short int' might actually be LESS efficient, since it has to take the additional step of masking the high byte at each step.

Re: What do we want in a tutorial?

Posted: Sun Aug 23, 2015 10:45 am
by Sik
tepples wrote:
Sik wrote:and indeed short int is 8-bit on many old systems
Do these systems predate the C standard? Because in the standard, short int is at least -32767 to 32767, which means at least 16-bit.
¯\(º_o)/¯

Started looking around but I can't find any references to short being 16-bit from earlier than C99 (though I didn't do that exhaustive of a search). What do the older standards say? I know that char being required to be 8-bit is a relatively recent addition (if you ignore POSIX, which is its own competing standard)

Re: What do we want in a tutorial?

Posted: Sun Aug 23, 2015 11:15 am
by lidnariq
The official C89/90 standards have been withdrawn, and so it's harder to get a copy of it, but: C89 §2.2.4.2 indirectly states that short int must be at least 16 bit. A random other source implied that K&R C did not define a minimum size.

Similarly, C89 defined char must be at least 8 bits, but I believe weirder systems use 9-bit chars.

Re: What do we want in a tutorial?

Posted: Tue Aug 25, 2015 4:43 pm
by tepples
I came up with revised Python installation instructions. Steps 1 and 2 actually install it, and steps 3 through 5 test the installation.
  1. First install Python from here: https://www.python.org/ftp/python/3.5.1 ... -3.5.1.exe
  2. Open a Command Prompt and do this:

    Code: Select all

    C:\Python35\Scripts\pip.exe install Pillow
  3. From the Start menu, inside All Programs, inside Python, choose IDLE (Python GUI).
    or: From the Start menu or Windows 8 Start screen, type IDLE and then choose IDLE (Python GUI).
  4. From IDLE's Run menu, choose Python Shell. This should open a new window titled "Python Shell".
  5. Paste in each of the two following lines, pressing Enter after each one:

    Code: Select all

    from PIL import Image
    Image.new('RGB', (100, 100), (0, 191, 0)).show()
    This should cause a small green box to appear on the screen. If it does not, or you see a bunch of red text in the IDLE window, let me know.
Could you put on your newb hat and try these steps?

EDIT: updated Python (Windows 32-bit) link to 3.5.1

Re: What do we want in a tutorial?

Posted: Tue Aug 25, 2015 7:39 pm
by dougeff
newb hat
:)

From C:\Python34\Scripts>
I typed "pip install Pillow", btw.

And, I have windows 8.1. I just slid from right to left (opens the right menu), and hit "search", typed in "IDLE", chose the first option, and "Python 3.4.3 Shell" Opened.

Re: What do we want in a tutorial?

Posted: Wed Aug 26, 2015 7:16 am
by tepples
dougeff wrote:From C:\Python34\Scripts>
I typed "pip install Pillow", btw.
That'll work too. I just wanted something that would work even for Command Prompt newcomers who can't yet tell a cd from a Compact Disc.
And, I have windows 8.1. I just slid from right to left (opens the right menu)
That works on touch laptops, not on desktops or non-touch laptops. I'm trying to come up with a single set of instructions with as few variations as possible.
and hit "search", typed in "IDLE", chose the first option, and "Python 3.4.3 Shell" Opened.
So it mostly worked; thanks. One thing I learned is that some Python installations are configured to open a shell by default instead of a new Python script by default. I'll add this to the instructions:

4. (If IDLE's window is titled "Python 3.x.x Shell", skip this step.) From the Run menu, choose Python Shell.

Re: What do we want in a tutorial?

Posted: Tue Sep 01, 2015 11:22 am
by cubeboy
tepples wrote:I've put the outline on a wiki page.
Speaking as someone making an attempt at my own game (although very slowly), I like this outline. It starts with first learning how to display something on screen, how to make them move, how to make them interact, and then how to make something more complex.

This is my thought process on how I would like to learn how to program from scratch, in case this is helpful in any way.
1) Give me the tools I need to create a .nes file that can run on a powerpak/emulator. Use these tools, as instructed, to create .nes files for the following "stages".
2) Display "Hello World" text.
3) Display tiles that I have created or found online.
4) Combine tiles and turn them into a sprite.
5) Animate my sprite.
6) Use inputs from a control pad to force animation of my sprite.

Of course I would essentially want someone to spoon feed me everything I need up through this point. From there, I would want to learn how to create backgrounds, introduce more sprites, have the sprites interact. Although I would still love to be spoon fed all this, I would think it could become a little more advanced in teachings at this point.