Door Games Unlimited

Welcome, Guest.


Subject: Re: Sprites and scrolling and BINs Date: Sat Jan 10 2015 13:17:05
From: MCMLXXIX To: Kirkman

  Re: Re: Sprites and scrolling and BINs
  By: Kirkman to MCMLXXIX on Fri Jan 09 2015 22:02:01

 > Yes, this makes the difference. If I initialize the frame with BG_BLACK, the
 > BIN appears correctly. Thanks!
 > 
 > However, I can't set this value when I make a sprite.
 > 
 > I tried replacing "0" with BG_BLACK in the frame init routines on lines 874
 > and 1384 of sprite.js:
 > 
 > this.frame = new Frame(x, y, this.ini.width, this.ini.height, BG_BLACK,
 > parentFrame);

if you pass "undefined" instead of "BG_BLACK" (without quotes) it will let you
use transparency on the sprite. It's probably worth noting that if you really
want that black outline around your sprite, you should explicitly draw it in
the BIN file (instead of just leaving those spots empty) so that if you do use
transparency that black outline wont be masked.

---
 ■ Synchronet ■ The BRoKEN BuBBLE (bbs.thebrokenbubble.com)

Previous Message       Next Message
In Reply To: Re: Sprites and scrolling and BINs (Kirkman)
Replies: Re: Sprites and scrolling and BINs (Kirkman)