Author Topic: So what next?  (Read 8722 times)

0 Members and 1 Guest are viewing this topic.

Offline thydowulays

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 184
  • Rating: +12/-1
  • Don't gimme dat lip
    • View Profile
    • Thy Gaming Forum
So what next?
« on: January 09, 2012, 10:14:10 pm »
So, I must say I am quite happy to announce that I have successfully completed Hot Dogs ASM tutorial and ASM in 28 days. It's cool and all, but I don't really know where to go from here. Would anyone suggest anything? I don't know how to do sprites yet and ASM in 28 days' tutorial on it is too difficult to understand. If you know anybody that can help with this, could you please? I would really like to start making ASM games, as the ASM section is declining quite badly and I'd like to see more than 1-2 projects in the works :) Also, does anyone have any simple source code for a simple game I can see? Thanks so much everybody here, I am no longer restricted to just BASIC or Axe, but now I know a lot more. Sincerely, thydowulays
Current Projects:
-Sparta GUI Library: 25% - Alpha Stage
-Grapher - 75% - Beta Stage *on hiatus




Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: So what next?
« Reply #1 on: January 09, 2012, 10:15:18 pm »
http://ticalc.org/pub/83plus/asm/source/ has lots of them. Good luck!




Offline thydowulays

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 184
  • Rating: +12/-1
  • Don't gimme dat lip
    • View Profile
    • Thy Gaming Forum
Re: So what next?
« Reply #2 on: January 09, 2012, 10:16:30 pm »
Thanks! I didn't even know Ticalc had a section for sources o.o
Current Projects:
-Sparta GUI Library: 25% - Alpha Stage
-Grapher - 75% - Beta Stage *on hiatus




Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: So what next?
« Reply #3 on: January 10, 2012, 07:15:39 am »
You could also try to write a small game to get your feet wet. If you have any questions (sprites or otherwise) you can always post them <a href=http://www.omnimaga.org/index.php?board=85.0>here,</a> or ask in IRC if some one is around. There are plenty of knowledgeable people willing to help out. ;) <a href=http://wikiti.brandonw.net/index.php?title=WikiTI_Home>WikiTI</a> is also an excellent resource.

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: So what next?
« Reply #4 on: January 10, 2012, 10:58:55 am »
Yay! Another ASM programmer! To start out with, the ion routines should work well, they're easy to use and supported by pretty much all modern shells. If you want, start a few easy projects or two and post them here and i (or we :)) can help you get started, if you have questions on how to do this or that, etc. I've also posted the source to Monopoly (and the RPG i started) and can upload the current source(s) if you want to take a look through it(them), though it might be a little confusing. Later i plan to document everything a lot better, but they're there if you want them and i'd be more than glad to explain anything you don't understand (or if you have questions about the source of another game from ticalc). Reading through the old asm programming help sections on sites like MaxCoderz (or RevSoft, though you'd have to use the wayback machine) can be interesting.

Do you have any ideas of games you'd like to try to write?

EDIT: And if you have any particular questions about sprites, ask away. To copy the graphbuffer (gbuf) to the LCD, i'd just use ion's fastcopy routine.
« Last Edit: January 10, 2012, 11:01:19 am by chickendude »

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: So what next?
« Reply #5 on: January 10, 2012, 12:13:42 pm »
Wow, there isn't a sprite tutorial yet? Well I will say that I much prefer aligned sprites as they are a lot simpler, smaller, and faster. You have a few ways to draw aligned sprites. You can draw them directly to the LCD or to the buffer. Drawing to the buffer is faster, so in this explanation, we will draw there. The screen buffer is set up with 12 bytes per row and 64 rows. If you want to draw 8x8 tiles you will have 12 to fit across and 8 down. So here is a routine I will call DrawTile and it will use a mask of OR (it draws on top of the data like the OS RecallPic ):
Code: [Select]
DrawTile:
;Inputs:
;     A is the tile number (0 to 95, draws columns, then rows)
;     DE points to the sprite data
     sub 96               ;this will set the c flag if the result is negative
     ret nc               ;Exits if the sprite is out of range
     ld bc,96             ;there are 96 bytes in 8 rows
     ld hl,plotSScreen-96 ;the graph buffer minus 96
       add hl,bc          ;Next row down
       add a,12           ;We are eliminating rows
       jr nc,$-3          ;
     ld c,a               ;b is already 0, so do not worry
     add hl,bc            ;BC is the X offset
