Omnimaga
Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: ACagliano on April 20, 2012, 07:39:23 pm
-
I have resumed my Legend of Zelda project. And, I have it mostly done, although the most daunting parts lie ahead. Any coders who have expertise in the areas I will list below and want to help me out with coding this...I would be happy.
1. Greyscale texture sprite rendering system. Tiles are 8x8.
2. Animated sprite rendering system (for the player and enemies). Tiles are 8x8, but should move 1 pixel at a time, and support all directions of movement, even diagonal.
3. AI system.
Other than that, the rest of the game is fully coded ;)
Although I do want to do one more thing...RLE encode the maps. I need, thus, a compression utility that I can use on computer to compress a string of bytes, as well as a z80 routine that will decompress it. I'm sure the later is lying around on these forums somewhere.
-
Almost done? O.O
Glad to see you still worked on it and are still around the community. I can't help personally, but I wish you good luck. :)
To me for a calc RPG, as long as it is under 18 pages I am fine (above that I get connectivity problems often). It's Zelda, after all, so large size is to be expected if anyone wants a good Zelda clone.
-
I have resumed my Legend of Zelda project. And, I have it mostly done, although the most daunting parts lie ahead. Any coders who have expertise in the areas I will list below and want to help me out with coding this...I would be happy.
1. Greyscale texture sprite rendering system. Tiles are 8x8.
2. Animated sprite rendering system (for the player and enemies). Tiles are 8x8, but should move 1 pixel at a time, and support all directions of movement, even diagonal.
3. AI system.
Other than that, the rest of the game is fully coded ;)
Although I do want to do one more thing...RLE encode the maps. I need, thus, a compression utility that I can use on computer to compress a string of bytes, as well as a z80 routine that will decompress it. I'm sure the later is lying around on these forums somewhere.
A couple of questions:
1. You're talking about greyscale for the background, right? Is it smooth-scrolling, or one-screen-at-a-time like in the very first zelda game?
2. Are you absolutely sure you want RLE? Iambian and many other programmers recommend pucrunch. I can give you his on-computer compressor and on-calc decompressor--I use these with great success.
-
I have resumed my Legend of Zelda project. And, I have it mostly done, although the most daunting parts lie ahead. Any coders who have expertise in the areas I will list below and want to help me out with coding this...I would be happy.
1. Greyscale texture sprite rendering system. Tiles are 8x8.
2. Animated sprite rendering system (for the player and enemies). Tiles are 8x8, but should move 1 pixel at a time, and support all directions of movement, even diagonal.
3. AI system.
Other than that, the rest of the game is fully coded ;)
Although I do want to do one more thing...RLE encode the maps. I need, thus, a compression utility that I can use on computer to compress a string of bytes, as well as a z80 routine that will decompress it. I'm sure the later is lying around on these forums somewhere.
A couple of questions:
1. You're talking about greyscale for the background, right? Is it smooth-scrolling, or one-screen-at-a-time like in the very first zelda game?
2. Are you absolutely sure you want RLE? Iambian and many other programmers recommend pucrunch. I can give you his on-computer compressor and on-calc decompressor--I use these with great success.
1. I'm going with Screen by screen rendering. You move off screen, the next screen over is rendered.
2. I can go with Pucrunch just as well. As long as I can get a good compression ratio.
-
Will you have the screen to screen scrolling animation like in all old Zelda games and the calc Dark Link Quest?
-
How hard would that be to implement? You would need to rotate the pixels? I don't have the foggiest how to do that.
-
How hard would that be to implement? You would need to rotate the pixels? I don't have the foggiest how to do that.
I don't think anything rotates. As far as I know it's just that the next screen slides in smoothly instead of jumping in, when your character reaches the edge of the screen.
-
How hard would that be to implement? You would need to rotate the pixels? I don't have the foggiest how to do that.
I don't think anything rotates. As far as I know it's just that the next screen slides in smoothly instead of jumping in, when your character reaches the edge of the screen.
I meant shift. You would need to shift in the pixels one at a time.
-
Actually, I believe Link's Awakening shifted 8 pixels at a time when transitioning between screens. You can shift 8 pixels easily, as the shifting works out to even bytes. Although technically, since you have half the screen size, you would want to only shift 4 pixels per frame. This is easily done vertically of course, and although horizontal shifting is more difficult, you can actually shift horizontally by 4 pixels quite well with the rld and rrd instructions.
-
It shifted one at a time, but the other calc Zelda clones that had shifting did it entire tiles at a time. If you play Zelda by Void Productions it shifts by 12 pixel chunks. Basically you shift a few pixels away, then draw the first column of tiles from the next map, then repeat with each other columns, or rows if it shifts vertically.
-
I lied, Link's Awakening shifts 4 pixels at a time, not 8. But it doesn't really matter what amount he shifts by in the end as long as the transition isn't too fast or too slow.
-
Well, doing this is beyond my skill level. If another coder offers to help, then sure.
-
I'd be happy to do a background engine of this type. I just need to figure out how to do grayscale without crystal timers. (Normally it's straight forward, but it would be nice to alow calibration if possible)
EDIT: Later today, if I get the chance, I'll give you the pucrunch stuff and see what you think.
-
I'd be happy to do a background engine of this type. I just need to figure out how to do grayscale without crystal timers. (Normally it's straight forward, but it would be nice to alow calibration if possible)
EDIT: Later today, if I get the chance, I'll give you the pucrunch stuff and see what you think.
Thanks and thanks.
Note: I'm not trying to just not do this myself. I know from experience that I learn better from seeing how others do things, especially of this nature, rather than keep failing myself (at which point I just give up). Not to mention that I want to expedite the release process, since I've been promising this for months.
-
hehe, just wanted to link here:
http://ourl.ca/4195/290842
That is the shifting code in question ^-^
EDIT: For horizontal shifting by 4 pixels, anyways. I feel rather proud of myself for that >.>
-
I seem to be unable to use the Pucrunch tools, since im on a Mac. If I put the data I need Pucrunched here, can someone run it through the utils and post the compressed data back?
-
UPDATE:
Project progress halted because I'm waiting on AI routines. In the meantime, I want to redo the maps. Since I have a lot of other work to do as well, someone who has the time please create a list of sprites I need. You do not need to draw or code the sprites, or make a map. I will use ClrHome's Pixelscape for that. I'm just looking for a list of all tiles in the game.
-
Well I can probably give some directions on AI.
1) Some enemies move randomly or until they hit a wall. This shouldnt be such a problem.
2) Other ones move at you by just changing the coords so that they are more close to you. this shouldnt be a problem either.
3) finally, there are enemies that follow a certain path (ie, the green traps). Not too hard either I guess.
These things are based on more early Zelda games I played. Point I want to make: You don't need an advanced pathfinding algorithm IMO.
If you want some pseudocode for this, I'd be happy to write some. Just ask me (you can also send me a PM if you want to be sure that I read it)
-
You definitely do not need advanced pathfinding of any kind for this.
Something thing to note is that most enemies who move deliberately closer to you don't begin to do so until you're within a certain distance from them, within their line of sight, etc. Otherwise, they just move randomly as well. Even so, the best they can do is simply move toward you, they never actually do any pathfinding. Ever. EVER. (Ever.)
Also........Which Zelda game specifically is this a clone of? Is it Link's Awakening? Or an older one than that?
-
Ok. This is being molded in the fashion of aLttP, but it adds one or two items from OoT.
-
As I mentioned in the PM I sent you, I can help you with AI. Could you send me a list of AI characters?
-
Nice, I love zelda-like games and i would like to play this one :D
-
Update
Have a new sprites list. It is enclosed.
Textures
$00 Desert Sand
$02 Tree
$04 Grass
$06 Water full tile
$08 Water top-left edge
$0A Water top-right edge
$0C Water bottom-left edge
$0E Water bottom-right edge
$10 Lava
$12 Sheet of Ice
$14 Block of Ice
$16 Hedge
$18 Fence
$1A Solid Block
$1C Trick Block
$1E Bottomless Pit
$20 Ground
$22 Cactus
$24 Death Mountain sign
$26 Lake Hylia sign
$28 Kakariko village sign
$2A Graveyard sign
$2C Desert sign
$2E Lost Woods sign
$30 Quest 1 sign
$32 Quest 2 sign
$34 Quest 3 sign
$36 Deku tree sign
$38 Castle Wall
$3A Castle Tower
$3C Dark Barrier
Buildings
$3E left edge w/ roof
$40 right edge w/ roof
$42 left edge w/o roof
$44 right edge w/o roof
$46 roof extension
$48 building extension w/o roof
$4A building extension w/ roof
$4C door: temple of time
$4E door: link's house
$50 door: sage's house
$52 door: Ganon's house
$54 door: Zelda's house
$56 door: deku tree
$58 door: forest temple
$5A door: ice temple
$5C door: water temple
$5E door: spirit temple
$60 door: shadow temple
$62 door: fire temple
$64 door: Ganon's castle
$66 exit to prior map
In Dungeon
$68 stairs up
$6A stairs down
$6C boss door
$6E locked door
$70 key
$72 boss key
$74 warp to boss
$76 spikes
$78 webbed hole (in deku tree)
$7A hole to deku tree below ground
Other
$7C Quest 1 Entrance
$7E Quest 2 Entrance
$80 Quest 3 Entrance
Items
$82 Heart Refill
$84 Heart Container
$86 Magic Refill
$88 Din's Fire
$8A Faore's Wind
$8C Nayru's Love
$8E Wooden stick
$90 Wooden Shield
$92 Kokiri Sword
$94 Hylian Shield
$96 Master Sword
$98 Mirror Shield
$9A Fire Tunic
$9C Zora Slippers
$9E Empty Bottle
$A0 Fairy
$A2 Light Magic
$A4 Lens of Truth
$A6 Hookshot
$A8 Longshot
$AA Quiver (20 max)
$AC Quiver (50 max)
$AE Bow
$B0 Bundle of 5 arrows
$B2 torch
Characters
$B4 You (Link)
$B6 Sage
$B8 Zelda
$BA Death Mountain Guard
$BC Deku Tree
$BE Old Man
Enemy Classes
$C0 Soldiers ATK 1 / DEF 1
$C2 Trolls ATK 3 / DEF 2
$C4 Spirits ATK 3 / DEF 5
$C6 Shades ATK 1 / DEF 3
$C8 Zombies ATK 2 / DEF 2
$CA Keese ATK 2 / DEF 1
$CC Fire Keese ATK 1 / DEF 2
$CE Ice Keese ATK 1 / DEF 2
$D0 Goblins ATK 4 / DEF 4
$D2 Sorcerers ATK 5 / DEF 5
Boss Enemies
$D4 Deku Tree (troll class) ATK 5 / DEF 7
$D6 Forest Temple (troll class) ATK 9 / DEF 3
$D8 Ice Temple (sorcerer class) ATK 7 / DEF 5
$DA Water Temple (sorcerer class) ATK 9 / DEF 7
$DC Spirit Temple (spirit class) ATK 11 / DEF 9
$DE Shadow Temple (shade class) ATK 4 / DEF 10
$E0 Fire Temple (goblin class) ATK 13 / DEF 12
$E2 Ganondorf (sorcerer class) ATK 15 / DEF 15
**For enemies that damage you once, the ATK factor is dealt immediately. For enemies that damage you by burning, freezing, or poisoning, the damage is dealt once per every couple cycles until the damage counter expires.
**The DEF value of an enemy determines how much damage it can take before it dies. The damage you deal is determined by the base attack of your player (increases as you clear dungeons), with the weapon type as an attack multiplier.
**enemy class attacks
Soldiers have swords and swing at you.
Trolls have clubs and try to club you.
Spirits try to collide with you.
Shades shoot a poisonous spray at you.
Zombies try to collide with you.
Keese try to fly into you.
Fire Keese try to fly into you and set you on fire.
Ice Keese try to fly into you and freeze you.
Goblins have axes and swing at you.
Sorcerers fire spells at you. Spell classes include: fire, freeze, and stun. Stun deals damage once. Freeze and fire deal freeze and burn damage.
I added the Deku Tree dungeon for all of those who have played Ocarina of Time. Thus, I also added the STICK and the WOODEN SHIELD as items. Both have a set number of hit points, before they break. The other two shields have no set hit points.
Also, I need routines for rotating a sprite by 90, 180, and 270 degrees.
-
Also, I need routines for rotating a sprite by 90, 180, and 270 degrees.
If I'm correct, axe has routines for that.
EDIT:
p_RotC:
ex de,hl
ld c,8
__RotCLoop1:
ld hl,vx_SptBuff+8
ld b,8
ld a,(de)
__RotCLoop2:
dec l
rra
rr (hl)
djnz __RotCLoop2
inc de
dec c
jr nz,__RotCLoop1
ret
p_RotCC:
ex de,hl
ld c,8
__RotCCLoop1:
ld hl,vx_SptBuff+8
ld b,8
ld a,(de)
__RotCCLoop2:
dec l
rla
rl (hl)
djnz __RotCCLoop2
inc de
dec c
jr nz,__RotCCLoop1
ret
p_RotC should rotate the sprite pointed to by hl 90° clockwise, while p_RotCC should do the same counter-clockwise. I think vx_SptBuff is where the result is stored.
-
I'm curious, are there any screenshots? It sounds really cool.
-
Thanks. I do actually have some screenshots, but they are of my computer screen, while working on the map in Pixelscape.
-
I didn't know there was a new online map editor! O.O
Anyway looks quite nice so far, although it would be nice if the houses were made more like in Zelda (ALttP, OoA, OoS or LA style)
-
I didn't know there was a new online map editor! O.O
Anyway looks quite nice so far, although it would be nice if the houses were made more like in Zelda (ALttP, OoA, OoS or LA style)
I'd be willing to alter the sprite, if i have a reference. Can someone upload/link to an image of what it looks like.
-
Check out Sam Heald's projects:
http://www.ticalc.org/archives/files/fileinfo/119/11911.html (12x12 sprites)
http://www.ticalc.org/archives/files/fileinfo/76/7633.html (16x16 sprites)
-
Check out Sam Heald's projects:
http://www.ticalc.org/archives/files/fileinfo/119/11911.html (12x12 sprites)
http://www.ticalc.org/archives/files/fileinfo/76/7633.html (16x16 sprites)
I'm trying to duplicate the second one, but in 8x8 (splitting it up into several sprites). Not succeeding.
-
Try this http://www.omnimaga.org/index.php?action=downloads;sa=view;down=442
Back up first, since ARPGCs aren't very stable on OS 1.14 or above.
-
Ok... I got this done. I hope you guys are happy with this building.
It appears that I am terrible at character sprites. This means I need someone's help. Sprites are 8x8. I need
1 for Link in each of the primary directions.
1 for Princess Zelda
1 for a wizard
1 for an old man
1 for the deku tree
1 for a soldier
1 for a troll
1 for a spirit
1 for a shade (can look like a spirit)
1 for a zombie
1 for a goblin
1 for a wizard (can look the same as the one above)
I've got all the others done.
-
The building is nice! :D
But IMO there must be more different stuff for the surrounding.
-
The building is nice! :D
But IMO there must be more different stuff for the surrounding.
Yes I know. I was simply showcasing the building itself. I have different environment tiles.
Anyone willing to help me out with the character sprites.
-
An 8x8 Deku tree?! O.O
For some more sprite ideas, you can check out Joltima, which had pretty cool (8x8) spritework:
http://www.ticalc.org/archives/files/fileinfo/34/3456.html
For example, you might be able to base your wizard off one of those sprites or pull some background tiles. I'm pretty awful at spritework, too, and there's not a whole lot you can do with 8x8 :/ (though with a good game you can get away with it, like Shadow of Narkemen (http://www.ticalc.org/archives/files/fileinfo/184/18472.html) :D On a side note: I wish Narkemen II had come out... the beta was really cool and i think it was pretty much all finished, just testing for bugs and stuff... where did he go?)
-
Sounds good. Here's some more images. Project is paused because of a slight bug with Pixelscape...
(http://clrhome.org/zelda/watertemplezelda.gif)
(http://clrhome.org/zelda/zeldacliff.gif)
(http://clrhome.org/zelda/zeldavillage.gif)
-
woo, looking cool, and again, IMO there must be sligtley more on the last one, like only one tree or so :D
-
Wow, that looks a whole lot better. The only thing that makes it look square-ish are those square boxes in the middle, but really the whole set looks very nice together. For the diagonal sprites, will you be able to walk diagonally? or will the hit detection for those sprites take up the entire square?
-
For the diagonal sprites, how does it look when they are just a straight diagonal?
-
What needs fixing there are the "fan-outs" on the cliff bottoms and the boxes...they look too flat. I really didn't plan on diagonal sprites, just a diagonal movement, but still facing in one of the cardinal directions.
-
Diagonal movement is one thing, but unless you have a special way of hit detection (ie not just checking which tile you're going to run into) the diagonal tiles will have a box around them (unless you just make them "walk through-able"). That's why i was asking...
-
Ok... I have picked up progress on this, starting with a complete recode of everything. I dumped the sprite/map set as well and plan to redo them. Also, I devised two separate algorithms for AI, one for enemies that try to run into you and one for enemies that shoot at you from far away. In addition, I have designed the main menu, file save, and map save routines. I will also be doing the event triggers and event scripts. Events are divided into two classes, pre-move events and post-move events. Pre-move events are generally what should stop you from moving onto a tile. Post-move events are like entering a building, stepping on lava, or collecting an item.
AI for Collision
1. move toward player on x
; if enemy x = player x, goto 2
; if movement blocked, goto 2
2. move toward player on y
; if enemy y = player y, we have collision !!!
; if movement blocked, goto 3
3. move away from player on x
; if movement blocked, goto 4
4. move away from player on y
; if movement blocked, do nothing.
**there are some caveats with perhaps not a complete collision, since the tiles are 8x8 and AI/player movement is pixel based...
For AI where the enemy can fire at you
1. Move toward player y (more distance) (we are aiming to move in line with player, but not actually towards player)
; if enemy y = player y, we should try to shoot (but not all the time). If we are not shooting, goto 4.
; if movement blocked, goto 2
2. Move toward player x (again, moving in line with player, but not towards player).
; if enemy x = player x, we should try to shoot (but not all the time). If we are not shooting, goto 4
; if movement blocked, goto 3
3. Do nothing.
4. Move away from player on y (try to keep distance).
; if movement blocked, goto 5
5. Move away from player on x.
; if movement blocked, do nothing
-----------------------------------
Another thing I need help with. When the player moves, or the AI moves or a bullet sprite advances, I will need to replace the correct sprite underneath the sprite that has just moved. How do I do this?
-----------------------------------
Obviously, while I have made significant progress, a lot still needs to be done. So, if there are any developers out there who can code in Z80 and are willing to spare a bit of their time, I would not turn down some assistance with some of this programming. Assistance will be fully credited.
-
bump. I have a friend of mine helping me out with the tilesets.
-
Cool! Looking forward to more progress! :D
-
There's different ways to go about this, the easiest way is to simply redraw the map every frame. However, if that's not how your tilemap works, you can check the enemy/player's x/y alignment in the map then load/overwrite either 1, 2, or 4 tiles (starting with the tile at the enemy's top-left) depending on the enemy's alignment before redrawing the enemy. If your maps aren't aligned, it might be easier to make a copy of what's underneath before you draw the tile rather than pulling from the map, that way you don't have to worry about drawing unaligned sprites.
I also don't really see the difference between pre/post-move events. If you touch a door, you know that you'll be entering a house. If you want to wait until you leave that tile before you trigger the event, you can just set the trigger on the tile behind it. Collecting an item is also triggered by touching it (or pressing a button). I'd be interested to know what you've got in mind/what differences there are between the two.
-
Slight problem I see with your AI (if I'm understanding it correctly):
OOOOOO
OXOBYO
OOOOOO
Anything like that (where X is you and Y is the AI, B is a wall and O are any number of empty spaces) would probably make Y vibrate back and forth with the tile to its right.
-
Honestly, Deep, I'm not too concerned. In fact the AI system that I spent all day coding is wrong, because it is based on the enemy moving one whole sprite at a time. But, that is not the case. So, it turns out I'll be needing help with this and the graphics system, because I really don't know how to do the latter. But, everything else is slowly getting done.
-
any screenshots?
-
Glad to read this is resumed :)
-
Not yet. The graphics will the the last thing done. Sorry. Anyone have some time to help out on some of it? I posted the program up on Google Docs. I'll pm the link to anyone interested.
-
There is no "For Zelda ill block out my entire calc if i have to" option ... !
-
There is no "For Zelda ill block out my entire calc if i have to" option ... !
Lol. that won't be necessary. even 3 pages is the upper end of what i really think i need. You a z80 programmer?
-
Hehe i thought as such :).
Ive been known to dabble in z80 ASM over my time, is there anything in particular you need help with?
-
Rendering graphics in 3-level greyscale, including the initialization of the screen sprite data, and replacing the areas under an enemy and the player that moves (sprites are 8x8 and movement occurs 1 pxl at a time).
AI routines. I have an algorithm. Just need it coded.
-
Will this be a 15MHz calc only game by any chance?
When you say 'screen sprite data' are you talking about a tilemap?
The player and enemy redrawing issue can be rectified by using masked sprites, there are routines available on wikiti i believe that can do this.
-
I'm not sure about speed. I do know that I disable the delay when utilizing flash, and that this game is an app. And yes, I mean a tile map.
-
I was also thinking that maybe you can borrow some of the graphics from Duck's old Grayscale Zelda demo (made in 2003!):
(http://img.removedfromgame.com/imgs/0-zelda.gif)
The graphics and some code is available here: http://www.ticalc.org/archives/files/fileinfo/295/29519.html
That said the grayscale routines need an overhaul as they are severely outdated.
-
Yes I know. A friend of mine is working on sprites. I think the graphics, particularly the sprite-masking, is a bit over my head, so I would prefer to have someone who knows what they are doing to do it. I can probably do the AI myself if I put some thought to it.
-
I would LOVE to help with sprites!
Or any thing else coding wise
even testing it :trollface: