DSG

Last Login:
April 25, 2013
Warn:

Rank:
Member
Member Points:
45



User Profile
Follow

Hits: 104,434
Joined November 06, 2005
Games (21)

Starburst Dark Fusion Demo
November 08, 2005
Zanis
November 06, 2005
Azul
November 07, 2005
Mr. Cannonball
November 11, 2005
Dark Player Pro 4
November 14, 2005
Invasion
November 20, 2005
Cyclone WIP
December 15, 2005
Cyclone
December 17, 2005
Planet Pacman
January 16, 2006
Old Man's Mansion WIP
February 17, 2006
Starburst Zero WIP
February 24, 2006
Bomber WIP
March 12, 2006
Big Clock
March 13, 2006
Sketched WIP
April 08, 2006
The Nightmare Factory WIP
May 02, 2006
Invasion 2
May 18, 2006
KRE8
May 31, 2006
Gecko Updated V1.4
July 03, 2006
Twinkle
July 01, 2006
Sector 5 (working title)
August 19, 2006
Sketched: Early Beta
November 02, 2006
Examples (3)

Lines Effect GM6
January 14, 2006
Crazy Effects
January 24, 2006
Crazy Effects 2
January 25, 2006
Favorite Users
Dev - Sort these by name
Favorite Games


UGHHH i need help here...
Posted on June 20, 2012 at 20:30

Does anyone know how to set a blend color for an entire tileset? Either for an entire tile set or for an entire tile layer. I can't seem to find a way to do it in GM8.1... If I can't find a way to do so, I may not be able to do a day/night engine like I had hoped :O

Also, Depths 2D is looking shweet. It's a lot of fun doing 2D too, forget 3D Depths mwahahahahahaaa.

mmm.

3D was really limiting now that I think of it.

//////////// MORE INFORMATION IN THE COMMENTS ////////////

also, i thought i'd try ending all codes with draw_set_color(global.rgb) instead of draw_set_color(c_white) hoping it'd effect the tiles aswell and everything else unless otherwise specified at the beginning of the draw code on a per-object basis.


the best way i can explain it is, i really need a function like this imaginary one i just made up i wish existed. draw_tile_layer_set_color(layer,color)


Dev - Warning
Dev - After editing rating, make rating display change
Dev - When editing, update "edited" column
Dev - Restore deleted comments
Dev - Display deleted comments if mod (hidden, then with dropdown)
Dev - After deletion or during edit, make rating dropdown appear again
Dev - Stricter rating rules. Prevent user from rating again
Dev - Pages
Dev - Reporting
27 Results
1 2 Next

How are your tiles "stored"? Are they in a uniform grid?
Or can't this be of use;

