Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - chickendude

Pages: 1 ... 43 44 [45] 46 47 ... 55
661
TI Z80 / Re: Alien Breed 5
« on: October 02, 2012, 09:08:43 pm »
I think we all knew it was going to get featured ;) Congrats!

662
ASM / Re: Keeping track of events in RPGs
« on: October 02, 2012, 09:00:31 pm »
Eiyeron, what are you writing your engine in? I would be glad to help/talk about what i've done so far :)

And in theory, organizing things by number can be quite nice, but i've always found that without a nice tilemap editor to rearrange everything for you, adding new tiles/objects later on can be a pain, cause you have to change all your maps...

EDIT: You can see my source here if you're (or anyone else is) interested:
http://code.google.com/p/juego-rpg/

663
In WabbitEmu/PindurTI/tilem2 they all slow the refresh rate to try to emulate grayscale, but if you aren't using grayscale it tends to give blurry screenshots. In WabbitEmu/PindurTI you can change the actual refresh rate, in tilem2 you can just turn off grayscale support. How do you take your screenshots?

In any case, it looks amazing, it seems like you're already really far along.

665
ASM / Re: Keeping track of events in RPGs
« on: October 01, 2012, 06:38:45 pm »
Yeah, that's what i was thinking, just a huge list. It just seems like a very inefficient way to keep track of everything and not very flexible.

EDIT: I just saw thepenguin's post, thanks! I'm going to try a simple implementation and see how it works. This way i can give each of my objects that can be "used" (treasure chest, NPC's text, etc.) a flag id and when i open the chest flip the flag. This is pretty cool cause it would be very easy to implement things like changing sprites based on an event, since right now my data is organized like this:
Code: [Select]
Brushes:
.dw grass
.dw path
.dw door_bookshop
.dw sign_hanging

grass:
.db %00000000
.db 0
path:
.db %00000000
.db 1
door_bookshop:
.db %01000010
.db 24
.db 1 ;action#, 1 = change map
.db 5,7,1 ;starting x/y coords, map#
sign_hanging:
.db %10000110
.db 32
.db 14
.db 12
.db 0
.dw text1
...where the first byte is an action bit, the second byte is a sprite id, and the rest depends on what actions are set (passable nonpassable, if the tile has a variable height, actions when you walk into something, actions pressing 2nd, etc.) and i could easily change it to update both the sprite and whatever the action was. The only problem i can think of is that you really only have on/off so i can only assign one action to each object in the entire game. Sign_hanging, for example:
Code: [Select]
sign_hanging:
.db %10000110 ;action when hit with 2nd, variable height, nonpassable
.db 32 ;sprite id
.db 14 ;how far behind the sprite we can walk
.db 12 ;sprite mask
.db 0 ;action id, 0 = draw text, 1 = change map
.dw text1 ;action data, in this case text label
I could use maybe bit 3 (bits 3-5 are still unused) to change the event associated with it, and bit 4 to change the sprite associated with it:
Code: [Select]
sign_hanging:
.db %10011110 ;change sprite/event based on event id
.db 0 ;event id
.db 32 ;sprite id
.db 75 ;sprite id if event has run
.db 14 ;how far behind the sprite we can walk
.db 12 ;sprite mask
.db 0 ;action id, 0 = draw text, 1 = change map
.dw text1 ;action data, in this case text label
.db 1 ;action id if event has been run
.db 4,4,1 ;new action data
Another option would be to give each event 2 bits, allowing me four changes (i could maybe divide them into 1 bit and 2 bit events), i'll play with this a little and see what i can come up with. If it turns out i need more, i could always just change iy to another location (like 127 bytes into savesscreen, or wherever i've still got some free saferam left).

Thank you so much both of you for the ideas, i've got a bit to play with now, thanks :)

EDIT2: does anyone know of any good tutorials/articles on event programming/RPGs in general? I've been tackling things one by one as i come across them, kinda like hopping stone to stone across a river (and i don't want to get stuck in the middle of the river!).

