DELTA's Graphics Mixing Modes: Give Me Your Ideas!!

The Delta 2D Platforming Suite is a forthcoming powerful game creation tool. Its expansive scope and professional game engine will allow creation of almost any 2D platforming game – and best of all, it's free!

DELTA's Graphics Mixing Modes: Give Me Your Ideas!!

Postby Simion32 » February 5th, 2015, 1:43 pm

This is a topic for DELTA's graphics mixing modes (called blenders) where you can suggest customized blenders to be implemented in the engine.

You may also post general ideas about graphics mixing effects.... don't feel discouraged!!

>>> Existing Standard Blenders <<<

You can do anything that can be made in MMX or SSE2 (but you can only use 64bit values at a time!), which is pretty much anything. Even a DKCR-style silhouette blender. DELTA can have up to about 500 different blenders, so... Have at it!

What numbers you can use to make a blender:
Raw values come in as 4-byte segments each with 8 bits of A=Alpha, R=Red, G=Green, B=Blue.
Input : A, R, G, B
Destination: A, R, G, B

You can treat the numbers, when you post, as 0.0 to 1.0, in hex, or etc. and I'll take care of the rest. I suggest using HSL or HSV color spaces if you want hue shifting capabilities. Please only post the general idea or algorithm; there is no real need to post actual code.

Magic Pink (#FF00FF) will be treated by most other blenders as a transparent value, no matter what the alpha value is.

Special: There are 4 parameter bit flags which can be used to modify the blender dynamically straight from the object (and if wanted, right in the DELTA editor). These parameters cannot be used if you want to draw an image that is of a significant size, as they will need to be sacrificed for addressing purposes.

Special: There are also graphics flags that can be set on a global basis, but these are very limited in number. Only 64 are available, and some will be used by default.

Special: Pixel groups are handled by-line in the sprite or graphics being drawn...... each of these has basic data loaded into the graphics routine, called a unit. You are allowed to load parameters from either the pixels pointer (must be aligned to size 4) or using an auxiliary unit -- in case there's not enough room otherwise -- but keep this type of thing to a minimum.

Used Registers & Processing Details, For the Techno Geeks:
7 STANDARD INTEL REGISTERS ARE ALREADY IN USE, except for EAX which is set aside for general use. You may use EAX.
NO STACK ACCESS ALLOWED ANYWHERE: This limitation is due to the entire graphics routine being run stackless. This means ESP and EBP are used.
XMM0, XMM1, and XMM2 are all used for special blending purposes.
Registers MM0-MM7 are free, one of which will need to be used to load in the pixel data.
Sage of Discovery
Bananas received 337
Posts: 2746
Joined: 2008

Re: DELTA's Graphics Mixing Modes: Give Me Your Ideas!!

Postby VideoViking » February 5th, 2015, 4:00 pm

When you say blenders, is this exclusively to the backgrounds, or does it include sprites as well?
Treasure Hunter
Bananas received 41
Posts: 329
Joined: 2009

Re: DELTA's Graphics Mixing Modes: Give Me Your Ideas!!

Postby Simion32 » February 6th, 2015, 11:57 am

Anything drawn in the engine.

I have a few updates *edits into post*.
Sage of Discovery
Bananas received 337
Posts: 2746
Joined: 2008

Re: DELTA's Graphics Mixing Modes: Give Me Your Ideas!!

Postby Simion32 » February 7th, 2015, 12:06 pm

At this point all the original blenders are going to come with an alpha option, color override, variable alpha multiplier, and previous-alpha-data-pass-through mode.

You'll be happy to hear that I have plans to include the ability to write arbitrary pixel values and shift or shuffle them around. :geek:

You can also grab an arbitrary pixel or line of pixels from some screen offset (for game trigger purposes) and dump it to a memory location, although this is slow, and is not intended for heavy use.

There are a few new default modes on the list as well:
Greyscale-ify (Several Modes including "Retro Console")
Colorize (Intelligent Hue/Saturation Adjuster)
Posterize (Smooth Color Depth Degredation per-Channel)

So far, there are 34 default blenders. There's 16 bitwise operations, Normal, Add, Subtract, Average, Multiply and its 3 other variants, Minimum, and Maximum... along with the few capabilities listed above.

They cover most of the graphics drawing scenarios you would ever want to construct. Keep the ideas coming!
Sage of Discovery
Bananas received 337
Posts: 2746
Joined: 2008

Re: DELTA's Graphics Mixing Modes: Give Me Your Ideas!!

Postby Simion32 » February 8th, 2015, 1:37 am

Another update: There's now no obscure 6E-101 pattern detection mechanism. I've designed it out of the routine. No longer necessary.
Sage of Discovery
Bananas received 337
Posts: 2746
Joined: 2008

Re: DELTA's Graphics Mixing Modes: Give Me Your Ideas!!

Postby Simion32 » February 17th, 2015, 4:36 am

Progress Update: LOTS of capability upgrades. I've added a starting list of blenders for you to examine.

Sprites can be dynamically resized (but not rotated) and it is now possible for the engine to do live zoom-ins/outs of the level.
Sage of Discovery
Bananas received 337
Posts: 2746
Joined: 2008

Re: DELTA's Graphics Mixing Modes: Give Me Your Ideas!!

Postby VideoViking » February 17th, 2015, 11:12 am

Can selecting a specific blender trigger a function (such as "if negation, have sprite do something according to DELTA commands")?
Treasure Hunter
Bananas received 41
Posts: 329
Joined: 2009

Re: DELTA's Graphics Mixing Modes: Give Me Your Ideas!!

Postby Simion32 » February 18th, 2015, 4:00 am

Since the blending mode used is directly controllable by the custom object (you call the drawing function yourself), it is possible to synchronize code calls with graphical effects, changes in blending mode, changes in dynamic alpha, etc...
Sage of Discovery
Bananas received 337
Posts: 2746
Joined: 2008

Re: DELTA's Graphics Mixing Modes: Give Me Your Ideas!!

Postby Simion32 » March 20th, 2015, 2:33 pm

Blenders now have the capability to DYNAMICALLY be inverted at the source, destinations, and result; and the source/destination images can be swapped too.

I've updated the list of blenders as well, have a look.

All of the bitwise blenders can be reconstructed using swaps/inverts of just the 4 provided. ;)
Sage of Discovery
Bananas received 337
Posts: 2746
Joined: 2008

Re: DELTA's Graphics Mixing Modes: Give Me Your Ideas!!

Postby VideoViking » March 20th, 2015, 4:33 pm

Looks like the modulus function made it into the blenders list after all! :D

You may want to explain what some of the notations mean, like PDN, PS and WP (which I'm guessing is Windows Paint. But I don't recall Windows having an advanced paint program, do they?)

Are GIMP's blenders in the planning?
Treasure Hunter
Bananas received 41
Posts: 329
Joined: 2009

Re: DELTA's Graphics Mixing Modes: Give Me Your Ideas!!

Postby Simion32 » March 21st, 2015, 1:38 am

WP refers to Wikipedia, but most of those are a back-reference to PSD (Photoshop).

I've got planned a system where you will be able to note down what application a blender came from using a custom config file, though allowing the programming of new (non-chained) blenders may or may not be possible.

I'm not so certain about GIMP. Those modes might already be in DELTA's list at this point.

Advanced heavy effects like Curves and anything doing complex color replacing won't work in realtime all that well.

I do, however, have a plan for the Hue, Luma, Chroma color space stuff so that conversions are 1:1 [HLC <-----> RGB] e.g. you can convert back and forth without the color changing.
Sage of Discovery
Bananas received 337
Posts: 2746
Joined: 2008

Re: DELTA's Graphics Mixing Modes: Give Me Your Ideas!!

Postby Simion32 » March 21st, 2015, 2:00 am

I've updated the blenders list again and clarified a few things. I might update it again in a few minutes.
Sage of Discovery
Bananas received 337
Posts: 2746
Joined: 2008

Re: DELTA's Graphics Mixing Modes: Give Me Your Ideas!!

Postby Simion32 » March 26th, 2015, 2:32 pm

Updated!!

There are now an absolutely massive 64 blenders, each of which may have up to 16 variants based on the combinations of inversions/swap flags.
Sage of Discovery
Bananas received 337
Posts: 2746
Joined: 2008

Re: DELTA's Graphics Mixing Modes: Give Me Your Ideas!!

Postby edevore » March 31st, 2015, 6:21 am

I wasn't sure how the progress of this project turned out, I haven't been here in ages... Well hopefully I will be able to stick around more and not be so busy, I was curious what the overall progress is?
Trainee Trekker
Bananas received 2
Posts: 97
Joined: 2008


Return to Delta Suite

Who is online

Users browsing this forum: No registered users and 0 guests