Jump to content
IGNORED

My first game in assembler


olix

Recommended Posts

16 minutes ago, manterola said:

At least for me, the main struggle with assembler is related with the implementation of "functions"

In pure assembler there are no "functions" as such, just subroutines, however with modern assemblers like MADS

functions (procedures) are available with or without passed in variables

i.e.

aproc .proc

code here...

        RTS

        .endp

or

myproc .proc (.byte var1, .word var2)

 

code here ....

           RTS

           .endp

 

Generally code in VBI is screen orientated (including PM's) where you want to complete processing while the

screen is not being drawn.

 

Your MAIN code loop can be doing anything needed outside of VBI, but it is still possible to synchronise it with the VBI by setting/clearing

handshake flags between to 2 processes.

 

DLI's by their nature are short/sharp processes and generally used to change line/screen colours on the fly or move PM's horizontally

enabling the same player to appear in a different horizontal position further down the screen, if DLI's take too long

to process, you will see some corruption on screen or undesirable effects. 

  • Thanks 1
Link to comment
Share on other sites

I totally agree with the subject of "functions", "procedures" or "reusable code" kind of theme, and there is this whole thing about passing arguments using the accumulator or using the page 0 available locations, etc. That for me is something I have read in theory, and play a bit in practice but I don't feel particularly comfortable about it yet. 

Regarding the "main loop" I have seen games that do everything in the VBI, and almost nothing except init in the main program. I think that way is a good ption with simple games, so you dont worry bout synching the different parts of your program. 

Anyway, sorry for hijacking this post, just wanted to add a bit to the conversation regarding obstacles for Assembler newbies like me, coming from basic, c, pascal, fortran, etc. traditional languages.

 

Edited by manterola
Link to comment
Share on other sites

2 hours ago, Wally1 said:

rdefabri,

 

i'm 52.  

 

you're never too old!

it sharpens one's mind.

 

one trick is to generously use comments when coding..

 

-Wally1

 

and gyros are great!

 

I got you by a year (53) - I think with some guidance I could learn it but my head is so oriented around high level languages that assembler is a different beast for me.  I may try the baby steps but first I have to create something using BASIC, then I’ll move up.

Link to comment
Share on other sites

On 8/23/2022 at 12:41 PM, olix said:

When I had my first Atari 400 in the early 80's, there was one game I always was jealous about VCS owners: Haunted House. I hadn't even played the game in the past, but loved the pictures on the box and the "spooky" story described in the Atari catalog. Is it really possible that there hasn't been a port of it for the Atari 8-bit computers to this day?

 

So I decided to write my own version of this game. But it's not an emulation of the original code, I'm reprogramming the game with my own code. This is actually my first machine language game ever.

That's funny, in 2002 I took exactly thesame route as you did! 🙂

 

Then, I was also wondering why there was no haunted house for the Atari 8 bit line - and was also learning assembly and did some small try out on the Atari 2600. But the system I prefered was the 800XL (the 8 bit line) what I had when I was a child. So I wanted to make a 8 bit clone - but I never finished it 🙂

Just for fun I searched my post from 20 years ago:


I really hope you finish you're haunted house and that we can have fun playing this 2600 classic!!

  • Like 1
Link to comment
Share on other sites

3 hours ago, Thelen said:

That's funny, in 2002 I took exactly thesame route as you did! 🙂

 

Then, I was also wondering why there was no haunted house for the Atari 8 bit line - and was also learning assembly and did some small try out on the Atari 2600. But the system I prefered was the 800XL (the 8 bit line) what I had when I was a child. So I wanted to make a 8 bit clone - but I never finished it 🙂

OK. So i'm not the first one, trying to port Hauntd House. Why did you never finished the game?

 

I'm a few steps further. I see you used the PM-Collision-Detection. This was also my first try. But I didn't like the wiggling of the eyes when they touch a wall. So know i use a software based collision detection. I's a lot smoother.  Also i have since some days the diagonal movement implemented. And my firelight looks more like the original one. 

 

Next step is building the stairs and the movement to the other foors. I think this is not so difficult. After that i will install the items. And then the monsters, sound, scoreboard ..... so alot of work to do.

 

And thanks to all AtariAge users here in the forum for the good words, that's really motivating.

 
  • Like 1
Link to comment
Share on other sites

21 hours ago, olix said:

Why did you never finished the game?

Well I don't know exectly anymore... When I was (20) years younger I started every month an new game or project and never finished something. 30 years ago I started every week a new game. (in Basic) I've made progress, now just once a year ;-)


 

21 hours ago, olix said:

I'm a few steps further. I see you used the PM-Collision-Detection. This was also my first try. But I didn't like the wiggling of the eyes when they touch a wall.

Didn't like that either, much better to do software collision!

Great job you're doing for the 1st time 6502 asm!

  • Haha 1
Link to comment
Share on other sites

2 hours ago, Thelen said:

Well I don't know exectly anymore... When I was (20) years younger I started every month an new game or project and never finished something. 30 years ago I started every week a new game. (in Basic) I've made progress, now just once a year ;-)


 

Didn't like that either, much better to do software collision!

Great job you're doing for the 1st time 6502 asm!

Sounds familiar!

  • Haha 1
Link to comment
Share on other sites

  • 4 weeks later...

Things are going on. There are a lot things to to, but i'm making progress:

 

The player can now move through all four floors of the mansion. You can collect the items and build the vase. After collecting all three parts of the vase, you can leave the house and the game starts again.

 

So, what's missing and coming in the next big step are the ghost, spieder and bat.... 

  • Like 7
Link to comment
Share on other sites

9 hours ago, Stefan Both said:

There must be that opcode !!!

At least, jwr must exist in my programs... 🤭

 

Jump Without Reason 😒

Ah, ok... this is all I was able to come up with (from the web).

 

Acronym    Definition
JWR    Jewish World Review
JWR    Just Within Reach
JWR    Jehovah's Witness Recovery
JWR    Johnny Walker Red (whiskey)
JWR    James Wegg Review (website)
JWR    Joint War Room
 

"Jump Without Reason"... sounds like some sort of involuntary habit (or Tourette syndrome symptom).

 

  • Haha 5
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...