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 - BuckeyeDude

Pages: 1 ... 17 18 [19]
271
Pokemon Red / Re: Pokemon Red
« on: June 19, 2010, 03:29:53 pm »
Oh yeah and if I didn't mention, the second they become accessible in the game, I can add them. Eg: whenever someone gives me viridian forest I'll add it in now.

272
Pokemon Red / Re: Pokemon Red
« on: June 19, 2010, 03:21:35 pm »
Holy crap guys I go away for one night and come back with 4 pages of stuff. Anyways to address some of the stuff I remember. So far I have put in the maps of Pallet, Route1, Viridian, Route 2, Route 21, Route 22. I have created most of the main engine, events, NPCs, and so on. All the back sprites of the pokemon are done, and thanks to Art_of_Camelot the first 37 fronts are done too. All the base pokemon stats and move data is in. The one big thing NOT in the game right now is the Pokedex data. The battle engine has been started, it has support for all the stuff (accuracy/evasion, paralysis, sleep, etc.) but only parts of that have been implemented, eg. it checks to see if you're asleep but there is  no way to currently do that :P

As for some of the issues brought up, yes critical hits happen way to often. The original formula is the base speed/2 * critical hit rate. If a randomly generated number is lower than this then its a critical hit. Critical hit rate is 1 unless the move is crabhammer, razor leaf, slash, or something if forget, in which case it is 8. I think the problem is the random number generator doesn't provide enough variance in the randomness. This also creates a problem with discovering wild pokemon (you'll notice that you find lots of pokemon at once).
Code: [Select]
;a = move index
;ix->pokemon structure
CheckCriticalHit:
;N is 1 unless it is a high ratio, then 8
;max(255, int(N*int(Speed/2)))
ld hl,BattleFlags
res criticalHit,(hl)
;i dont think hl matters at this point...
push af
ld a,(ix+IndexNum)
call GetPokemon
call skipstring
ld de,4
add hl,de
ld a,(hl)                  ;hl-> base speed
srl a
ld h,0
ld l,a
pop af
cp Crabhammer
jr z,HighCritRatio
cp KarateChop
jr z,HighCritRatio
cp RazorLeaf
    jr z,HighCritRatio
    cp Slash
    jr nz,_
HighCritRatio:
add hl,hl
add hl,hl
add hl,hl ;*8
_
ld de,256
cp hl,de
jr c,_
ld l,255 ;max(hl, 255)
_
ld b,255
call random2
cp l
ret nc
ld hl,BattleFlags
set criticalHit,(hl)
ret
The issue with damage is also something im rather stumped upon. It doesn't happen very often, which makes it harder to find. The damage formula is very complex, so im sure there are things wrong with my implementation. I'll post that as well, see if I missed an obvious issue. As for why sand attack can kill you, each non damaging move requires me to specify a call back, which I have not done so for sand attack, so it just goes through the normal damage formula :P

Code: [Select]
;ix->pokemon structure
;iy->enemy pokemon
;(movepower) contains maybe the moves power (no duh :P)
;STABBonus is set if stab bonus is in effect
;(TypeModifier) contains type modifier (400, 200, 100, 50, 25, 1)
CalculateBDF:
ld a,(ix+level)
add a,a
ld h,0
ld l,a
ld c,5
call divhlbyc
;since max level is 100 it will be fine 8 bit
;100*2*2/5 = 80
inc l \ inc l
ld b,l ;b = 2L/5+2
ld de,0
ld a,(BattleFlags)
bit CriticalHit,a ;a critical hit ignores all this
jr nz,_
ld hl,(CurrentBattleStuff)
ld de,AttackBattleStuff
add hl,de
ld hl,a,(hl)
_
ld e,(ix+attack)
ld d,(ix+attack+1)
add hl,de
ld a,b ;a = 2L/5+2
call multhlbya
ld a,(MovePower)
or a
jp z,NoMovePower
call multhlbya
ex de,hl
ld bc,0 ;so we can dont effect defense
ld a,(BattleFlags)
bit CriticalHit,a ;a critical hit ignores all this
jr nz,_
ld hl,(RelativeEnemyBattleStuff)
ld bc,DefenseBattleStuff
add hl,bc
ld c,(hl)
inc hl
ld b,(hl)
_
ld l,(iy+defense)
ld h,(iy+defense+1)
add hl,bc
ld bc,1
or a
sbc hl,bc
add hl,bc
jr c,_
ex de,hl
ld a,h
ld c,l
call divacbyde
ld h,a
ld l,c ;hl = ((2L/5+2)*A*P)/max(1,D)
_
ld c,50
call divhlbyc ;hl = (((2L/5+2)*A*P)/max(1,D))/50
ld de,997
cp hl,de
jr c,_
ld hl,997 ;hl = min(((((2L/5 + 2)*A*P)/max(1, D))/50), 997)
_
inc hl
inc hl ;+2 to a max of 999
ld a,(BattleFlags)
bit STABBonus,a
jr z,_
ld de,hl ;this does hl*1.5
srl d
rr e
add hl,de ;hl = ((min(((((2L/5 + 2)*A*P)/max(1, D))/50), 997) + 2)*S)
_
ex de,hl
ld a,(TypeModifier)
call multdebya ;this one needs to be de*a so we have the a 24 bit result
ld e,a
ld d,100
call divehlbyd ;hl = ((((min(((((2L/5 + 2)*A*P)/max(1, D))/50), 997) + 2)*S)*10T)/100)
ld a,(BattleFlags)
bit CriticalHit,a
jr z,_
add hl,hl
_
ld b,255-217
call random2
add a,217
call multhlbya
ld a,h
ld c,l
ld de,255
call divacbyde
ld h,a
ld l,c