666
ASM / Re: ASM Optimized routines
« on: October 01, 2012, 06:37:09 pm »
More or less, though you have to watch out for the ordering of the hex (it's backwards):
00CE19
19 = add hl,de
CE00 = adc a,0

And maybe there's a limit of four bytes/command, 'cuz nothing over four bytes seems to work. The command will take up that many bytes, but everything past four bytes seems to turn into random bytes.

You can use other values, too, like an asterisk can be used to pull in data, for example from tasmtabs.htm (NOTOUCH=NOP):
Code: [Select]
                                          EXAMPLE         EXAMPLE
INSTRUCTION DEFINITION                    SOURCE          OBJECT
-------------------------------------------------------------------
XYZ  *      FF   3  NOTOUCH 1             xyz 1234h       FF 34 12
XYZ  *      FF   2  NOTOUCH 1             xyz 1234h       FF 34
ZYX  *      FE   3  SWAP    1             zyx 1234h       FE 12 34
ZYX  *      FE   3  R2      1             zyx $+4         FE 01 00
ABC  *,*    FD   3  COMBINE 1             abc 45h,67h     FD 45 67
ABC  *,*    FD   3  CSWAP   1             abc 45h,67h     FD 67 45
ADD  A,#*   FC   2  NOTOUCH 1             add A,#'B'      FC 42
RET  ""     FB   1  NOTOUCH 1             ret             FB
LD   IX,*   21DD 4  NOTOUCH 1             ld  IX,1234h    DD 21 34 12
LD   IX,*   21DD 4  NOTOUCH 1 1 0         ld  IX,1234h    DD 21 68 24
LD   IX,*   21DD 4  NOTOUCH 1 0 1         ld  IX,1234h    DD 21 35 12
LD   IX,*   21DD 4  NOTOUCH 1 1 1         ld  IX,1234h    DD 21 69 24
LD   IX,*   21DD 4  NOTOUCH 1 8 12        ld  IX,34h      DD 21 12 34

667
TI Z80 / Re: Zelda resumed and almost done...a bit of help needed
« on: October 01, 2012, 02:37:45 pm »
I'm curious, are there any screenshots? It sounds really cool.

668
ASM / Keeping track of events in RPGs
« on: October 01, 2012, 12:38:24 pm »
I've been wondering how you can keep track of all the things you've done in a game, how you can advance while unlocking new places, opening treasure chests, NPCs coming and going, maps changing (for example, maybe a house gets built while you were out of town, or a rock gets moved). It's a lot of information to track and i don't think you want to make a second copy of every map in your game. Maybe my problem is that i have a lot of these things built into my maps when i need to somehow separate them?

669
ASM / Re: ASM Optimized routines
« on: October 01, 2012, 09:21:55 am »
Not an optimized "routine", or really even useful, but i was trying to figure out how to add new instructions (and not macros) to spasm, and finally got this:
Code: [Select]
.addinstr add ahl,de 00CE19 3 NOP 1 ;add hl,de \ adc a,0
.addinstr add ahl,cde 8919 2 NOP 1 ;add hl,de \ adc a,c
Now whenever i want to do 24-bit addition (well, kinda) i can just use the new add ahl,de and add ahl,cde instructions ;)

EDIT: oops, my bbcode leaves a lot to be desired...

670
TI Z80 / Re: Bounce
« on: September 30, 2012, 02:56:39 pm »
What you can do is add a timer for just the ball. Normally it can be set at, say 1, meaning that every time it reaches 0 (meaning every frame) you move the paddle. Later when you want slow motion, you can change the default delay to 2 or 3 so that it waits 2 or 3 frames before doing anything. If you want it to move just a little slower than everything else, set the timer to, say, 5, and run your routine to move the ball every time you update the timer EXCEPT when you reach 0. For every 5 frames that your paddle runs, the ball will be updated 4 times.

EDIT: something i do in asm all the time is use a counter and when it is divisible by 2/4/8/16 do something:
ld hl,timer
inc (hl)
ld a,(hl)
and $7 ;%111
ret z ;if bottom-most bits are 0, (meaning divisible by 8) don't update the ball.