;HL points to where to draw the sprite
;DE points to the sprite data
     ld bc,080Ch          ;sets C to 12 and B to 8 (the height of th sprite
TileLoop:
        ld a,(de)         ;gets the next byte of the sprite
        or (hl)           ;performs OR logic witht he buffer
        ld (hl),a         ;copies the data to the buffer
        inc de            ;points to the next sprite byte
        ld a,b            ;we are saving B
        ld b,0            ;now BC is 12
        add hl,bc         ;Now HL points tot he next row
        ld b,a            ;restores b
        djnz TileLoop     ;Decrements B, if it is not 0, loop again
      ret
with the "or (hl)" part, you can change that to other forms of logic. Some examples are:
To overwrite the screen data, remove the or (hl)
To use AND logic, replace or (hl) with and (hl)
To use XOR logic, replace or (hl) with xor (hl)
To erase, you need to invert the sprite data and use it asa mask. replace or (hl) with cpl \ and (hl)
Draw the sprite inverted and overwrite the screen data, replace or (hl) with cpl
EDIT: Also, you can easily incorporate that as a subroutine for drawing a tilemap, if you wanted to :)

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: So what next?
« Reply #6 on: January 10, 2012, 05:07:29 pm »
As far as your first project goes, make something really simple that you can complete without too much difficulty. I think a great starting game would be a tunnel game or a snake game, both are relatively simple. For even more simplicity, you could make them homescreen based games. (Be aware that asm is like 100 times faster than basic for homescreen stuff)

Also, most importantly, whatever you make, don't upload it to ticalc.org. You wouldn't want to tarnish your name now would you? (In 6 months, you will laugh at this game and will be glad I told you not to release it)
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline thydowulays

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 184
  • Rating: +12/-1
  • Don't gimme dat lip
    • View Profile
    • Thy Gaming Forum
Re: So what next?
« Reply #7 on: January 10, 2012, 05:12:04 pm »
@Xeda112358, okay I get that! Thanks!

And my game will be super simple, asm still confuses me a little bit, so don't expect much lol

@thepenguin77 Thanks for the advice! Only one thing though, I don't even know how to make a tunnel game in Axe, let alone asm lol. I think my first game will be a homescreen maze game, using ASCII characters. It'll be called ASCIIAdventures lol. Do you know of any tunnel games in Axe that I could look at the source for? I've always wanted to learn how to do that..... thanks! :)
Current Projects:
-Sparta GUI Library: 25% - Alpha Stage
-Grapher - 75% - Beta Stage *on hiatus




Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: So what next?
« Reply #8 on: January 10, 2012, 05:13:47 pm »
You can try this for a sprite tutorial:

http://www.omnimaga.org/index.php?action=dlattach;topic=2076.0;attach=2964

It's a lesson I haven't officially released, but you can at least learn about "Display Image", which is a sweet BCALL for beginners and sprites

Offline thydowulays

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 184
  • Rating: +12/-1
  • Don't gimme dat lip
    • View Profile
    • Thy Gaming Forum
Re: So what next?
« Reply #9 on: January 10, 2012, 05:14:41 pm »
Thanks so much! Also, thanks for your amazing tutorial, I would have never learned ASM if it wasn't for it :)
Current Projects:
-Sparta GUI Library: 25% - Alpha Stage
-Grapher - 75% - Beta Stage *on hiatus




Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: So what next?
« Reply #10 on: January 10, 2012, 05:20:05 pm »
You're welcome!  And I'm in agreement with other people on the page.  Start with something small.  Something like "what number am I thinking of" or a tic-tac-toe game

Offline thydowulays

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 184
  • Rating: +12/-1
  • Don't gimme dat lip
    • View Profile
    • Thy Gaming Forum
Re: So what next?
« Reply #11 on: January 10, 2012, 05:48:46 pm »
Okay! Wait, what exactly does the SRL instruction do?
Current Projects:
-Sparta GUI Library: 25% - Alpha Stage
-Grapher - 75% - Beta Stage *on hiatus




Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: So what next?
« Reply #12 on: January 10, 2012, 06:16:02 pm »
It shifts the bits of a register to the right. To quote 28 Days:
Quote from: Z80 Instruction Set
The contents of reg8 are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7.
So if E were 01101011 (in binary), SRL E would leave it as 00110101 with the carry flag set.




Offline thydowulays

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 184
  • Rating: +12/-1
  • Don't gimme dat lip
    • View Profile
    • Thy Gaming Forum
Re: So what next?
« Reply #13 on: January 10, 2012, 06:17:44 pm »
Ok thanks! I get that. And I am making my game right now, I'm done with the menu screen, now I'm working on the game itself....
Current Projects:
-Sparta GUI Library: 25% - Alpha Stage
-Grapher - 75% - Beta Stage *on hiatus




Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: So what next?
« Reply #14 on: January 10, 2012, 06:19:53 pm »
SRL will shift a register right and load a 0 into bit 7. the original bit 0 will now be in the carry flag :)

Also, Thepenguin77: Great advice and that is too true :)

Also, for a tunnel game, shifting the screen up or down a pixel is rather simple if you use lddr. To shift down and not at all change the first line:
Code: [Select]
    ld de,plotSScreen+2FFh      ;DE points to the last byte of the graphscreen
     ld hl,plotSScreen+2FFh-12  ;HL now points to the last byte in the second to last row
     ld bc,300h-12                   ;this is the size of 63 rows
     lddr                                 ;copies BC bytes at HL to DE going backwards
     ret

EDIT: Aw, ninja'd D:
:D