Author Topic: Fire  (Read 10493 times)

0 Members and 1 Guest are viewing this topic.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4679
  • Rating: +718/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Fire
« on: January 21, 2012, 02:36:31 pm »
Okay, after having some fun with Builderboy's Flame tutorial and Deep Thought's ORG ide, I put together this little program (136 bytes). Pretty much, you send a number in Ans and this program uses that picture as fuel for a fire. If the picture doesn't exist, it just disintegrates the screen. It will keep burning until the user presses a key, too, so you can use this for an intro screen in a game!

Things I am wondering if I should add:
-making white fire instead
-using the current screen as fuel
-seeing if I could add this in as an interrupt to be disabled or enabled
-Adding in 15MHz mode

Offline systwo

  • LV2 Member (Next: 40)
  • **
  • Posts: 25
  • Rating: +7/-0
    • View Profile
Re: Fire
« Reply #1 on: January 21, 2012, 03:09:20 pm »
That's pretty cool! The white fire idea would be a good idea because it would look like more of a fire, as fire is usually brighter. Just a question from a beginning programmer, what does the "3:" and "6:" do?

Offline ben_g

  • Hey cool I can set a custom title now :)
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +125/-4
  • Asm noob
    • View Profile
    • Our programmer's team: GameCommandoSquad
Re: Fire
« Reply #2 on: January 21, 2012, 03:14:21 pm »
they store 3 or 6 into ans before running the program.
My projects
 - The Lost Survivors (Unreal Engine) ACTIVE [GameCommandoSquad main project]
 - Oxo, with single-calc multiplayer and AI (axe) RELEASED (screenshot) (topic)
 - An android version of oxo (java)  ACTIVE
 - A 3D collision detection library (axe) RELEASED! (topic)(screenshot)(more recent screenshot)(screenshot of it being used in a tilemapper)
Spoiler For inactive:
- A first person shooter with a polygon-based 3d engine. (z80, will probably be recoded in axe using GLib) ON HOLD (screenshot)
 - A java MORPG. (pc) DEEP COMA(read more)(screenshot)
 - a minecraft game in axe DEAD (source code available)
 - a 3D racing game (axe) ON HOLD (outdated screenshot of asm version)

This signature was last updated on 20/04/2015 and may be outdated

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4679
  • Rating: +718/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Fire
« Reply #3 on: January 21, 2012, 03:21:54 pm »
Oh, well pictures are named by 60xx in memory. When I do 3, my program looks for the picture 6003 (Pic4) and when I do 6, it searches for Pic7 (6006). Pretty much, I do something like this:
Code: [Select]
     bcall(_RclAns)
     or a                    ;tests if A is 0. this is the type and we want 0 (o is a number)
     jr nz,PicNotFound
     bcall(_ConvOP1)   ;we find the number
     ld d,e
     ld e,60h              ;so DE is xx60. in RAM, it is stored in reverse as 60xx
     ld (OP1+1),de      ;we load the name to OP1
     xor a                  ;optimised way to do ld a,0 (3 cycles faster, 1 byte smaller)
     ld (OP1+3),a        ;we add a zero after the name
     rst rFindSym        ;we locate the var
     jr c,PicNotFound
     inc de
     inc de                 ;de now points tot he picture data :)
Also, it now handles the options using the current graph screen as fuel as well as using white fire (program and screenie coming soon!)

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Fire
« Reply #4 on: January 21, 2012, 03:31:50 pm »
You should have white fire, black fire, and maybe even greyscale fire like in FireFall :D

But it's looking really cool ^^ Do you think the intensity of the fire should be a possible argument?

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4679
  • Rating: +718/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Fire
« Reply #5 on: January 21, 2012, 03:34:09 pm »
That is a good idea, too o.o And I think I will keep the fire options simple XD I want it so any BASIC user can use it with ease :) Also, ORG is not working for me at the moment, so bug testing and stuff is not working D:

EDIT: Okay, here is an updated version:
-Use a number >255 to use the graph screen as an image for fuel
-Use - before the number to use white fire instead

