Don't have an account? Register now to chat, post, use our tools, and much more.
Online Users
There are 99 users online: 2 members, 72 guests and 25 bots.
Bots: Magpie Crawler (4), Googlebot (20), MSN/Bing (1).
SAX
 » Goto page 1, 2, 3 ... 12, 13, 14  Next
Author Message
tifreak8x

Guru

Joined: 16 Mar 2005
Posts: 9060
Location: Sol System

 Posted: 28 Mar 2012 07:33:20 am    Post subject: [Pokemon Purple] Progress 2012 Ordered list of getting the HP bars to increase on the party screen: 1) Calculate current HP %, *100, /4. Add value to 3+52(Z>3), store to var1. 2) Increase HP via potion or other item, check HP does not exceed HPmax. 3) Calculate new HP %, *100, /4. Add value to 3+52(Z>3), store to var2. 4) For loop with var1,var2 to increase hp bar. I've started writing out the code for it, hopefully will have it done soonish. It's going to be another bit of code that will be a pain in the butt to write._________________Projects: AOD Series: 70% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5% Look here for Assembly Resources.Last edited by tifreak8x on 20 Jan 2013 11:03:00 am; edited 1 time in total
KermMartian

Joined: 14 Mar 2005
Posts: 55741
Location: Earth, Sol, Milky Way

 Posted: 28 Mar 2012 08:10:02 am    Post subject: At last, a 2012 topic! And only one-quarter of the year gone first. What about those items is particularly challenging, would you say? Also, what are you picking for var1 and var2?_________________
tifreak8x

Guru

Joined: 16 Mar 2005
Posts: 9060
Location: Sol System

 Posted: 28 Mar 2012 08:26:04 am    Post subject: There HAS been a 2012 topic, just on TI-Freakware, where no one goes :p The hardest part is just writing this dynamic bit of code so it can fill in the proper bar and all that. The first line of code for it is "|LP"+sub("123456",Z,1)->Str7. This basically gives you which |LP# list you're working with. So you have to build the whole string of code around that, which is fun._________________Projects: AOD Series: 70% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5% Look here for Assembly Resources.
tifreak8x

Guru

Joined: 16 Mar 2005
Posts: 9060
Location: Sol System

 Posted: 11 Apr 2012 06:51:18 am    Post subject: Code: ```"|LP"+sub("123456",Z,1)->Str7 4->theta:"ZTEMP"->Str0:prgmZCE 3->theta:prgmZCE Str7+"(2)/"+Str7+"(1)"+sub(Str9,1,1)+"|N:"+Str7+"(1)"+sub(str9,1,1)+"X:"+Str7+"(2)"+sub(Str9,1,1)+"Z:If X +200Z:Z-X"+sub(Str9,1,1)+"J:(X+J)/Z"+sub(Str9,1,1)+"I%:``` That's what I have thus far to get it so it will increase the HP bar and values at the same time. I'm still at a loss on whether I should loop through with a For( loop and recalculate the length of the hp bar through each pass or figure out some other way of doing things. Trying to be as memory efficient as possible while still being completely dynamic. Edit: After some thought, I'm thinking about removing the numerical values of HP/HPMax shown on the party screen. This would shrink the program a small amount, allow the display to be faster, and would make it easier to change the HP values on that screen via just updating the bar instead of doing both bar and numbers. Thoughts?_________________Projects: AOD Series: 70% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5% Look here for Assembly Resources.
Compynerd255

Power User

Joined: 08 Apr 2011
Posts: 397

Posted: 11 Apr 2012 09:22:13 am    Post subject:

 tifreak8x wrote: Edit: After some thought, I'm thinking about removing the numerical values of HP/HPMax shown on the party screen. This would shrink the program a small amount, allow the display to be faster, and would make it easier to change the HP values on that screen via just updating the bar instead of doing both bar and numbers. Thoughts?

I can see the reasoning for that. However, I think that people might like to see HP numbers simply to know how powerful their Pokemon are and exactly how effective their Potions and things will be. For the latter case, I'd recommend that when you are using a health restoring item on the Party screen, you show a blinking extension of the health bar as a preview of how much health the item will heal.
_________________
Visit Betafreak Games: http://www.betafreak.com
Help Me Pay for College:
tifreak8x

Guru

Joined: 16 Mar 2005
Posts: 9060
Location: Sol System

 Posted: 11 Apr 2012 09:24:36 am    Post subject: As much as I'd like to offer that, that would be beyond difficult for my current set up to do, since I have to keep the lists in archive. I'll keep the numbers, then, and find a way to update both numbers and bar at the same time._________________Projects: AOD Series: 70% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5% Look here for Assembly Resources.
tifreak8x

Guru

Joined: 16 Mar 2005
Posts: 9060
Location: Sol System

 Posted: 16 Apr 2012 07:12:47 am    Post subject: So, I guess I should update here that I've mostly thought of a way to update both the numbers and bar at the same time. I just have to figure out how to do the equation properly for a conditional to know when to increment the bar. I might end up just cheating and using additional variables to increment and every nth one, increment the bar._________________Projects: AOD Series: 70% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5% Look here for Assembly Resources.
KermMartian

Joined: 14 Mar 2005
Posts: 55741
Location: Earth, Sol, Milky Way

Posted: 16 Apr 2012 08:44:10 am    Post subject:

 tifreak8x wrote: So, I guess I should update here that I've mostly thought of a way to update both the numbers and bar at the same time.
Of course you should! What was that way?
 Quote: I just have to figure out how to do the equation properly for a conditional to know when to increment the bar. I might end up just cheating and using additional variables to increment and every nth one, increment the bar.
Well, if you're using lines for the bar, you can simply draw out the lines' length as BAR_LENGTH*(CUR-MIN)/(MAX-MIN), where the value being measured has current, minimum, and maximum values CUR, MIN, and MAX. If you're using pixels, and you only want to update the bar when it will show another column of dark pixels, say for example that your variable range is 0-100 and the bar is 50 pixels long. You would want to update it when not(fPart(X/2.
_________________

tifreak8x

Guru

Joined: 16 Mar 2005
Posts: 9060
Location: Sol System

 Posted: 16 Apr 2012 08:53:57 am    Post subject: Well, the bar is 25 pixels in length. The idea is to store hp, hpmax, hpgained, curbarlength, newbarlength, barlengthgained and pixelperhp in separate variables. Then in a For( loop, where I'm incrementing from hp,hp+hpgained, every nth value hp goes up in the loop, it increments the bar by one pixel. It doesn't have to do anything fancy with it beyond that point, because if you go back to the party screen again, it will recalculate and display that stuff brand new. I hope this makes sense Also, I thought about that, but I'm not sure that will work correctly._________________Projects: AOD Series: 70% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5% Look here for Assembly Resources.
KermMartian

Joined: 14 Mar 2005
Posts: 55741
Location: Earth, Sol, Milky Way

 Posted: 16 Apr 2012 09:42:03 am    Post subject: I'd say it's unnecessary to store newbarlength, barlengthgained, and pixelperhp anywhere. I'd probably just turn on the next pixel, in this case, any time you increment the health, as BASE_COLUMN+25*(hp/hpmax); there's nothing wrong with turning on the same pixel multiple times. _________________
tifreak8x

Guru

Joined: 16 Mar 2005
Posts: 9060
Location: Sol System

 Posted: 16 Apr 2012 10:22:07 am    Post subject: But it would slow down the whole process every time it ran through that equation, though. Not working with asm here :p_________________Projects: AOD Series: 70% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5% Look here for Assembly Resources.
KermMartian

Joined: 14 Mar 2005
Posts: 55741
Location: Earth, Sol, Milky Way

Posted: 16 Apr 2012 10:44:39 pm    Post subject:

 tifreak8x wrote: But it would slow down the whole process every time it ran through that equation, though. Not working with asm here :p
It would only need to update the HP bar every once in a while anyway, imho; I think the conditional to decide whether to re-draw it or not would be more overhead than just going ahead and drawing.
_________________

tifreak8x

Guru

Joined: 16 Mar 2005
Posts: 9060
Location: Sol System

 Posted: 17 Apr 2012 01:04:04 pm    Post subject: Well, I guess I can try it both ways in their own programs and see what happens. Would be the best to get down what is faster than what._________________Projects: AOD Series: 70% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5% Look here for Assembly Resources.
KermMartian

Joined: 14 Mar 2005
Posts: 55741
Location: Earth, Sol, Milky Way

Posted: 17 Apr 2012 01:07:49 pm    Post subject:

 tifreak8x wrote: Well, I guess I can try it both ways in their own programs and see what happens. Would be the best to get down what is faster than what.
But really, how often are you redrawing the HP bars? It's not like it's inside the getKey loop or something. I feel like it wouldn't be worth your time and headaches to worry too much about the extra millisecond every dozen seconds.
_________________

tifreak8x

Guru

Joined: 16 Mar 2005
Posts: 9060
Location: Sol System

 Posted: 18 Apr 2012 04:05:49 am    Post subject: I'll write the code up to do that, then, and throw it in its own program to see what it looks like. Edit: What I've written so far to test, hopefully it works the first time, once I make it look like a normal program. Code: ```X - HP V - HPMax I - J - Points healed "|LP"+sub("123456",Z,1)->Str7 4->theta:"ZTEMP"->Str0:prgmZCE 3->theta:prgmZCE +Str7+"(1)"+sub(str9,1,1)+"X:" +Str7+"(2)"+sub(Str9,1,1)+"V: For(F,X,X+J Text(Text(7+21(Z!=4 and Z>1)+21(Z=3 or Z=6),(2+52(Z>3))+4(2-int(log(F))),F: iPart((|E2(X/V)).25"+sub(Str9,1,1)+"K: 47(Z=1 or Z=4)+26(Z=2 or Z=5)+5(Z=3 or Z=6"+sub(Str9,1,1)+"F: Line(2+52(Z>3)+1,F,(C+1)+K,F: End```_________________Projects: AOD Series: 70% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5% Look here for Assembly Resources.
KermMartian

Joined: 14 Mar 2005
Posts: 55741
Location: Earth, Sol, Milky Way

 Posted: 18 Apr 2012 10:04:59 am    Post subject: Is that nested Text a typo or some amazing technique that I've never seen before? _________________
tifreak8x

Guru

Joined: 16 Mar 2005
Posts: 9060
Location: Sol System

 Posted: 18 Apr 2012 10:06:34 am    Post subject: Oh, whoops. Yeah, a typo on my part. Not really sure how that happened, but I was half asleep when typing that code up 0x5_________________Projects: AOD Series: 70% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5% Look here for Assembly Resources.
KermMartian

Joined: 14 Mar 2005
Posts: 55741
Location: Earth, Sol, Milky Way

Posted: 18 Apr 2012 10:09:16 am    Post subject:

 tifreak8x wrote: Oh, whoops. Yeah, a typo on my part. Not really sure how that happened, but I was half asleep when typing that code up 0x5
Fair enough. Other than that, though, that looks like very tight code; I hope it works.
_________________

tifreak8x

Guru

Joined: 16 Mar 2005
Posts: 9060
Location: Sol System

Posted: 19 Apr 2012 06:15:09 pm    Post subject:

 Quote: [19:14] Just wanted to throw this at you: 47(Z=1 or Z=4)+26(Z=2 or Z=5)+5(Z=3 or Z=6) == 68-21(Z-3(Z>3))

note to self.
_________________
Projects: AOD Series: 70% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5%

Look here for Assembly Resources.
tifreak8x

Guru

Joined: 16 Mar 2005
Posts: 9060
Location: Sol System

 Posted: 25 Apr 2012 03:26:51 pm    Post subject: So, here are a few screenshots: These two screenshots above show, in a perfect world when the amount of HP_Gain is either increased by 1 or increased by 5, with the HP_Gain being 200. Now the above two show what happens when you have an HP_Gain of a non divisible by 5 number, 74. Because everything is wrapped in a For( loop, it doesn't complete the loop properly. I'm thinking about possible fixes right now, because doing it by +5 is an obvious need, because +1 just takes a long time with larger values. :/ Thoughts on the screenshots?_________________Projects: AOD Series: 70% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5% Look here for Assembly Resources.
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 » Goto page 1, 2, 3 ... 12, 13, 14  Next Page 1 of 14 » All times are GMT - 5 Hours

 Jump to: Select a forum Announcements----------------Cemetech AnnouncementsCemetech LabsContests General Discussion----------------Technology & Calculator Open Topic-- Electronics/Hardware Development-- Calculator HardwareYour ProjectsGeneral Open Topic-- Politics & Rants-- Reviews-- Humour/Jokes Cemetech's Projects----------------Doors CSSourceCoderMember Features-- TI-Freak8x-- Merthsoft-- GrammerOther & Upcoming Projects-- The BASIC Elite-- mobileTunes-- CALCnet 2.2-- SuggestionsProgramming the TI-83 Plus/TI-84 PlusUsing the TI-83 Plus/TI-84 PlusWebsite Programming & Design----------------General Programmingz80 AssemblyTI-BASICCasio Prizm/FX Development & ProgrammingWebsite Markup & ScriptingGraphics1337 Programming Tips Building with Blocks----------------FreeBuild, LEGO, and Minecraft-- FreeBuild General-- Suggestions & Troubleshooting-- Content & Gallery-- Servers & Activities
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© Copyright 2000-2013 Cemetech & Kerm Martian :: Page Execution Time: 0.041717 seconds.