Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] - 2D faded trails

Author
Message
Phaelax
DBPro Master
20
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 11th Apr 2012 13:48
Quick snippet I came up with this morning before breakfast.




"You're not going crazy. You're going sane in a crazy world!" ~Tick
Rapidrory
14
Years of Service
User Offline
Joined: 21st Aug 2009
Location:
Posted: 12th Apr 2012 20:32 Edited at: 13th Apr 2012 16:22
Nice This has given me an idea...

EDIT:

Well that provided me with an evening's entertainment : http://forum.thegamecreators.com/?m=forum_view&t=195935&b=5

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 22nd Apr 2012 23:24
Phaelax - NICE!

however...

Quote: "Quick snippet I came up with this morning before breakfast."


HAKYAKYAKYAKYAKYAK come on

Phaelax
DBPro Master
20
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 26th Apr 2012 02:32
Hey I dunno, it just hit me during morning exercise, so I wrote it real quick after my shower.

"You're not going crazy. You're going sane in a crazy world!" ~Tick
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 27th Apr 2012 13:44
Cool. One idea for a little performance boost might be to use a wrapping integer to set the current point. So rather than juggling the array, you'd just set it to a new indice each loop, and calculate the line fade from that, wrapping it if the indice is <0, to however many indices are in the array. Probably wouldn't make a huge difference unless there were hundreds of indices.

Health, Ammo, and bacon and eggs!

Login to post a reply

Server time is: 2024-03-28 21:41:40
Your offset time is: 2024-03-28 21:41:40