Quote
background_replace(ind,fname,removeback,smooth) Same as above but in this case the background with index ind is replaced. The function returns whether it is successful. When the background is currently visible in the room it wil be replaced also.
Posted by SpectreNectar June 20, 2012 20:52 - 11.3 months ago
| [#01]

i can see that possibly being useful for something else. but i have a variable, global.rgb and its = to draw_set_color(global.redv,global.greenv,global.bluev), these 3 variables change smoothly and independently to fade to different colors that are used for all objects and tiles with the exception of light sources [e.g. sytro's goggles and suit lights, the gun beam, flames, and layers of reflected light and stuff]
Posted by DSG June 20, 2012 20:59 - 11.3 months ago
| [#02]

also, it doesnt apply to the background so i cant draw a white square over the view in bm_subtract, though thats how ive done it in the past but its a poor solution as i cant draw any light sources in the behind it.
Posted by DSG June 20, 2012 21:01 - 11.3 months ago
| [#03]

Then you probably want to create backgrounds on the fly.

Another useful function:
Quote
surface_save(id,fname) Saves a png image of the surface in the given filename. Useful for making screenshots.


I asked about the tiles because the only way to change these like you want is with the tile_layer_find() and I think that's a bad idea to go about it but you could make nested for loops and check each grid cell in each layer that needs change...
Posted by SpectreNectar June 20, 2012 21:03 - 11.3 months ago
| [#04]

I'm working on a small example.....
Posted by SpectreNectar June 20, 2012 21:04 - 11.3 months ago
| [#05]

I'd really appreciate that, SpectreNectar. I'm trying to code this version as clean and efficiently as possible using the best techniques to save CPU without losing the special effects.
Posted by DSG June 20, 2012 21:07 - 11.3 months ago
| [#06]

I think this is the best way to do it:
http://www.64digits.com/users/SpectreNectar/tint_tileset.zip
Posted by SpectreNectar June 20, 2012 21:25 - 11.3 months ago
| [#07]

OH, wow very cool, spectrenectar! i'd love to use this but ill need it to reset every time it tints instead of paiting it on coat after coat, but that's precisely what I was looking for, awesome!
Posted by DSG June 20, 2012 21:33 - 11.3 months ago
| [#08]

=)
Posted by SpectreNectar June 20, 2012 21:34 - 11.3 months ago
| [#09]

Oh man, we have different coding styles haha having trouble reading what's happening im not sure how to do this, do you know how i could control it every step by a variable? or will that slow it down? looks like its creating an external resource
Posted by DSG June 20, 2012 21:35 - 11.3 months ago
| [#10]

Sure
But you're right it is creating an external resource as well as changing the draw target so you'd probably want to do it maybe once a second or something. Or you could test it on a poor machine ^^

[step event]
Code
if(tint_counter>=room_speed) {

tint_tileset(NAME OF YOUR BACKGROUND, make_color_rgb(global.redv,global.greenv,global.bluev));

tint_counter=0;
} else tint_counter+=1;


Remember to set the tint_counter to zero somewhere first..
Posted by SpectreNectar June 20, 2012 21:43 - 11.3 months ago
| [#11]

Come to think of it... if you reuse the same color many times then maybe a system could be devised where several backgrounds are stored in the games memory and then loaded back in when reused. Like you could have a palette of backgrounds with maybe 5 or 10 indices that are course variations of a color scale. And use those when a similar color is requested. If you stored all colors in a list struct then it wouldn't be very expensive. But maybe you wouldn't even need to create any new backgrounds. Maybe you could just rely on your "palette". Depends on the configuration.
Posted by SpectreNectar June 20, 2012 21:56 - 11.3 months ago
| [#12]

that is doing quite well, but i'm having one issue. if i blend it to red, then to green, for example, its not resetting, its layering the tints, red and green making black. how can i have it blend from the original tileset?
Posted by DSG June 20, 2012 22:01 - 11.3 months ago
| [#13]

Ooh I get what you mean. I'm cooking something up. Also there was a function I didn't think off: background_create_from_surcace()... that means I can improve what I made too.
Posted by SpectreNectar June 20, 2012 22:13 - 11.3 months ago
| [#14]

awesome, youre a life saver, man
Posted by DSG June 20, 2012 22:18 - 11.3 months ago
| [#15]

Heh I'm glad you think so. I'm having fun making this. Haven't made anything in GM in a while ^^

http://www.64digits.com/users/SpectreNectar/tint_tileset2.zip
Posted by SpectreNectar June 20, 2012 22:47 - 11.3 months ago
| [#16]

Thats fantastic, exactly what i need, thanks man ^^
Posted by DSG June 20, 2012 23:06 - 11.3 months ago
| [#17]

SpectreNectar, It's perfect. problem solved! Can't wait to show you how i've implemented it I'll try to have a video soon!
Posted by DSG June 20, 2012 23:41 - 11.3 months ago
| [#18]

Hurray - SpectreNectar saves the day!
Posted by Zac1790 June 21, 2012 11:49 - 11.2 months ago
| [#19]

Great to hear. I fell asleep. Seeing it work would be interesting ^^

C'mon Zac :3 I don't know what to say to stuff like that.
Posted by SpectreNectar June 21, 2012 14:24 - 11.2 months ago
| [#20]

27 Results
1 2 Next

Recent Activity
 
Active Users (0)