<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>programming &#8211; Pages of Fun</title>
	<atom:link href="https://robertgomez.org/blog/tag/programming/feed/" rel="self" type="application/rss+xml" />
	<link>https://robertgomez.org</link>
	<description>Robert Wm. Gomez&#039;s Website</description>
	<lastBuildDate>Fri, 02 May 2025 21:46:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://robertgomez.org/wp-content/uploads/2020/10/cropped-garland_logo-32x32.png</url>
	<title>programming &#8211; Pages of Fun</title>
	<link>https://robertgomez.org</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Haunted House: Remastered</title>
		<link>https://robertgomez.org/blog/2020/02/05/haunted-house-remastered/</link>
		
		<dc:creator><![CDATA[Robert Gomez]]></dc:creator>
		<pubDate>Thu, 06 Feb 2020 03:48:11 +0000</pubDate>
				<category><![CDATA[Robert's Blog]]></category>
		<category><![CDATA[adventure]]></category>
		<category><![CDATA[apple2]]></category>
		<category><![CDATA[applesoft]]></category>
		<category><![CDATA[game development]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[programming]]></category>
		<guid isPermaLink="false">https://robertgomez.org/?p=3226</guid>

					<description><![CDATA[Followers of this site (ed. yeah like that&#8217;s a thing) will remember a few years ago I created a in-browser playable version of the Applesoft BASIC game Haunted House for this site. Over the past month or so I got it in my head to push my skills as a programmer and make a much more fully [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="1024" height="800" src="https://robertgomez.org/wp-content/uploads/2020/02/haunted-house-remastered.jpg" class="attachment-large size-large wp-post-image" alt="" style="display: block; margin: 0 0 14px 0;" decoding="async" fetchpriority="high" srcset="https://robertgomez.org/wp-content/uploads/2020/02/haunted-house-remastered.jpg 1024w, https://robertgomez.org/wp-content/uploads/2020/02/haunted-house-remastered-300x234.jpg 300w, https://robertgomez.org/wp-content/uploads/2020/02/haunted-house-remastered-768x600.jpg 768w, https://robertgomez.org/wp-content/uploads/2020/02/haunted-house-remastered-800x625.jpg 800w" sizes="(max-width: 1024px) 100vw, 1024px" />
<p>Followers of this site (ed. yeah like that&#8217;s a thing) will remember a few years ago I created a in-browser playable version of the Applesoft BASIC game <em><a href="https://robertgomez.org/blog/2012/11/08/haunted-house-text-adventure/" data-type="post" data-id="2600">Haunted House</a></em> for this site. Over the past month or so I got it in my head to push my skills as a programmer and make a much more fully realized version of the game. Today I am releasing my new version of the game, <em><a href="https://projects.robertgomez.org/haunted-house/">Haunted House: Remastered</a>!</em> It&#8217;s a vast improvement on the original in almost every way possible. In other words, it&#8217;s actually fun to play.</p>



<p>While it&#8217;s nowhere near the level of sophistication of an Infocom game, I think it does some pretty impressive stuff (for my skill level as a programmer). It&#8217;s still a two word parser, but the vocabulary is increased. There are full-page help screens, triggered story events, a retro-styled monochrome monitor look, and a bunch of scary sound effects! Please take a few minutes and <a href="https://projects.robertgomez.org/haunted-house/">give the game a try</a>. It&#8217;s not too long and I try to keep the puzzle reasonably fair.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Apple ][ Graphic Adventure Part V</title>
		<link>https://robertgomez.org/blog/2018/03/22/apple-graphic-adventure-part-v/</link>
		
		<dc:creator><![CDATA[Robert Gomez]]></dc:creator>
		<pubDate>Thu, 22 Mar 2018 20:58:42 +0000</pubDate>
				<category><![CDATA[Robert's Blog]]></category>
		<category><![CDATA[apple2]]></category>
		<category><![CDATA[applesoft]]></category>
		<category><![CDATA[programming]]></category>
		<guid isPermaLink="false">https://robertgomez.org/?p=3012</guid>

					<description><![CDATA[Now that my&#160;memory issues&#160;are seemingly under control, let&#8217;s take a look at my modifications to the parser. Normally, in these types of graphical adventures the player enters two words in the form of&#160;VERB OBJECT. My interface limits the number of verb choices and allows the player to enter a verb with a single keystroke. In [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Now that my&nbsp;<a href="https://robertgomez.org/blog/2018/03/21/apple-graphic-adventure-part-iv/" data-type="post" data-id="3008">memory issues</a>&nbsp;are seemingly under control, let&#8217;s take a look at my modifications to the parser. Normally, in these types of graphical adventures the player enters two words in the form of&nbsp;<code>VERB OBJECT</code>. My interface limits the number of verb choices and allows the player to enter a verb with a single keystroke.</p>



<p>In Applesoft you can prompt for user input in two ways. First there is&nbsp;<code>INPUT A$</code>&nbsp;which will display a question mark on the screen and await user input followed by a&nbsp;<kbd>RETURN</kbd>. That user response then fills the variable A$. Similarly there is&nbsp;<code>GET A$</code>&nbsp;which also displays a question mark but&nbsp;<code>GET</code>&nbsp;will only accept a single keypress as user input. My main problem with both of these is an aesthetic one: that darn question mark.</p>



<p>The solution is to write your own input routine leveraging machine code routines via&nbsp;<code>PEEKs</code>&nbsp;and&nbsp;<code>POKEs</code>. To do this, first I simulate a cursor by placing a flashing underscore character at the bottom of the screen.</p>



<pre class="wp-block-code"><code>101 VTAB 24 : HTAB 1 : CALL -868 : PRINT ":"; : FLASH : PRINT "_"; : NORMAL : GOSUB 55</code></pre>



<p>A lot is going on in this line. The&nbsp;<code>VTAB</code>&nbsp;and&nbsp;<code>HTAB</code>&nbsp;commands position the screen cursor at line 24 and character 1.&nbsp;<code>CALL -868</code>&nbsp;is a special machine code call that clears that single line of text. Now that we have an empty line we type a colon and then a flashing underscore. The result looks like this:</p>



<figure class="wp-block-image size-large"><img decoding="async" width="200" height="59" src="https://robertgomez.org/wp-content/uploads/2018/03/adventure-cursor.gif" alt="" class="wp-image-3014"/></figure>



<p>This looks like a user input prompt, but at this point it does nothing. The magic happens at the subroutine which is GOSUB&#8217;d at the end of that line.</p>



<pre class="wp-block-code"><code>55 KEY = PEEK (49152) : IF KEY &lt; 128 THEN 55
56 IF KEY &gt; 224 AND KEY &lt; 251 THEN KEY = KEY - 32 : REM UPPERCASE
57 POKE 49168,0 : BUZZ = PEEK (49200) : RETURN</code></pre>



<p>In line 55 we are creating a variable KEY and assigning to it the contents of memory location 49,152 to it ($C000 for you hex-heads). Turns out location 49,152 will read the keyboard and return the ASCII value of the currently pressed key. If that value is a character then we break out of the loop and go to line 56.</p>



<p>Line 56 insures that, if the ASCII value of the key denotes a lowercase key, it is converted to uppercase by shifting the ASCII value.&nbsp;<code>POKE 49168,0</code>&nbsp;clears the keyboard buffer so that the PEEK in 55 will work next time around and not just register the same value.&nbsp;Finally, that&nbsp;<code>BUZZ = PEEK (49200)</code>&nbsp;bit triggers a speaker click so that the player&#8217;s keystroke has and audible sound.</p>



<p>When we return to the main game loop we now have a variable KEY which contains an ASCII value of the key pressed. I can then branch the program based on this value. I can also test if it&#8217;s a <kbd>RETURN</kbd> keypress and then toggle text display. Later in my program I can concatenate keypresses into a single string value by returning to that subroutine again and again until a return press is detected. That&#8217;s how I collect the OBJECT half of the VERB OBJECT pair.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Apple ][ Graphic Adventure Part IV</title>
		<link>https://robertgomez.org/blog/2018/03/21/apple-graphic-adventure-part-iv/</link>
		
		<dc:creator><![CDATA[Robert Gomez]]></dc:creator>
		<pubDate>Wed, 21 Mar 2018 20:56:53 +0000</pubDate>
				<category><![CDATA[Robert's Blog]]></category>
		<category><![CDATA[apple2]]></category>
		<category><![CDATA[applesoft]]></category>
		<category><![CDATA[programming]]></category>
		<guid isPermaLink="false">https://robertgomez.org/?p=3008</guid>

					<description><![CDATA[Previously I discussed the&#160;overall structure&#160;of my soon-to-be hit adventure game. Well, last night was a milestone. I managed to write an Applesoft program so epic that it overwrote the high-resolution graphics page. Compared to other programs I have seen, mine isn&#8217;t that huge. Around 250 lines isn&#8217;t that huge, right?&#160;Transylvania&#160;clocks in at 464 lines. I [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Previously I discussed the&nbsp;<a href="https://robertgomez.org/blog/2018/03/19/apple-graphic-adventure-part-iii/" data-type="post" data-id="3003">overall structure</a>&nbsp;of my soon-to-be hit adventure game. Well, last night was a milestone. I managed to write an Applesoft program so epic that it overwrote the high-resolution graphics page. Compared to other programs I have seen, mine isn&#8217;t that huge. Around 250 lines isn&#8217;t that huge, right?&nbsp;<em><a href="https://robertgomez.org/fun-stuff/games/transylvania/" data-type="game_review" data-id="2985">Transylvania</a></em>&nbsp;clocks in at 464 lines.</p>



<p>I think the issue is the number of arrays that I am defining. For now I think I have a fix. I have set&nbsp;<code>LOMEM: 24576</code>&nbsp;at the top of my program.&nbsp;<a href="https://retrocomputing.stackexchange.com/questions/1919/apple-ii-applesoft-basic-memory-management">Supposedly</a>, this will force the interpreter to define variables in a memory location after the hi-res pages. We shall see.</p>



<p>In any event, the game is back and running again. And the text screen now has some text formatting enhancements:</p>



<figure class="wp-block-image size-large"><img decoding="async" width="560" height="384" src="https://robertgomez.org/wp-content/uploads/2018/03/adventure-text-screen.jpg" alt="" class="wp-image-3010" srcset="https://robertgomez.org/wp-content/uploads/2018/03/adventure-text-screen.jpg 560w, https://robertgomez.org/wp-content/uploads/2018/03/adventure-text-screen-300x206.jpg 300w" sizes="(max-width: 560px) 100vw, 560px" /></figure>



<p>One of the cooler things I have implemented is this text screen. If at any prompt you hit <kbd>RETURN</kbd> you turn off the hi-res graphics and can see this text screen. Here will be some valuable game info included the location&#8217;s name, exits and any TAKE-able objects. The code for this is rather simple:</p>



<pre class="wp-block-code"><code>58 IF GM = 1 THEN GM = 0 : TEXT : RETURN
59 GM = 1 : CALL -3100 : RETURN</code></pre>



<p>GM is a flag which tracks where you are in graphics mode (1) or text mode (0).&nbsp;<code>CALL -3100</code>&nbsp;triggers the hi-res graphics screen without erasing its contents. So exciting, right!?!</p>



<p><a href="https://robertgomez.org/blog/2018/03/22/apple-graphic-adventure-part-v/" data-type="post" data-id="3012">Continued in Part V</a></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Apple ][ Graphic Adventure Part III</title>
		<link>https://robertgomez.org/blog/2018/03/19/apple-graphic-adventure-part-iii/</link>
		
		<dc:creator><![CDATA[Robert Gomez]]></dc:creator>
		<pubDate>Mon, 19 Mar 2018 20:54:42 +0000</pubDate>
				<category><![CDATA[Robert's Blog]]></category>
		<category><![CDATA[adventure]]></category>
		<category><![CDATA[apple2]]></category>
		<category><![CDATA[applesoft]]></category>
		<category><![CDATA[programming]]></category>
		<guid isPermaLink="false">https://robertgomez.org/?p=3003</guid>

					<description><![CDATA[The&#160;previous post in this series&#160;explained how to get&#160;Graphics Magician&#160;images to display from Applesoft. Now, I&#8217;d like to go over the structure of the program listed in&#160;Write your Own Adventure Programs. The bulk of the program listing consists of the game data including objects, room descriptions, verbs and state flags. Most of the remaining code is [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>The&nbsp;<a href="https://robertgomez.org/blog/2018/03/18/apple-graphic-adventure-part-ii/" data-type="post" data-id="3001">previous post in this series</a>&nbsp;explained how to get&nbsp;<em>Graphics Magician</em>&nbsp;images to display from Applesoft. Now, I&#8217;d like to go over the structure of the program listed in&nbsp;<em>Write your Own Adventure Programs</em>. The bulk of the program listing consists of the game data including objects, room descriptions, verbs and state flags. Most of the remaining code is comprised of a series of conditions that check how the player&#8217;s actions affect the objects in the game world.</p>



<h2 class="wp-block-heading">Verbs</h2>



<p><a href="https://robertgomez.org/blog/2012/11/08/haunted-house-text-adventure/" data-type="post" data-id="2600"><em>Haunted House</em></a>&nbsp;used a simple, two-word input parser: VERB NOUN.&nbsp;But I wanted this new game to simplify the number of verb choices in the same way the LucasArts adventures streamlined the interface of Sierra-style adventure games. The player will be limited to around a dozen verbs that are entered with a single keystroke.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="560" height="93" src="https://robertgomez.org/wp-content/uploads/2018/03/parser-help-list.jpg" alt="Apple II Adventure Parser Help List" class="wp-image-3005" srcset="https://robertgomez.org/wp-content/uploads/2018/03/parser-help-list.jpg 560w, https://robertgomez.org/wp-content/uploads/2018/03/parser-help-list-300x50.jpg 300w" sizes="auto, (max-width: 560px) 100vw, 560px" /></figure>



<p>The verb list is largely based on the options in&nbsp;<em>Monkey Island</em>. PUSH and PULL have been combined into MOVE. To move you must hit&nbsp;<kbd>G</kbd>o then enter either&nbsp;<kbd>N</kbd>orth,&nbsp;<kbd>S</kbd>outh,&nbsp;<kbd>E</kbd>ast,&nbsp;<kbd>W</kbd>est,&nbsp;<kbd>U</kbd>p or&nbsp;<kbd>D</kbd>own. This is a little annoying, but there are only so many letters in on the keyboard and I needed that D, U and S elsewhere. Other commands require you to hit the keystroke, then type out an object NOUN and then hit&nbsp;<kbd>Return</kbd>. &#8220;Guess the verb&#8221; will no longer be an issue&#8230; welcome to 21st century &#8220;guess the noun&#8221; technology!</p>



<p>Each verb then get&#8217;s its own subroutine which contains the logic that triggers the various game actions (or provides a default message if nothing special happens). By assigning a number value&nbsp;<var>VB</var>&nbsp;to each verb, I can use the following to branch to the various subroutines:&nbsp;<code>ON VB GOSUB 1000,600,800,850, ...</code></p>



<h2 class="wp-block-heading">Game Data</h2>



<p>The game data is set in the program by assigning strings and numbers to several arrays. In Applesoft you need to declare the size of an array by dimensioning it with the <code>DIM</code> command. For the rooms I will set the size of the rooms array to the number of rooms <var>RM</var> by declaring <code>DIM RM$(RM)</code>. Then, near the start of my program I read data into the array by using <code>GOSUB</code> to a loop like this:</p>



<pre class="wp-block-code"><code>5000 DATA "Room description 1","Room Description 2", &#91;...]
5005 FOR I = 1 to RM : READ RM$(I) : NEXT
5010 RETURN</code></pre>



<p>The&nbsp;<code>DATA</code>&nbsp;can be listed anywhere in the code and it&#8217;s important to make sure that there are exactly as many data strings as&nbsp;<code>READ</code>&nbsp;commands. Otherwise, you might get&nbsp;<code>OUT OF DATA</code>&nbsp;errors.</p>



<p>This method of declaring rooms and object will eventually make your Applesoft program very long and hard to edit. I was pretty sure that I could figure out a way to read the data in from an external text file. But more on that later.</p>



<p><a href="https://robertgomez.org/blog/2018/03/21/apple-graphic-adventure-part-iv/" data-type="post" data-id="3008">Continued in Part IV</a></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Apple ][ Graphic Adventure Part II</title>
		<link>https://robertgomez.org/blog/2018/03/18/apple-graphic-adventure-part-ii/</link>
		
		<dc:creator><![CDATA[Robert Gomez]]></dc:creator>
		<pubDate>Sun, 18 Mar 2018 20:51:06 +0000</pubDate>
				<category><![CDATA[Robert's Blog]]></category>
		<category><![CDATA[apple2]]></category>
		<category><![CDATA[applesoft]]></category>
		<category><![CDATA[Graphics Magician]]></category>
		<category><![CDATA[programming]]></category>
		<guid isPermaLink="false">https://robertgomez.org/?p=3001</guid>

					<description><![CDATA[In my&#160;previous post&#160;I wrote about the impetus behind this project. To start, I knew that my code was going to be structured around the&#160;Haunted House&#160;program&#160;in the excellent book&#160;Write your Own Adventure Programs for your Microcomputer. As I have&#160;written before, this book was crucial in my development as a programmer (I haven&#8217;t developed much beyond it). [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>In my&nbsp;<a href="https://robertgomez.org/blog/2018/03/17/apple-graphic-adventure-part-i/" data-type="post" data-id="2995">previous post</a>&nbsp;I wrote about the impetus behind this project. To start, I knew that my code was going to be structured around the&nbsp;<a href="https://robertgomez.org/blog/2012/11/08/haunted-house-text-adventure/" data-type="post" data-id="2600"><em>Haunted House</em>&nbsp;program</a>&nbsp;in the excellent book&nbsp;<em>Write your Own Adventure Programs for your Microcomputer</em>. As I have&nbsp;<a href="https://robertgomez.org/blog/2009/07/14/my-apple-masterpiece-malfunction/" data-type="post" data-id="851">written before</a>, this book was crucial in my development as a programmer (I haven&#8217;t developed much beyond it). I would love to do this project in 6502 machine code and I have been trying very hard to learn 6502 assembly programming. But, although I&#8217;ve gotten a better understanding of machine code, there&#8217;s serious lack of noob-friendly practical learning exercises available out there. Sure I can draw pixels at lightning speed, but, after reading most of&nbsp;<a href="https://robertgomez.org/blog/2015/09/14/apple-assembly-language-programming/" data-type="post" data-id="2847"><em>Assembly Lines</em></a>, I still have no idea how to do a simple&nbsp;<code>INPUT</code>&nbsp;command or mimic an array.</p>



<p>So, Applesoft&nbsp;<abbr title="Beginner's All-purpose Symbolic Instruction Code">BASIC</abbr>&nbsp;it is! With emulation and modern computing I have been able to develop my code on a Windows PC and then quickly run it in emulation. My workflow isn&#8217;t nearly as fancy as some other retro-programmers. I type my Applesoft in a text editor, then in AppleWin I paste the entire code listing into an emulated apple using&nbsp;<kbd>SHIFT+INSERT</kbd>. The benefit of using emulation as a development environment is that you can throttle the emulation to run hundreds of times faster (hit&nbsp;<kbd>ScrLK</kbd>) than real hardware. This makes testing small changes a breeze.</p>



<p>My first task was to see if I could successfully load a&nbsp;<em>Graphics Magician</em>&nbsp;image into a program. The program itself is a bit of a UI nightmare. Without a&nbsp;<a href="ftp://ftp.apple.asimov.net/pub/apple_II/documentation/applications/misc/Graphics%20Magician%20Picture%20Painter.pdf">manual</a>&nbsp;or reference card, it&#8217;s nearly impossible to know what keys do what. On top of that, the program requires that you use a joystick to move the drawing cursor on the screen. Fortunately, the manual can be found online and you can use a PC mouse as a joystick within AppleWin. I managed to crank out a couple of silly images for testing and save them to my game disk.</p>



<p>I then used to code provided in the manual to write a simple Applesoft program that displays the image:</p>



<pre class="wp-block-code"><code>1 PRINT CHR$ (4);"MAXFILES1"5 HIMEM: 32768
10 PRINT CHR$ (4);"BLOAD PICDRAWH"
20 PRINT CHR$ (4);"BLOAD ROOM1.SPC,A32768"
30 HGR
40 A = 32768:HI = INT (A / 256):LO = A - HI * 256: POKE 0,LO: POKE 1,HI50 CALL 36096</code></pre>



<p>In order for this code to work, you are required to copy PICDRAWH from the&nbsp;<em>Graphics Magician</em>&nbsp;disk to your disk. This is the machine code rendering engine that is loaded into memory at the top of this program. The&nbsp;<code>MAXFILES1</code>&nbsp;DOS command apparently frees up some memory by limiting the amount of open files. This command needs to be the first one in your code, before any string assignments, etc. I think&nbsp;<code>HIMEM</code>&nbsp;does something similar with allocating memory locations. I have never written an Applesoft program so large that it required memory management so the purpose of these commands alludes me somewhat. As this project grows, I may have to familiarize myself with them.</p>



<p>You will see&nbsp;<code>CHR$(4)</code>&nbsp;often in Applesoft programs.&nbsp;<code>CHR$()</code>&nbsp;is a function that retrieves the keyboard character in assigned to the numerical value in then parenthesis. For example,&nbsp;<code>PRINT CHR$(65)</code>&nbsp;prints the letter A. In this case, character number four is the equivalent of keying in&nbsp;<kbd>CTRL+D</kbd>. That instructs the computer that the next PRINTed string should be executed as a DOS command rather than PRINTed to the screen.</p>



<p>The&nbsp;<em>Graphics Magician</em>&nbsp;file is ROOM1.SPC.&nbsp;<code>BLOAD ROOM1.SPC,A32768</code>&nbsp;loads the drawing code into memory location 32768. That seems like a crazy random number but it is actually $8000 in hexidecimal.&nbsp;<code>HGR</code>&nbsp;switches to high-resolution graphics mode and then line 40 stores the memory address of the picture into a location PICDRAWH will know to look. Finally, the&nbsp;<code>CALL 36096</code>&nbsp;triggers the PICDRAWH draw routines.</p>



<p>There&#8217;s a lot of fancy stuff going on here, but it does the job as advertised.&nbsp;<em>The Graphics Magician</em>&nbsp;manual also goes deeper with more code that shows how to string multiple images into slide shows&nbsp;and how to overlay objects over backgrounds. More on that when I get to my object code. For now, this proof-of-concept was enough to get a simple working prototype up and running.</p>



<p><a href="https://robertgomez.org/blog/2018/03/19/apple-graphic-adventure-part-iii/" data-type="post" data-id="3003">Continued in Part III</a></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Apple ][ Graphic Adventure Part I</title>
		<link>https://robertgomez.org/blog/2018/03/17/apple-graphic-adventure-part-i/</link>
		
		<dc:creator><![CDATA[Robert Gomez]]></dc:creator>
		<pubDate>Sat, 17 Mar 2018 20:48:52 +0000</pubDate>
				<category><![CDATA[Robert's Blog]]></category>
		<category><![CDATA[adventure]]></category>
		<category><![CDATA[apple2]]></category>
		<category><![CDATA[applesoft]]></category>
		<category><![CDATA[Graphics Magician]]></category>
		<category><![CDATA[programming]]></category>
		<guid isPermaLink="false">https://robertgomez.org/?p=2995</guid>

					<description><![CDATA[Having recently played the Apple ][ game&#160;Transylvania&#160;and its&#160;sequel, I was inspired to&#160;mess with the art program which those games used.&#160;The Graphics Magician&#160;was a huge hit for Penguin Software, but I never actually had a chance to use it when we had an Apple ][. I just remember it being advertised in every computer magazine I [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Having recently played the Apple ][ game&nbsp;<a href="https://robertgomez.org/fun-stuff/games/transylvania/" data-type="game_review" data-id="2985"><em>Transylvania</em></a>&nbsp;and its&nbsp;<a href="https://robertgomez.org/fun-stuff/games/the-crimson-crown/" data-type="game_review" data-id="2990">sequel</a>, I was inspired to&nbsp;mess with the art program which those games used.&nbsp;<em>The Graphics Magician</em>&nbsp;was a huge hit for Penguin Software, but I never actually had a chance to use it when we had an Apple ][. I just remember it being advertised in every computer magazine I had.</p>



<p>My go to art program back in the day was always&nbsp;<em>Alpha Plot</em>&nbsp;from Beagle Bros. It wasn&#8217;t the easiest software to use. In fact, it came bundled with a cardboard overlay for your keyboard so you had an immediate reference as to what the various keys did. Still, I managed to draw pixel by pixel and create masterpieces like this:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="560" height="384" src="https://robertgomez.org/wp-content/uploads/2018/03/alpha-plot-gross.png" alt="" class="wp-image-2997" srcset="https://robertgomez.org/wp-content/uploads/2018/03/alpha-plot-gross.png 560w, https://robertgomez.org/wp-content/uploads/2018/03/alpha-plot-gross-300x206.png 300w" sizes="auto, (max-width: 560px) 100vw, 560px" /></figure>



<p><em>The Graphics Magician</em>&nbsp;is something altogether different though. Instead of meticulously drawing each point on the screen, you create images programatically using a language of lines, fills and brushes.&nbsp;The end product is what today we would call vector art.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="560" height="384" src="https://robertgomez.org/wp-content/uploads/2018/03/graphics-magician-weirdo.png" alt="" class="wp-image-2998" srcset="https://robertgomez.org/wp-content/uploads/2018/03/graphics-magician-weirdo.png 560w, https://robertgomez.org/wp-content/uploads/2018/03/graphics-magician-weirdo-300x206.png 300w" sizes="auto, (max-width: 560px) 100vw, 560px" /></figure>



<p>The advantage of vector art is that file sizes are small. The other advantage is that these drawing routines can be used within one&#8217;s own Apple ][ programs.</p>



<p>This gave me an idea for a project. Take the text-based&nbsp;<a href="https://robertgomez.org/node/467">adventure game</a>&nbsp;I had made years ago, and use these routines to add graphics to the game. As I type this, I am already pretty far along in the project, but I will be going back and documenting my progress.&nbsp;Hopefully someone might find this informative and, if I am able to follow through, maybe I will have a releasable game in the end. It&#8217;s doing more than I ever imagined already:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="700" height="462" src="https://robertgomez.org/wp-content/uploads/2018/03/parser-inprogress-01.jpg" alt="" class="wp-image-2999" srcset="https://robertgomez.org/wp-content/uploads/2018/03/parser-inprogress-01.jpg 700w, https://robertgomez.org/wp-content/uploads/2018/03/parser-inprogress-01-300x198.jpg 300w" sizes="auto, (max-width: 700px) 100vw, 700px" /></figure>



<p>Continue to <a href="https://robertgomez.org/blog/2018/03/18/apple-graphic-adventure-part-ii/" data-type="post" data-id="3001">Part II</a></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Apple ][ Assembly Language Programming</title>
		<link>https://robertgomez.org/blog/2015/09/14/apple-assembly-language-programming/</link>
		
		<dc:creator><![CDATA[Robert Gomez]]></dc:creator>
		<pubDate>Mon, 14 Sep 2015 16:50:59 +0000</pubDate>
				<category><![CDATA[Robert's Blog]]></category>
		<category><![CDATA[apple2]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[programming]]></category>
		<guid isPermaLink="false">https://robertgomez.org/?p=2847</guid>

					<description><![CDATA[The past few weeks I have been diving into the world of assembly language programming on the Apple ][ computer. My interest in the topic stems from the recent book release of a compilation of articles on assembly language programming called&#160;Assembly Lines: The Complete Book. The articles were written by Roger Wagner and originally published [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>The past few weeks I have been diving into the world of assembly language programming on the Apple ][ computer. My interest in the topic stems from the recent book release of a compilation of articles on assembly language programming called&nbsp;<em>Assembly Lines: The Complete Book</em>. The articles were written by Roger Wagner and originally published in&nbsp;<em>Softalk</em>&nbsp;magazine back in the early eighties. This edition was edited by&nbsp;<a href="https://www.youtube.com/channel/UCrnCRkPLoXXzTtWX9dBJsnA">Chris Torrence</a>&nbsp;and is available for&nbsp;<a href="https://openlibrary.org/works/OL17078830W/Assembly_Lines">download</a>&nbsp;and&nbsp;<a href="http://www.lulu.com/shop/roger-wagner/assembly-lines-the-complete-book/hardcover/product-21959093.html">purchase</a>&nbsp;from a number of locations.</p>



<p>Now, I am pretty familiar with Applesoft Basic programming, but I was always in awe of commercially released software on the Apple ][ that ran so fast, had fancy hi-res graphics and used sounds other than the system beep. What was the secret of these mythical programs that required you to type &#8220;BRUN&#8221; in order to get them to load? The secret was machine language.</p>



<figure class="wp-block-image alignright size-large"><img loading="lazy" decoding="async" width="190" height="142" src="https://robertgomez.org/wp-content/uploads/2015/09/machine-code.png" alt="" class="wp-image-2849"/></figure>



<p>This image shows you just how intuitive and user-friendly machine code is. It&#8217;s almost like it was written by the Terminator himself (just after he finished cutting out his eyeball with an Xacto knife). Despite the seeming impenetrability of machine code, in the past I made a few attempts to learn it. I would get a few chapters into&nbsp;<a href="http://www.amazon.com/Apple-Machine-Language-Don-Inman/dp/0835902307"><em>Apple Machine Language</em></a>&nbsp;and then the endless diversions into binary math would addle my art-school trained brain. It never really clicked for me.</p>



<p>What I didn&#8217;t know is that there was this thing called &#8220;assembly language&#8221; which is a human-readable method of creating machine code. It still is pretty brutal compared with Basic or JavaScript, but for the first time I think I am starting to understand machine language and, more generally, just how the Apple ][ works. Cryptic hex numbers and even the aforementioned binary math are still a part of assembly, but it uses three letter abbreviations for various functions and allows for comments and labels. The assembler will translate the letters into their numeric machine language equivalents and assemble the source code into a BRUN-able program. Woo-hoo!</p>



<p>The first hundred pages or so of <em>Assembly Lines</em> has been very informative and I have dutifully typed in many of the example programs. At one point I had a pretty nice &#8220;ah ha!&#8221; moment when I was messing around with creating tones. I created a small program that generated an annoying high pitch noise and decided I would further enhance the interactivity by outputting a stream of numbers to the screen showing the paddle positions. Before I got very far beyond just reading the paddles I noticed that I could use the joystick to change the pitch of the sound. I had no idea why this would change the pitch so I decided to look at the machine code in the built-in paddle routine. To my surprise, I was able to see that it got the paddle value by using a count down loop. The longer the count down, the lower the tone. I couldn&#8217;t really say why this was the case, but at least I was starting to be able to decipher that wall of hex values.</p>



<p>Now, back in the late eighties I got my hands on an issue of&nbsp;<em>Compute!</em>&nbsp;magazine. Kids nowadays with their fancy iWatches and download services may not believe this, but in the olden days there would be program listings in computer magazines. Readers could carefully type in the program and, &#8220;Voila!&#8221;, you had new software to use.&nbsp;<a href="https://archive.org/details/1985-05-compute-magazine">This issue</a>&nbsp;contained a listing for a game called&nbsp;<em>Space Dodger</em>, with a separate listing for just about every machine available at the time. Most were written in basic, but the one for Apple ][ was pure machine code. I had no idea what any of it meant, but I dutifully typed every line into my Apple&#8217;s monitor. The result was a pretty slick little arcade game:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="560" height="384" src="https://robertgomez.org/wp-content/uploads/2015/09/space-dodger.png" alt="" class="wp-image-2850" srcset="https://robertgomez.org/wp-content/uploads/2015/09/space-dodger.png 560w, https://robertgomez.org/wp-content/uploads/2015/09/space-dodger-300x206.png 300w" sizes="auto, (max-width: 560px) 100vw, 560px" /></figure>



<p>You moved your ship to avoid the space junk which flew by from right to left at varying speeds. However, playing the game in emulation, I noticed a slight problem: the ship movement was mapped to the wrong joystick axis.</p>



<p>And now we get to my second assembly language &#8220;Ah ha!&#8221; moment. I now know the memory address where the paddles are read. I just needed to search the code listing for 00 1E FB and it would just be a matter of changing the 00 to 01. I found the values at $706B, made my edit and, magically, the joystick now worked correctly!</p>



<p>I still have no clue as to what the other 99% of the code does, but this was a breakthrough. Assembly language&#8230; I think I can do this. In the meantime, download&nbsp;<em>Space Dodger</em>&nbsp;and play it in your favorite emulator.</p>



<div class="wp-block-file"><a href="https://robertgomez.org/wp-content/uploads/2015/09/space_dodger.zip">Space Dodger Disk Image from Compute! Magazine Issue #60</a><a href="https://robertgomez.org/wp-content/uploads/2015/09/space_dodger.zip" class="wp-block-file__button wp-element-button" download>Download</a></div>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>My First Foray into SASS</title>
		<link>https://robertgomez.org/blog/2015/06/12/my-first-foray-into-sass/</link>
		
		<dc:creator><![CDATA[Robert Gomez]]></dc:creator>
		<pubDate>Fri, 12 Jun 2015 14:33:11 +0000</pubDate>
				<category><![CDATA[Robert's Blog]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[sass]]></category>
		<category><![CDATA[web development]]></category>
		<guid isPermaLink="false">https://robertgomez.org/?p=2806</guid>

					<description><![CDATA[As I mentioned&#160;a few posts ago, this site has received a major theme overhaul. Aside from a couple form element styles, this change was mostly structural and behind-the-scenes. The new theme is my first foray into using the&#160;SASS&#160;CSS preprocessing language. Let me tell you, it was a revelation. SASS allows you to write CSS using [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>As I mentioned&nbsp;<a href="https://robertgomez.org/node/1237">a few posts ago</a>, this site has received a major theme overhaul. Aside from a couple form element styles, this change was mostly structural and behind-the-scenes. The new theme is my first foray into using the&nbsp;SASS&nbsp;CSS preprocessing language. Let me tell you, it was a revelation. SASS allows you to write CSS using a super-clean tabbed coding style and (finally) allows the use variables and expressions in styles. I mean, look at this&nbsp;OCD&nbsp;coder&#8217;s dreamscape:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="600" height="559" src="https://robertgomez.org/wp-content/uploads/2015/06/pof-sass-screenshot-med.png" alt="Behold the beauty of SASS!" class="wp-image-2808" srcset="https://robertgomez.org/wp-content/uploads/2015/06/pof-sass-screenshot-med.png 600w, https://robertgomez.org/wp-content/uploads/2015/06/pof-sass-screenshot-med-300x280.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></figure>



<p>Gone are curly brackets and semi-colons. Now elements can be nicely nested within each other and there&#8217;s lots of neat shorthand to make code more portable.</p>



<p>Now, I am very late to this party and it turns out much of the SASS code you find on the net is written in a more standard CSS syntax (those sass files are saved as .SCSS rather than .SASS). I hope this cleaner, more modern syntax remains supported because I am completely sold on it.</p>



<p>For quite some time I have heard of SASS but have always been hesitant to dig into it because I always assumed that it was some server-side application that would require SSH and Linux and a bunch of crap I don&#8217;t care about. I have since realized that this is not the case. SASS files are compiled locally into a single, standard CSS file. Still, the first thing tutorials seem to tell you to do is to go install Ruby and dive into the command prompt. Yeech! Thankfully, smart people out there (&#8220;there&#8221; equals Nepal in this case) have developed a windows app that will compile and upload everything you need.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="600" height="469" src="https://robertgomez.org/wp-content/uploads/2015/06/pof-sass-prepros.png" alt="Prepros Screengrab" class="wp-image-2809" srcset="https://robertgomez.org/wp-content/uploads/2015/06/pof-sass-prepros.png 600w, https://robertgomez.org/wp-content/uploads/2015/06/pof-sass-prepros-300x235.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></figure>



<p><a href="https://prepros.io/">Prepros</a>&nbsp;is a tiny little app that does it all and I highly recommend it if you are developing on Windows. It processes many other languages as well (including Jade and JavaScript) and, regarding SASS, also includes Compass.</p>



<p>Compass is a set of functions and extensions to SASS that makes cross-browser development super easy. A word of warning about Compass: unlike pure SASS it doesn&#8217;t work out-of-the-box and requires some research into creating a &#8220;config.rb&#8221; file. The Zen Drupal theme includes this file and I used that as a base, and I think I understand it now.</p>



<p>In any event, I&#8217;m syched about Web development for the first time in a long while and I am glad I made the leap. Also, support&nbsp;<a href="https://prepros.io/">Prepros</a>&nbsp;and buy a copy (or two).</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Haunted House Text Adventure</title>
		<link>https://robertgomez.org/blog/2012/11/08/haunted-house-text-adventure/</link>
					<comments>https://robertgomez.org/blog/2012/11/08/haunted-house-text-adventure/#comments</comments>
		
		<dc:creator><![CDATA[Robert Gomez]]></dc:creator>
		<pubDate>Thu, 08 Nov 2012 20:50:58 +0000</pubDate>
				<category><![CDATA[Robert's Blog]]></category>
		<category><![CDATA[adventure]]></category>
		<category><![CDATA[apple2]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[video games]]></category>
		<guid isPermaLink="false">https://robertgomez.org/?p=2600</guid>

					<description><![CDATA[Back in the late 80s, I learned much about computer programming from this book:&#160;Write Your Own Adventure Programs For Your Microcomputer. This is the same book that I used as a guide when creating&#160;Malfunction&#160;for my Apple IIgs back in 1988. The book takes you step-by-step through the process of creating a simple text adventure game [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Back in the late 80s, I learned much about computer programming from this book:&nbsp;<em><a href="http://amzn.com/0860207412">Write Your Own Adventure Programs For Your Microcomputer</a></em>. This is the same book that I used as a guide when creating&nbsp;<em><a href="https://robertgomez.org/blog/2009/07/14/my-apple-masterpiece-malfunction/" data-type="post" data-id="851">Malfunction</a></em>&nbsp;for my Apple IIgs back in 1988.</p>



<p>The book takes you step-by-step through the process of creating a simple text adventure game using Applesoft Basic. The final product is an adventure called &#8220;Haunted House.&#8221; It&#8217;s about as crude and bare bones as a work of interactive fiction can be, but it does what it needs to: there are objects, rooms and key puzzles.</p>



<figure class="wp-block-image size-large"><a class="no-popup" href="http://projects.robertgomez.org/haunted-house/v1.50/" target="_blank" rel="noopener noreferrer"><img loading="lazy" decoding="async" width="732" height="524" src="https://robertgomez.org/wp-content/uploads/2012/11/Haunted-House-Version-1.png" alt="" class="wp-image-2602" srcset="https://robertgomez.org/wp-content/uploads/2012/11/Haunted-House-Version-1.png 732w, https://robertgomez.org/wp-content/uploads/2012/11/Haunted-House-Version-1-300x215.png 300w" sizes="auto, (max-width: 732px) 100vw, 732px" /></a></figure>



<p>Well, in a recent flurry of Apple retro computing I got side tracked into porting this game into JavaScript. The result is <a href="http://projects.robertgomez.org/haunted-house/v1.50/" target="_blank" rel="noreferrer noopener">here</a>. Click the screenshot to launch the game in a new browser window (requires JavaScript, duh &#8211; View the actual page if you are viewing this in an RSS feed reader). It&#8217;s a fully working port of the original, with all its flaws and quirks. The only additions I made were to make the EXITS display more cleanly and added the verb &#8220;drop&#8221; to the vocabulary.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://robertgomez.org/blog/2012/11/08/haunted-house-text-adventure/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>Nova&#8217;s First &#8220;Hello World&#8221; Program</title>
		<link>https://robertgomez.org/blog/2010/08/12/novas-first-hello-world-program/</link>
		
		<dc:creator><![CDATA[Robert Gomez]]></dc:creator>
		<pubDate>Thu, 12 Aug 2010 21:03:27 +0000</pubDate>
				<category><![CDATA[Robert's Blog]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[Nova]]></category>
		<category><![CDATA[programming]]></category>
		<guid isPermaLink="false">https://robertgomez.org/?p=1333</guid>

					<description><![CDATA[My daughter created her first &#8220;Hello World&#8221; program to today. It was programmed in sidewalk chalk++.]]></description>
										<content:encoded><![CDATA[<img width="600" height="305" src="https://robertgomez.org/wp-content/uploads/2010/08/nova-hi-world.jpg" class="attachment-large size-large wp-post-image" alt="Nova&#039;s Hello World Chalk App" style="display: block; margin: 0 0 14px 0;" decoding="async" loading="lazy" srcset="https://robertgomez.org/wp-content/uploads/2010/08/nova-hi-world.jpg 600w, https://robertgomez.org/wp-content/uploads/2010/08/nova-hi-world-300x153.jpg 300w" sizes="auto, (max-width: 600px) 100vw, 600px" />
<p>My daughter created her first &#8220;Hello World&#8221; program to today. It was programmed in sidewalk chalk++.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>&#8220;Dippy Golf&#8221; &#8211; Another Apple ][ Game I Wrote as a Kid</title>
		<link>https://robertgomez.org/blog/2009/07/17/dippy-golf-another-apple-game-i-wrote-as-a-kid/</link>
		
		<dc:creator><![CDATA[Robert Gomez]]></dc:creator>
		<pubDate>Sat, 18 Jul 2009 04:25:13 +0000</pubDate>
				<category><![CDATA[Robert's Blog]]></category>
		<category><![CDATA[apple2]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[retrocomputing]]></category>
		<category><![CDATA[video games]]></category>
		<guid isPermaLink="false">https://robertgomez.org/?p=858</guid>

					<description><![CDATA[After posting&#160;Malfunction, my text adventure game for the Apple ][, I have been spending a whole bunch of time tinkering with my old Apple ][ software creations. Another one of my better creations was a golf game that I titled,&#160;Dippy Golf. This game featured nine holes which were loaded in from external graphics files and, [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="560" height="385" src="https://robertgomez.org/wp-content/uploads/2009/07/Dippy-Golf-Splash.png" class="attachment-large size-large wp-post-image" alt="Dippy Golf Splash" style="display: block; margin: 0 0 14px 0;" decoding="async" loading="lazy" srcset="https://robertgomez.org/wp-content/uploads/2009/07/Dippy-Golf-Splash.png 560w, https://robertgomez.org/wp-content/uploads/2009/07/Dippy-Golf-Splash-300x206.png 300w" sizes="auto, (max-width: 560px) 100vw, 560px" />
<p>After posting&nbsp;<a href="https://robertgomez.org/blog/2009/07/14/my-apple-masterpiece-malfunction/" data-type="post" data-id="851"><em>Malfunction</em></a>, my text adventure game for the Apple ][, I have been spending a whole bunch of time tinkering with my old Apple ][ software creations. Another one of my better creations was a golf game that I titled,&nbsp;<em>Dippy Golf</em>. This game featured nine holes which were loaded in from external graphics files and, even more impressive, was the use of audio samples of my voice! The game worked but still felt somewhat unfinished, so I decided to complete the game and post it here on the Pages of Fun!</p>



<p>One of the first major additions that you will see is the snazzy splash page and loading message:</p>



<p>This was actually the last thing I&nbsp;added to the new version of the game, but I wanted to use my other upgraded piece of software,&nbsp;<em>Lo-Paint 2</em>. More about that later. The game takes several seconds to load the audio samples. Creating samples on the Apple ][ was incredibly difficult. I used a piece of software called&nbsp;<em>The Voice</em>&nbsp;by Muse. This application was developed in part&nbsp; by Silas Warner, the creator of the&nbsp;<em>Castle Wolfenstein</em>&nbsp;series of games.</p>



<p>The process of getting audio into the computer required taping myself on a cassette recorder, than plugging the recorder into the never-really-used tape data jack on the back of the Apple ][. The sound quality is awful, but this was about the best you could do on an Apple ][. You should note, that this is a golf game, so one of the samples is a naughty word. I stole the idea from an early Mac golf game which my neighbor owned.</p>



<p>Anyhow, on to the introduction/instructions screen:</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;69fc283688c5a&quot;}" data-wp-interactive="core/image" data-wp-key="69fc283688c5a" class="wp-block-image size-large wp-lightbox-container"><img loading="lazy" decoding="async" width="560" height="385" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://robertgomez.org/wp-content/uploads/2009/07/Dippy-Golf-Intro.png" alt="Dippy Golf Instructions" class="wp-image-861" srcset="https://robertgomez.org/wp-content/uploads/2009/07/Dippy-Golf-Intro.png 560w, https://robertgomez.org/wp-content/uploads/2009/07/Dippy-Golf-Intro-300x206.png 300w" sizes="auto, (max-width: 560px) 100vw, 560px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p>I&nbsp;love that old, uppercase Apple ][ font. One of my improvements here was to center the text on the page and use a nicer prompt for a key press. After this page you proceed to the first hole:</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;69fc283689329&quot;}" data-wp-interactive="core/image" data-wp-key="69fc283689329" class="wp-block-image size-large wp-lightbox-container"><img loading="lazy" decoding="async" width="560" height="385" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://robertgomez.org/wp-content/uploads/2009/07/Dippy-Golf-Hole1.png" alt="Dippy Golf Hole 1" class="wp-image-862" srcset="https://robertgomez.org/wp-content/uploads/2009/07/Dippy-Golf-Hole1.png 560w, https://robertgomez.org/wp-content/uploads/2009/07/Dippy-Golf-Hole1-300x206.png 300w" sizes="auto, (max-width: 560px) 100vw, 560px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p>As you can see, the graphics are in Apple 2 lo-res mode graphics. In this mode you are allowed 40&#215;40 pixels, 16 colors and four lines of text. As crude as this image is, I believe it&#8217;s actually higher resolution than Atari 2600 golf.</p>



<p>The game mechanics are simple. You point in a direction then specify how hard you want to hit the ball. This was fine as a proof of concept, but didn&#8217;t provide much challenge once you memorized the best angles and swing percentages for each hole. The major 2009 update to game play was the addition of the random element of the wind. This makes the ball behavior somewhat unpredictable (like real golf for me) and can push the player into taking riskier shots in hopes of catching that breeze for a few extra pixels of distance. On some holes, like the one pictured next,&nbsp; it really adds to the challenge.</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;69fc283689a0c&quot;}" data-wp-interactive="core/image" data-wp-key="69fc283689a0c" class="wp-block-image size-large wp-lightbox-container"><img loading="lazy" decoding="async" width="560" height="385" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://robertgomez.org/wp-content/uploads/2009/07/Dippy-Golf-Hole4.png" alt="Dippy Golf Hole 4" class="wp-image-863" srcset="https://robertgomez.org/wp-content/uploads/2009/07/Dippy-Golf-Hole4.png 560w, https://robertgomez.org/wp-content/uploads/2009/07/Dippy-Golf-Hole4-300x206.png 300w" sizes="auto, (max-width: 560px) 100vw, 560px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p>Without the wind, you could reliably hit to the micro-islands off the right of the screen.</p>



<p>All of these holes where drawn using an art tool which I programmed called&nbsp;<em>Lo-Paint</em>. In addition to my&nbsp;<em>Dippy Golf</em>&nbsp;updates, I&nbsp;also updated&nbsp;<em>Lo-Paint</em>&nbsp;and included it on the disk. This was a major upgrade to the tool so I consider this version 2 of the software. The interface has been completely revamped and now you can save and load lo-res images! Check out this screen shot of&nbsp;<em>Lo-Paint 2</em>&nbsp;in action!</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;69fc28368a09a&quot;}" data-wp-interactive="core/image" data-wp-key="69fc28368a09a" class="wp-block-image size-large wp-lightbox-container"><img loading="lazy" decoding="async" width="560" height="385" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://robertgomez.org/wp-content/uploads/2009/07/lo-paint-2.png" alt="Lo-Paint 2" class="wp-image-864" srcset="https://robertgomez.org/wp-content/uploads/2009/07/lo-paint-2.png 560w, https://robertgomez.org/wp-content/uploads/2009/07/lo-paint-2-300x206.png 300w" sizes="auto, (max-width: 560px) 100vw, 560px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p>If you want to try out&nbsp;<em>Lo-Paint 2</em>&nbsp;or&nbsp;<em>Dippy Golf</em>&nbsp;download the disk image which is attached to this post and open it up in&nbsp;<a href="http://applewin.berlios.de/">AppleWin</a>&nbsp;or your favorite Apple ][ emulator.</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;69fc28368a77a&quot;}" data-wp-interactive="core/image" data-wp-key="69fc28368a77a" class="wp-block-image size-large wp-lightbox-container"><img loading="lazy" decoding="async" width="560" height="385" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://robertgomez.org/wp-content/uploads/2009/07/Dippy-Golf-Exit.png" alt="Dippy Golf Exit" class="wp-image-865" srcset="https://robertgomez.org/wp-content/uploads/2009/07/Dippy-Golf-Exit.png 560w, https://robertgomez.org/wp-content/uploads/2009/07/Dippy-Golf-Exit-300x206.png 300w" sizes="auto, (max-width: 560px) 100vw, 560px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<div class="wp-block-file"><a href="https://robertgomez.org/wp-content/uploads/2009/07/Dippy_Golf_1987_Robert_Gomez.zip">Dippy Golf (1987) by Robert Gomez</a><a href="https://robertgomez.org/wp-content/uploads/2009/07/Dippy_Golf_1987_Robert_Gomez.zip" class="wp-block-file__button wp-element-button" download>Download</a></div>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>My Apple ][ Masterpiece, &#8220;Malfunction&#8221;</title>
		<link>https://robertgomez.org/blog/2009/07/14/my-apple-masterpiece-malfunction/</link>
					<comments>https://robertgomez.org/blog/2009/07/14/my-apple-masterpiece-malfunction/#comments</comments>
		
		<dc:creator><![CDATA[Robert Gomez]]></dc:creator>
		<pubDate>Wed, 15 Jul 2009 03:45:25 +0000</pubDate>
				<category><![CDATA[Robert's Blog]]></category>
		<category><![CDATA[adventure]]></category>
		<category><![CDATA[apple2]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[retrocomputing]]></category>
		<guid isPermaLink="false">https://robertgomez.org/?p=851</guid>

					<description><![CDATA[(Okay,&#160;Masterpiece&#160;should probably be in quotes too!) I have been on a bit of a retro computing kick this evening. I have been playing around with AppleWin, which is the best Apple ][ emulator for Windows that I know of. I played a little bit of the original&#160;Castle Wolfenstein&#160;and then decided to fire up my trusty [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="560" height="384" src="https://robertgomez.org/wp-content/uploads/2009/07/malfunction-splash.png" class="attachment-large size-large wp-post-image" alt="Malfunction Splash Page" style="display: block; margin: 0 0 14px 0;" decoding="async" loading="lazy" srcset="https://robertgomez.org/wp-content/uploads/2009/07/malfunction-splash.png 560w, https://robertgomez.org/wp-content/uploads/2009/07/malfunction-splash-300x206.png 300w" sizes="auto, (max-width: 560px) 100vw, 560px" />
<p>(Okay,&nbsp;<em>Masterpiece&nbsp;</em>should probably be in quotes too!) I have been on a bit of a retro computing kick this evening. I have been playing around with AppleWin, which is the best Apple ][ emulator for Windows that I know of. I played a little bit of the original&nbsp;<em>Castle Wolfenstein</em>&nbsp;and then decided to fire up my trusty Apple ][gs and port some of my old Applesoft programs to PC.</p>



<p>The process of transforming a 5.25&#8243; floppy to a disk image is somewhat complicated, but not too bad if you have the right tools. First, I turned on my ][gs and booted the System 6 disk. I then ran the awesome program Asimov (by&nbsp;<a href="http://www.ninjaforce.com/">Ninjaforce</a>) which can create and &#8220;burn&#8221; Apple ][ disk images. I was able to save six 5.25&#8243; disk images onto a single 3.5&#8243; ProDos floppy.&nbsp;The next step is taking this 3.5&#8243; floppy down to my System 9 Mac which I keep stowed away in my basement. The old Mac system could read ProDos disks so I am able to pull the files off the floppy and then save them to a PC formatted 3.5&#8243; floppy (or send them over a network, but I am not connected in my basement). I have a USB floppy drive on my PC specifically for this purpose. Once the disk images are on my PC&#8217;s hard drive (with a .dsk extension) I can boot them in AppleWin.</p>



<figure class="wp-block-image alignright size-large"><img loading="lazy" decoding="async" width="286" height="400" src="https://robertgomez.org/wp-content/uploads/2009/07/adventure-cover.jpg" alt="Write Your Own Adventure Programs For Your Microcomputer" class="wp-image-854" srcset="https://robertgomez.org/wp-content/uploads/2009/07/adventure-cover.jpg 286w, https://robertgomez.org/wp-content/uploads/2009/07/adventure-cover-215x300.jpg 215w" sizes="auto, (max-width: 286px) 100vw, 286px" /></figure>



<p>I&nbsp;spent a few hours running my old programs. Most of them are pretty stupid, but I can&#8217;t believe I wrote them as a 10 or 11 year-old. I will post some screenshots in the near future. However, sometime in my sophomore or junior year of high school I&nbsp;took the time to create a full text adventure called, &#8220;Malfunction.&#8221; My code was based on the code in the book&nbsp;<em>Write Your Own Adventure Programs For Your Microcomputer</em>&nbsp;by&nbsp;Usborne Computer Books. The book guided you through the creation of a haunted house game. I was taken step-by-step through the process of game design–from creating maps and puzzles to programming a text parser. This was a great book, and I&#8217;d love to see an updated, perhaps Flash actionscript oriented, version.</p>



<p>Now, more than 20 years later, I&nbsp;have decided to publish my game!</p>



<p>In order to play the game you will need to install an Apple 2 emulator. For windows, I use&nbsp;<a href="http://applewin.berlios.de/">AppleWin</a>. It&#8217;s really simple and runs near-perfectly. As for other platforms like Mac, I&#8217;m not-so-sure. Look to Google for your answers.</p>



<p>The game is mediocre at best, but I am pretty proud of it. I learned a ton about programming when I created this. I hope you enjoy it. Please feel free to leave me some comments about what you think.</p>



<div class="wp-block-file alignleft"><a id="wp-block-file--media-23c13417-13f9-4339-ad96-8cd5fa5e76b6" href="https://robertgomez.org/wp-content/uploads/2009/07/Malfunction_1988_Robert_Gomez.zip">Malfunction 1988 &#8211; Robert Gomez</a><a href="https://robertgomez.org/wp-content/uploads/2009/07/Malfunction_1988_Robert_Gomez.zip" class="wp-block-file__button wp-element-button" download aria-describedby="wp-block-file--media-23c13417-13f9-4339-ad96-8cd5fa5e76b6">Download</a></div>
]]></content:encoded>
					
					<wfw:commentRss>https://robertgomez.org/blog/2009/07/14/my-apple-masterpiece-malfunction/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
	</channel>
</rss>