if a = 0 it means that it is divisible by 8, it's really quick. Doing modulus 3/some other complicated number might be a bit more slow and take up more space. You could use and $3, and $1, or even and $15 depending on how much of a delay you want.

671
TI Z80 / Re: Alien Breed 5
« on: September 30, 2012, 04:36:43 am »
I still remember when Tower Assault came out (back when i checked ticalc everyday) and then (was updated into?) Final Assault. Now i can't remember if it was an update to Tower Assault or a whole new program... I never played the 8x8 scrolling games, but even those look fun! Thunderbirds are go! was really cool, too, even though i remember it being a bit short (and rather large on my ti83 ;)). The graphics were what impressed me the most. Anyway, this new version looks and feels so much more polished than the others, there are only two things that i feel are still lagging behind:
1. The texts (like the introduction) on a blank screen are really an eyesore compared to the rest of the game, with its beautiful levels, animations, explosions, bullets, etc. It feels like pretty much every other game coming out in the late 90s/early 00s. Just like the Megaman 83 intro or Phoenix's UI!
2. The computer system also lacks a little something. It doesn't FEEL like you are on a computer, though i think the cursor does look nice.

I'd be surprised if Alien Breed weren't featured on ticalc :)

672
Wow, that looks really cool. The physics have got to be a pain! I'd love to see a screen with less flashing (maybe turn off grayscale emulation?). It looks really amazing!

Btw, what is NXT?

673
ASM / Re: ASM Command of the Week
« on: September 03, 2012, 01:37:01 pm »
That's what i figured they could be used for, though i was thinking more along the lines of a fastcopy routine. Thanks for the sample.

674
ASM / Re: Z80 ASM Help
« on: September 03, 2012, 04:28:09 am »
1. Key input in asm is much more complicated. Depending on how you want to handle it, there are different options. Generally, you'll have a look-up table which will correspond to the keys you are checking. If using GetCSC, you'd organize the table according to those values (at least, the ones you want to read). If you are planning to use DI (direct input), you might organize them according to the key groups. As for the .module directive, i'm pretty sure you can safely leave that out.

EDIT: And yes, you'll need to convert the key presses into the appropriate characters, then convert the string to a FP number (this part should be pretty easy though).

2. A few things:
Code: [Select]
pop HL
push BC
LD a,$06
LD b,H
add a,b
LD H,a
pop BC
push HL
LD (penCol),HL
=
Code: [Select]
ld a,(penCol)
add a,6
ld (penCol),a
;)

Also, why so many 0's at the end? It'd be simpler to just read through each text until you reach 0, skip the 0, set penCol to 0 and increase penRow by 6 or 7 (essentially, a new line). Then quit the routine when you reach a certain character (maybe $FF) Something like this (haven't tested the code, but it should give you some ideas):
Code: [Select]
putCLoop:
ld a,(hl)
inc hl
inc a ;$FF+1=0
ret z
dec a ;0+1=1, -1=0
jr nz,$+15 ;2
ld (penCol),a ;5
ld a,(penRow) ;8
add a,6 ;10
ld (penRow),a ;13
ld a,(hl) ;14
inc hl ;15 bytes
bcall(_vPutMap)
jr putCLoop
Another reason why it might be slow is because it might be redrawing the entire screen every time, and TI's gbufcopy routine is pretty slow. Maybe try setting the flag to draw to the gbuf first then drawing the gbuf afterward.

675
ASM / Re: ASM Command of the Week
« on: September 03, 2012, 03:43:43 am »
Can anyone think of a good use for otd/oti? I just saw JimE's Keyin routine which has a pretty interesting use of ini to store all DI keypresses into saferam that you can access using "bit key,(iy+keygroup)". It's a pretty interesting idea i might implement into some of my programs, especially since you don't have to worry about registers getting overwritten :)

Pages: 1 ... 43 44 [45] 46 47 ... 55