Jump to content
IGNORED

Assembler playfield


Recommended Posts

For some reason I'm having difficulties finding books which would show me a good way to draw a playfield / levels for a simple 2d game with Assembler.

 

Many books describe how to write your own character set though. Is that the best way to do it? Can you recommend any books or articles?

 

I would imagine this is something almost every game programmer has done. Strange that i can't find any examples.

Link to comment
Share on other sites

Are you after a character set and level designer tool for certain graphics modes (which mode)? I've used Envision (the Atari version) for Ramp Rage but probably others can advise on this better.

 

I've found Atari Graphics & Arcade Game Design a great book - http://www.atariarchives.org/

 

:)

Link to comment
Share on other sites

Thanks for the tips! I think I'm going to try out some of the level design tools next. I'm not after anything specific. The problem I have with the old books is that there may be a chapter "this is how you create a custom character set" but I'd be more interested about "this is how I build levels with the custom character set". So I guess I'm more interested about the overall process and game design since that is still a bit vague to me, but maybe that's just me.

  • Like 1
Link to comment
Share on other sites

If you are somewhat familiar with BASIC, study the code of BASIC games. The principle in assembler is very similar.

Archives of type-in-listings makes the access very easy.

E.g. examine page 3 & 4 of this listing:

http://ataribasiclistings.mygamesonline.org/Computronic/Computronic-12-87.pdf

...and you get an idea how level data is applied...

Edited by Irgendwer
  • Like 1
Link to comment
Share on other sites

Similarly, if you do take a look at the Envision tool and the examples that come with it, it wasn't clear whether you are looking to develop something with static or scrolling screens which would have an impact on design. Another thing to try would be to examine games that are similar to what you want to try and achieve and study their inner workings via the debugger in Altirra, typically starting with the ".dumpdlist" command and looking at the DLI routine(s) pointed to by address $200.

Link to comment
Share on other sites

What I did was create my own mini programming codes for drawing levels, screens, etc. like SET (character), CHR(character), HLN (horizontal line), VLN (vertical line), BLK (block). It will be in a format like dta HLN,5,5,10, which draws the a line of 10 characters at screen position 5,5. It is known as procedural screen drawing. Have a ENS for End Screen Draw. I am able to draw hundreds of screens in very little memory space with this programming.

Get_Screen_Positions
        ldy Read_Pointer 
        lda (Read_NDX),Y    
        sta Screen_X
        iny
        lda (Read_NDX),Y
        tax        
        iny
        STY Read_Pointer
        LDA Screen_X
        CLC
        ADC :MULT48LO,X    
        STA SCRPOS + 0
        LDA :MULT48HI,X
        ADC #$00
        STA SCRPOS + 1
        RTS
    
Get_Rectangle_Dimensions    
        clc
        sta temp
        and #$0F
        adc #$01
        sta Rec_Width  
        lda Temp
        lsr @        
        lsr @        
        lsr @            
        lsr @            
        clc                
        adc #$01    
        sta Rec_Height
        rts                  

Draw_Horizontal_Line
       LDA Draw_Character
Horizontal_Line_Loop
       DEY
       STA (SCRPOS), Y
       BNE Horizontal_Line_Loop
       RTS
Edited by peteym5
  • Like 2
Link to comment
Share on other sites

What sort of game are you working on or thinking about w_i_d - a platformer?

 

Take Mr.Robot - It's funny that sometimes other people find unusual ways of arranging things or using "features" of the elements to produce some really different levels - a recent HSC round played a couple of our home brew sets.

:)

Link to comment
Share on other sites

I think I'll try to make a simple top down "collect things, evade monsters" type of game to get started. I was also thinking about platformer, but there have been so many so good platformers that I think it would be difficult to make one that isn't horrible.

Sounds a good idea, these games are usually fun. If you get even a working demo you could enter it into the abbuc software contest :)

  • Like 1
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...