Making Bitmap Expression update every frame?

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
myraneal
Posts: 26
Joined: Tue Apr 08, 2008 8:00 pm

Making Bitmap Expression update every frame?

Post by myraneal »

Hey all,
Is such a thing possible, to update a Bitmap Expression component update every frame, so that the calculated bitmap changes according to other variables and such?
I wanted to do this for a "power bar" when shooting a ball kinda thing, and I solved my problem with another method, but I'd still like to know.

Thanks,
Yılmaz
User avatar
Kjell
Posts: 1883
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hi Yilmaz,

Use the RefreshContent component. However, keep in mind that updating ( large ) Bitmaps every frame can get quite heavy on your CPU. Always try to look for a solution using Material:TextureX/Y first.

K
myraneal
Posts: 26
Joined: Tue Apr 08, 2008 8:00 pm

Post by myraneal »

Hey Kjell,
Thanks :D I really wasn't aware of the RefreshContent component. That should work. My bitmap isn't that big 32*128. I'll check if this will decrease the framerate much.

Thanks again,
Yılmaz
kattle87
Posts: 402
Joined: Wed Sep 26, 2007 9:06 am
Location: Italy

Post by kattle87 »

Perhaps you could try out pixel Shaders ;) Should work very well and with no FPS loose
myraneal
Posts: 26
Joined: Tue Apr 08, 2008 8:00 pm

Post by myraneal »

Unfortunately, I'm not familiar with shaders at all :cry:
If you could point me towards a tutorial to start from that'd be most appreciated.

-Yılmaz
Post Reply