Jump to content

Mord's Blog

  • entries
    170
  • comments
    93
  • views
    98,681

Data/Graphics Separated

Sign in to follow this  
Mord

288 views

Finished part 2. I've removed object data from the graphics data. This has several benefits. One of those being that now different objects can share the same graphics data - but otherwise be different. (Different size, different speeds, different AI/collision, different color, different maxhp, etc)

 

I have to clean up the code a little bit before I move on to the next milestone. I'll do that either when I wake up later today or tomorrow morning when I get home from work. :)

 

 

*update*

 

Had a chance to look quickly at the gate collision problem and I know why the key doesn't always react. I have the object collision check placed in with the Gate Movement code, rather than the gate's AI. The reason the key doesn't always react to it despite it flickering in, is because the gate movement code is Tick based, and thus only triggers once every 6 frames. That's 5 potential frames out of 6 where even if the key flickers in to collide with the gate, the collision won't get tested. With those kinds of odds, it's amazing the key triggers the gate at all!

 

Gotta go to work within the hour so don't have time to modify it. I'm going to print off the associated code so that I can pencil/pad what I'll do when I get home on the way to work. :)

Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...