Okay, enough personal stuff. Let's get to coding. So, on the last post I threw a bunch of stuff at you, like a text editor, an assembler...all that good stuff. Now that you have your first piece of code in hand, however, shouldn't we be moving on to the actual code?
So, if you're using ConTEXT and followed the steps correctly, then you should be able to open up the code in it and see some pretty colors on the text. Awesome, I know. But the question is, how do we turn this thing into a game?
Simple! Go to Options > Environment Options, and a little box should pop up. Go to "Execute Keys", press Add, and type in "s,asm,inc,z80". Those are the file types we'll usually be working with.
Now the window should look like this:
So that's just wonderful. Now let's try and set up the actual compile button.
Simply copy off of this photo down here for this one.
But wait a second...How are we going to open up an SMS file??? We don't have an emulator...
Yup, that's right, because I didn't give you one yet. Go ahead and get MEKA here.
So tell Windows that you want to open up the SMS file with MEKA, and if all goes well, the game screen should look like this:
What if it didn't compile, though? Well, the only big mistake I can think of is that you didn't read in the last part about editing the compile.bat file. Open it up in Notepad, and make sure that the paths to your WLA binaries are both correct. Message me at nicklausw@programmer.net if you can't quite figure things out.
So now we've gotten a good code file working. There's something I would like you to try. Go to this area in the code (line 186):
And change "Hi, retro friends!" to whatever you want it to be. It's always fun to mess around with the classic hello world examples.
Anyway, that's all for this part! Next time, we'll be looking further into the code, and seeing what all is going on. Until then, cya.
No comments:
Post a Comment