User Tag List

Results 1 to 10 of 38

Thread: Zelda Classic 2.53.0 ( Beta 10 )

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,826
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,961
    Level
    33
    vBActivity - Bars
    Lv. Percent
    26.42%
    Quote Originally Posted by ZoriaRPG View Post
    Which do you prefer of these two functions:.
    Neither.

    Besides being in desperate need of optimizing, I don't see the clear purpose of the functions..? But I'm also tired and on my way to bed, so there's that.
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  2. #2
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,765
    Level
    21
    vBActivity - Bars
    Lv. Percent
    69.7%
    Quote Originally Posted by Gleeok View Post
    Neither.

    Besides being in desperate need of optimizing, I don't see the clear purpose of the functions..? But I'm also tired and on my way to bed, so there's that.
    Code:
    // This ensures that the lack of decimal precision in conversion to Allegro radians
    // does not prevent setting certain angles; causing 'drift'.
    I hear my share of complaints about this.

    Setting a moving object to an increment of 45 degrees, other than 0, sets it to a radian value that is only an approximate for that angle. e.g., Setting an angular object to move straight up and down. It may be off by a small amount, and potentially drift; compared to setting Angular false and DIR_UP/DIR_DOWN. That is what these functions automate. It's the only viable way to fix the lack of decimal precision, as it allows a moving object to shift from using Angular to Directional movement, only when its angle (which may be a changing value, and should be passed in degrees), is one of the 8-way directions.

    Obviously, this is useful only to cases where that precision is needed, or beneficial, but it gives an easier way to handle it than making if/else statements in a script.

    I could turn the for loop into a switch block, but I do not think that would be any more optimised at an ASM level, although it would use fewer registers. I'll probably do that, or make it an if chain. I also need to add cases for 360 and amounts over 359 in general, and less than 0 (embedded wrapping).

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social