Offline ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
Re: Fire
« Reply #6 on: January 21, 2012, 04:53:40 pm »
Heh...It'd be cool to be able to have your screen burning with grayscale fire while using the calc normally.
There's something about Tuesday...


Pushpins 'n' stuff...


Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4679
  • Rating: +718/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Fire
« Reply #7 on: January 21, 2012, 04:56:41 pm »
Hmm, well I was thinking of making an interrupt to keep a burning picture...

EDIT: It might go well with zStart...

Offline cooliojazz

  • Support Staff
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 619
  • Rating: +66/-9
  • I omnoms on your soul
    • View Profile
    • Unreal Phantasies
Re: Fire
« Reply #8 on: January 21, 2012, 05:06:29 pm »
That would be amazing if you could do that.  I would totally program with fire... XD
Spoiler For Random signess:
You can not beat my skills.
Trust me.
So don't even try.
And remember never to trust someone who says, "Trust me."

TI File Editor Progress: Remade in java like a boss. 50% we'll call it? IDK =P
Java Libraries: JIRC - 90% JTIF - 5%
TI Projects: Unreal Notator - -5000%
Nomcraft, a Bukkit mod
Some of the music I write can be found here | The Rest Should Be Here (Bandcamp)

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Fire
« Reply #9 on: January 21, 2012, 05:07:31 pm »
* Darl181 wonders if something like this would work well as an Axiom
It's not that hard to do yourself but still 0.o
Vy'o'us pleorsdti thl'e gjaemue

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4679
  • Rating: +718/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Fire
« Reply #10 on: January 21, 2012, 05:39:13 pm »
As an axiom command, you would only need to execute one frame and let the user put the frame in a loop. The loop that is executed is this:
Code: [Select]
Fire:
    ld hl,934Ch
    ld de,9340h
    ld bc,2F4h
Random:         ;feel free to give me a smaller rand routine that is pretty random x.x
    push hl
    push de
    ld hl,0
    ld a,r
    ld h,a
    add a,(hl)
    inc hl
    rrca
    add a,(hl)
    inc hl
    rrca
    xor (hl)
    inc hl
    rrca
    rrca
    ld l,a
    ld (Random+3),hl
    and 7
    ld d,8Bh
    ld e,a
    ld a,(de)
    pop de
    pop hl
Method:
    or (hl)            ;change to AND for t'other method
    ld (de),a
    inc de
    cpi
    jp pe,Random
    ret
And 8B00h contains the bytes 0102040810204080. Use FEFDFBF7EFDFBF7F for black fire.
After that, you just draw your picture back over it with display the graph to the LCD :)

To lessen the intensity, you can change the and 7 to and 3 and the values at 8B00h to 18244281 or something similar.
To raise the intensity, change to and 15 and put an FF between each byte at 8B00h, so FEFFFDFFFBFFF7FFEFFFDFFFBFFF7FFF

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1591
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Fire
« Reply #11 on: January 21, 2012, 06:49:26 pm »
Heh...It'd be cool to be able to have your screen burning with grayscale fire while using the calc normally.

Those kind of mods are rather difficult as many OS processes only update the screen and nothing else. That means it would be difficult to keep a memory of what was actually on the screen.

The only solution I see would be to read the entire LCD back before every single grayscale interrupt and compare it to a known copy of what the screen looked like. This however would require two full screen updates and therefore 100% of cpu time at 60hz. It should run at 30hz though.

So, if I get bored... (Or if xeda gets bored (make a getCSC hook that enables your interrupt :D))
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Fire
« Reply #12 on: January 21, 2012, 09:37:00 pm »
Xeda, that's an awesome program! ;D

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4679
  • Rating: +718/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Fire
« Reply #13 on: January 21, 2012, 09:38:01 pm »
Thanks :D I hope it will be useful to some BASIC coder out there some day :)

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Fire
« Reply #14 on: January 22, 2012, 01:52:06 pm »
whoa. I just read this. :D
Looks great. XD
Sig wipe!