What do we want in a tutorial?
Moderator: Moderators
Re: What do we want in a tutorial?
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.
nesdoug.com -- blog/tutorial on programming for the NES
Re: What do we want in a tutorial?
¯\(º_o)/¯tepples wrote: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.Sik wrote:and indeed short int is 8-bit on many old systems
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?
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.
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?
I came up with revised Python installation instructions. Steps 1 and 2 actually install it, and steps 3 through 5 test the installation.
EDIT: updated Python (Windows 32-bit) link to 3.5.1
- First install Python from here: https://www.python.org/ftp/python/3.5.1 ... -3.5.1.exe
- Open a Command Prompt and do this:
Code: Select all
C:\Python35\Scripts\pip.exe install Pillow
- 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). - From IDLE's Run menu, choose Python Shell. This should open a new window titled "Python Shell".
- Paste in each of the two following lines, pressing Enter after each one:
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.
Code: Select all
from PIL import Image Image.new('RGB', (100, 100), (0, 191, 0)).show()
EDIT: updated Python (Windows 32-bit) link to 3.5.1
Re: What do we want in a tutorial?
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.
- Attachments
-
- green.gif (9.66 KiB) Viewed 3661 times
nesdoug.com -- blog/tutorial on programming for the NES
Re: What do we want in a tutorial?
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.dougeff wrote:From C:\Python34\Scripts>
I typed "pip install Pillow", btw.
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, I have windows 8.1. I just slid from right to left (opens the right menu)
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:and hit "search", typed in "IDLE", chose the first option, and "Python 3.4.3 Shell" Opened.
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?
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.tepples wrote:I've put the outline on a wiki page.
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.