;fuck that was a long equ
;result is
;hl = (((((min(((((2L/5 + 2)*A*P)/max(1, D))/50), 997) + 2)*S)*10T)/100)*R)/255
;in theory at least
;by this equ 5992 is the max amount of damage doable in one shot
ret
NoMovePower:
ld hl,BattleFlags
res CriticalHit,(hl)
ld hl,0
ret

As for what you guys can do to help. I will need the pokedex imported into something spasm can do with macros. Not sure how this will be done yet, but when i figure out the necessary stuff, it would be helpful if you could each add one or two entries. I am also posting all the tiles I have so you guys can make maps. http://group.revsoft.org/Pokemon should contain everything you need to make maps. All the maps can be found http://www.spriters-resource.com/gameboy/pokerb/index.html. Claim whatever map you want to do here, and I'll try to keep track of everyone doing maps.

I should also point out that I was not doing this alone. I had the help of a good friend at school, who is not active in the community, to convert all the back sprites, tiles, and maps to this point. Also had the help of another person making front sprites (although he disappeared recently) and lately as I said earlier, aoc has been helping with those. Anyways thanks for all the support guys, hopefully by the end of summer I'll have something playable for the school year :D


273
Pokemon Red / Pokemon Red
« on: June 19, 2010, 01:42:58 am »
As you guys may know I've been working on a Pokemon Red clone for some while now, but I'm really looking for some feedback to make sure as I progress I stay as true to the original as possible.
You might ask what makes this clone different from all the million or so other projects. Not much actually, but my one claim to fame is I'm writing it in pure assembly. This has two advantages, one speed. Its fast. Fast enough to make it look like the original on 800% speed (for asm programmers I do the equivalent of 5 halts to get it close to the original). Second advantage is importing data. I can just go find the stuff online, format it into macros and boom I have all the Pokemon and item data.

At this point I am working on two things. One finishing up the main engine. The goal is to make most everything done through macros so that anybody can pick it up and add some data. Two, the battle engine. Its a beast :|

tl;dr download some pokemans and give feedback.
Warning: requires a 83+SE or greater. Very large program. Possibility of crashes.
Pokemon.8xk

274
Axe / Re: Enlarging sprites?
« on: June 06, 2010, 05:19:34 pm »
Even if you could do this, it probably wouldnt be a smart idea. Drawing anything takes a lot of time normally, and you will want to optimize it as much as possible. This is made even harder by the fact that it is stored as bits and not bytes. Much better to use the extra space and store the sprite blown up if you need that. This also lets you store extra detail instead of a blown up 8x8

275
General Calculator Help / Re: WabbitEmu Skin?
« on: May 29, 2010, 06:35:27 pm »
Quote
There's still a problem with loading new ROMs, though. This was the same as with the previous version: whenever I load a new ROM, it doesn't change immediately. I have to open a new calculator for the change to take effect.

It would help if someone filed a bug report telling me the issue. I tend to forget all the things i break :P

276
News / Re: The end of Revsoft?
« on: May 29, 2010, 04:04:12 am »
As far as I know that is soon to be gone. We're waiting on will to move all of that over to the codeplex, to keep everything in one central location. That was actually the reason for the name on codeplex, Spencer originally named it Wabbitsuite but it was changed to keep consistent with Will's stuff.

277
WabbitStudio Software Suite / Re: WabbitStudio Software Suite
« on: May 18, 2010, 04:14:26 am »
Technically any build is redistributable under the terms of the GPL. However I asked you to put specific versions in the Omni archives because most of the Wabbit versions were not ready for the general public, they are simply releases that we want to be tested beyond just Spencer and I.

278
WabbitStudio Software Suite / Re: WabbitStudio Software Suite
« on: May 17, 2010, 07:15:18 pm »
Its all under the GPL except for certain portions of Wabbitcode, which have sections redistributed under various license agreements (LGPL, MIT, etc). To be honest we don't really care as long as you're not passing it off as your own.

279
WabbitStudio Software Suite / Re: WabbitStudio Software Suite
« on: May 17, 2010, 06:24:02 pm »
I should note that with the transition to using visual studio to build some features will be momentarily lost (eg: the option of sending to ram or archive when dragging) but they will reimplemented fairly shortly. This doesnt effect you quite yet, but it also means any new features you request will appear in that build, not the default download build.
Also interestingly look at the reported file size for the normal Wabbitemu build. Awesome.

280
WabbitStudio Software Suite / WabbitStudio Software Suite
« on: May 17, 2010, 12:25:22 am »
With Revsoft still down, and the lack of the awesome group.revsoft.org repository, Spencer decided to move over all our projects to a new central location. The new official place for all wabbit related software is http://wabbit.codeplex.com/.
The latest stuff will always be located here. It also has a lot of fancy features for stuff like bug tracking that I beg of people to use. Anyways yeah, spread the word so that I don't get more complaints asking me to fix stuff that has already been fixed, or people who won't use this because of it doesn't have feature X.
It should also be noted that all platforms will also use this repository, so there is no need to hunt around for the OS X and linux builds.

281
Axe / Signed Comparison Broked
« on: May 03, 2010, 11:42:48 pm »
Not sure if anyone else has mentioned this, but the signed comparison in Axe doesn't work.
Code: [Select]
-1->A
25->B
If A>>B
Returns true. I did a quick check at your code generation and it seems to me it would be easier to check the high order register first then do a normal compare on the lower, although I dont know if you had other reasons for doing it this way.

I should also add that I was quite impressed with the speed of the parser and code generation. Can't wait to see more in the future.

Pages: 1 ... 17 18 [19]