Omnimaga
Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: Eeems on January 25, 2010, 10:36:25 pm
-
So I made a simple game a little while back called hunt. The object of the game was to occupy the same space as the prey 99 times and in essence killed it. So as a few of you know I've been learning ASM and so with what free time I can get I've started to port Hunt to asm. So the actual game engine is done, but there is only one difficulty which is pretty easy, and you only have to hit it 20 times. Currently I am making the menu and fixing up the code.
Here is a screenshot and the game, it's noshell so just run it with asm(prgmPROGRAM
Tell me what you think :D
-
What in the world is up with that screenshot? O.o
(I'll try it out though.)
-
No idea x.x it didn't look like that when I recorded it x.x must have the framerate up too far x.x
-
Anyway, just tried it out.
Interesting, but actually hurting the thing is difficult... never seems to get hurt while ON him, but only when we go through eachother.
-
Yeah I noticed that, no idea why though x.x I might have to put the damage check somewhere else in the code
-
Wow at first I thought you moved to Casio CFX9850G calc programming with the colors :P
I guess I'll have to try it
EDIT: Mhmm interesting, altough it seems a bit glitchy as {AP} described, I was on the enemy and he rarely took damage x.x
Glad you are learning ASM tho, I am happy you could get the grasp of some stuff alerady too. I guess it's a good thing since you don't have much access to a calculator at home atm...
-
lol :P well I have a new screenshot that should work better :P
yeah :/ I haven't been able to fix that yet for some reason though x.x
yeah :/ well I already a some knowledge of asm before though
EDIT: lol, wow nope. I guess I'll have to use the old wabbit for screenshots x.x
-
mhmm I think he tried to fix contrast in screenshots. He might have messed something up x.x
-
nope x.x just slowed down the framerate x.x didn't work
-
I was talking about Buckeye Dude :P
-
oh :P lol sorry
well here is the menu'd one :D but for some reason the ai broke x.x oh well marvel at the menu :P
edit: also here is the original game :D
http://www.cemetech.net/forum/viewtopic.php?t=3625
-
ok, so here is the most recent version, the menu works fine, and the AI is fixed :D also quits back to menu
source is included.
I'm using ion's iRandom routine for the AI but it doesn't require ion, I included the routine, so it's still no-shell :D
hope you like it!
EDIT: small update, more organized zip, and a readme. Also changed the win text a little.
-
Eeems, I tried the most recent one in Wabbit (The one I've always used used) and got this:
I don't know why, though. :(
-
umm, wierd I'll fix that
EDIT Fixed
-
This topic is full of bugs. :o
Anyway an ASCII game in assembly is not an idea I didn't have already.
Maybe we could explore some new effects in ASCII using ASM. One of the things could be using an custom font 4x4 or other size.
I can't get other ideas right now...
PS: maybe something massive like lots of enemies moving around... There is an absurd amount of speed to spend on graphics. Maybe even ASCII grayscale? This is getting insane. Weregoose showed a curious picture of possible grayscale with TI font 8x8 font on UTI.
-
lol, yeah :P
lol, well I'll get to that sometime, right now I'm just trying to learn the basics of ASM. What do you think of the gameplay? and the source?
-
Now I get ERR:INVALID when running Asm(prgmHUNT
-
x.x wow, I'll fix that
EDIT: there you go
-
cool it works!
Btw, a bug: When you win then play again without exiting game, the enemy count is at 255 instead of 20. Also, if for example I always stay at the top, the enemy always seems to remain at the top of the screen
-
lol oops, and yeah I noticed that, it's kind of wierd, I'll have to figure out a way to fix that
EDIT: fixed both, my random number thing wasn't going high enough, and I wasn't resetting the health x.x
EDIT2: uploaded an even better version, harder settings give them more health as well as speed :p
EDIT3: added a build info menu item, so you can check the version that's all that was done in this update
-
Cool ^^
-
hope you like it!
any more bug reports?
anything you want added?
I will be adding "trees" that you can't move on top of later
-
Trees sound fun... but first. Reset the move counter after each match, mate.
After a couple of games I noticed I was starting an easy game with over 1000 moves already there. =P
Also, you have it damaging right, but you have to move again after the damage to get it to show up.
Not a big problem. Just pointing it out.
-
I wonder if in ASM, the dual layer ASCII BASIC trick could be easily applied without too much flickering...
-
lol, oops, the one counter I forgot to reset x.x
I'll try to get tree's added tomorrow. the move again is because it checks at the start of the loop, I guess I could add it to the end...
hmm, well it could work. which one do you mean exactly?
-
The damage counter doesn't change til you move again. =)
-
yeah, because it checks at the start of the loop, so essentially it checks after...I've changed it so it checks before it updates the screen, and it's actually a bit harder x.x
-
I mean dual layer ascii in the style of Elmgon or Serenity. Not tilemaps but dual layer ASCII enemy/char sprites
-
Hmm, I think it could work.
-
Maybe we could explore some new effects in ASCII using ASM. One of the things could be using an custom font 4x4 or other size.
I can't get other ideas right now...
PS: maybe something massive like lots of enemies moving around... There is an absurd amount of speed to spend on graphics. Maybe even ASCII grayscale? This is getting insane. Weregoose showed a curious picture of possible grayscale with TI font 8x8 font on UTI.
How do you think the calculator puts text on the screen? It uses a special sprite drawing routine for a table of ASCII characters. But since it uses extra ROM calls and redundant error checking, it is actually MUCH slower than the standard method of drawing sprites. If you wanted to, you can use the home screen as the 8x16 "grid" and a standard 8x8 drawing routine for your 8x6 "characters" or whatever size for a much faster result. But that's essentially what lots of assembly games do already.
-
True, for most RPGs I noticed they use the default fonts but I saw some use either custom routines or 8x8 sprites. When speed is essential, these can be useful.
-
This is really interesting.
Eeems, I can't wait to get home and try this!
-
Thanks! Hope you like it :D
-
Eeems, this is great! It's really nice for your first game in a language! Excellent job! It dosn't hold attention for long, but it's great for your first game. :)
-
Thanks! In the next release I'll have tree's and the basic version that I originally created as well, so you can compare :P
I'm currently trying to get rid of a memory leak x.x
-
Wow, that sounds great!
How do you get a mem leak in Asm?
-
it's trying to write to an array, but it's not working right, and the whole RAM is filling up x.x
I've got Kerm Martian (creator of DCS) helping me solve it.
EDIT: ok here it is! you can currently move on tree's, but I'll add checks later
tell me what you think
-
Nice, what trees are supposed to do, though?
-
just look pretty right now, later I may implement hiding behind them so you are invisible, or they are just objects in the way.
-
Aaah ok cool ^^
I wonder if you'll switch to sprites soon? ^^
-
lol, I am in the process of switching to sprites, I'll have to completely re-write the displaying routines though. wish me luck :P
-
Good luck!
-
Thanks! I'll need it!
-
Good luck!
-
Good luck, learn from it and have fun!
-
I tried the new version. It's great!! Excellent job! I like the basic version also. :)
I found one bug: When trees are placed you can have them in the row with the score and time:
(Look by my score)
-
Thanks
yeah I'm aware of that one. It's because of ions random routine, and nothing I do can stop it it seems x.x I might have to use a modified one for that.
-
Thanks
yeah I'm aware of that one. It's because of ions random routine, and nothing I do can stop it it seems x.x I might have to use a modified one for that.
Could you do this: (In basic)
Repeat Ans>1
RandInt(1,8
End
I think in Asm it would be something like:
loop:
xor a
cp rand_ion_thing
jr Z, loop
Am I close to right?
-
Close ;D but it could be easier. (correct me if I'm wrong/I misinterpret)
it would be like
call irandom
and 7 ;(that is, a mod 8, row indexes are 0-7 in asm)
-
ld b,7
call irandom
inc a
-
Ignore my post. I simplified xD. It should have been an integer from 1-7 I suppose. (use a mod 6\ inc a; with initial a random)
-
ld b,7
call irandom
inc a
I thought the same thing. And I should be rusted in z80 by now.
mapar why complicate things? :p
-
thanks for the help!
now to get it working with graphics x.x
what's the easiest way to clear the graphbuffer? (plotsscreen)
-
ld hl,plotsscreen ;copy from here
ld (hl),0 ;write first byte
ld de,plotsscreen+1 ;copy to here
ld bc,768-1 ;copy all but the first byte
ldir
Note, LDIR basically does this:
Loads value at (HL) to (DE)
Increases HL and DE
Decreases BC
If BC is not zero, rinse and repeat
Since in this case DE is the address directly in front of HL, the 0 gets copied to all the bytes in the buffer.
-
well I just found out that b_call _GrBufClr does it as well, which is faster though?
also I've got it working :D now to convert all the menu's to it :P
EDIT: I can't seem to get sprite masking working x.x anybody got a good AND routine?
EDIT2: nvm, got a good spritemask routine to use instead
EDIT3: here is v1.07b :D almost done :D now to add collision support for trees and add in tilemaps of a sort to make a different background every game.
-
Yay assembly programing! Its cool that your getting into this, and neat that you got sprites working so fast O.O Good job!
-
well I just found out that b_call _GrBufClr does it as well, which is faster though?
also I've got it working :D now to convert all the menu's to it :P
EDIT: I can't seem to get sprite masking working x.x anybody got a good AND routine?
EDIT2: nvm, got a good spritemask routine to use instead
EDIT3: here is v1.07b :D almost done :D now to add collision support for trees and add in tilemaps of a sort to make a different background every game.
I think that bcall has pretty much the same code, but you won't really want to have the extra overhead of bcalls when making a game.
-
Thanks builderboy!
@calc84: ah ok, I'll switch to it then.
-
Sounds great Eeems! I wish I was at home to try this...
-
Lol, well I hope you like it!
-
Eeems, this is awesome!! I love your sprites! They're awesome. You're pretty good at Asm. :)
How hard was it to transition to sprites on the graphscreen?
-
thanks :P I don't actually like them, and I would rather have better ones
lol, just wait until you see my horribly structured/unoptimized code x.x
it was kind of hard to figure out how to get the sprites working, then it was pretty simple, all I had to do was just multiply the location pointer by 8 on each of them, and it worked :)
EDIT: here is a small update
-
I can't get past difficulty mode. It just goes back on Play/build/quit screen x.x
-
Sorry x.x forgot a 'ret' just go to the source folder open lib.asm go to the bottom add a tab and then type in 'ret' then run assemble.bat. That should fix it. If it doesn't then I don't know what the problem is x.x
-
I will wait when you release new 8xp build. I am a bit too lazy to compile stuff myself :P
-
Lol, ok, that may take a little while though, I'm working on backgrounds. Also, it doesn't take that long to make the edit and compile it 30 seconds tops ;)
-
Listen,
in my view when you provide a software avaliable for download you have to give an easy to launch build. I personally can't be arsed to spend time to setup an asm ide or folder just to build a game. Even if in your case, you provide the entire ASM tools (I haven't checked), the user shouldn't have to spend all this time to compile the thing just to try it.
Oh well, I'm backing out of this topic now. I'll post feedback when final version is done
Stop posting such narrow-minded comments.
-
Wait what? I wasn't trying to be narrow minded. You were being humerious when you said your were too lazy to do it yourself, and I was just playing along. I'm sorry if you saw it that way.
-
well i wasn't that humerious as you said, but oh well. I also dislike when people insist on making us do something even after we said we won't do it.
-
Ok, I guess it wasn't.
I wasn't trying to make you do it. I was just pointing out that it would be really simple to do.
-
(about calc84's post yesterday):
shouldn't that be:
ld b,6
call irandom
inc a
(I didn't know irandom could take an upper bound, which explains my 'strange' way of working)
-
Lol, ok, that may take a little while though, I'm working on backgrounds. Also, it doesn't take that long to make the edit and compile it 30 seconds tops ;)
It took me 80 seconds from downloading till it assembled. Whom do I sue? ;D <jk>
Eeems, I don't see the update. What was it?
Here's 1.08b after being Assembled correctly. :)
-
(about calc84's post yesterday):
shouldn't that be:
ld b,6
call irandom
inc a
(I didn't know irandom could take an upper bound, which explains my 'strange' way of working)
I'm pretty sure irandom generates a random number from 0 to B-1.
-
It generates a number that is 0=<a<=b, so yeah, what calc said.
Ztrumpet, Thanks! I'll try to get the randomly generated background working today.
-
Great! I can't wait to see the backgrounds! Will they be grayscale? ;D I'm pretty sure you're not there yet, but I am wondering... ;)
-
lol, nope not yet, but that should be easy to do later.
-
Its nice to see that this is progressing so fast! I might want to have another look at assembly at some point :P
-
thanks! well calc84 helped me fix the problem! here is v1.09b!
-
Nice ^^
Ok suggestion: In the future, I wonder if adding stuff that you must not touch (else game over) and maybe more enemies at once might be cool?
-
hmm, well right now I'm working on animations, but later I might add that although that will be a bit harder to do.
-
Wow, that's nice. It's really cool how quickly you can code. I'm also thinking about dabbling more in Asm... :)
-
lol, thanks, well it's because I've had all day to work on it :P
-
Wow, that's nice. It's really cool how quickly you can code. I'm also thinking about dabbling more in Asm... :)
Finish Elmgon first tho D:
-
I'll finish Elmgon first for sure. ;D
-
Phew... thanks :P
But seriously I am looking forward for Elmgon
-
Thanks! ;D I'm making progress, but the battle engine's progress is slow. :)
And Eeems, I'm looking foreward to Hunt.