Okay, so as you may know, I created a super awesome lighting engine.
As you may not know, I have no idea how to handle tiles with code.My current way to put a background and foreground into the room is create them both with tiles separately and save them as a huge image and put it in the game. As you can imagine, this is retarded.The reason for this is, the view isn't actually a view. Instead of the view looking at different parts of an image, the image just draws itself at different parts depending on where the view is. Poly taught me that crazy technique, but I don't think he uses tiles.I don't know if I can use tiles with this system, though, which sucks.I want to just place tiles by hand in the room editor. But in order to do this I'll have to alter my drawing script to: 1. Hide all tiles (because otherwise they'll draw weirdly on top of the surface.) 2. Draw all tiles at depth 1 onto a surface, with an offset of -view_xview, -view_yview. *My current script goes here 3. Draw all tiles at depth -1 onto the surface with the same offset.Basically, I'm asking if anyone knows how to draw all tiles at a certain depth onto a surface like a background.Plox, guys, I really need help here.
I can't be assed to work my non-magic at this hour of the night, but perhaps this nonsense might assist:
tile_layer_hide ( depth layer )tile_layer_shift ( depth layer, some weird x y view values )…I dunno. Someone smarter get on the case, I never ever use tiles.If you're drawing onto a surface I don't think there's any advantage to using tiles instead of sprites or a background. You can draw to the surface in the create (or room start or game start) event, and then you never have to touch it again. So speed shouldn't be an issue, since you're not updating it every step.
Hope that makes sense.I'm currently using backgrounds.
But wouldn't having 2 1280x1024 images for each room I make drastically increase the size of the game?Are you suggesting that I have an object for each tile?That would work, although it'd be tedious.You can also create an object that pretty much resembles a group of objects and makes the individual objects when created before destroying itself. Less work. Additionally you can afterwards deactivate instances out of view to increase performance.
I'm not sure how I'd go about creating one object that creates the others.
I tend to have a lot of different tiles, which is what makes it tedious. I'd have to make a lot of unique objects.And surely I could draw them all to 1280x1024 surfaces at room start and then destroy them all. I wouldn't have to worry too much about performance at all, barring a blip at the start of each room.So this is how I'd check to see where tiles are? I've never used for loops so I can't honestly say I understand. How would I draw them to the surface? I can't actually find a function to draw tiles in the GM7 guide. Unless it's tile_add, but I'm unsure how to translate found tiles into newly drawn ones on a surface.
Why can't you use the GM view system?
Based on what I've assumed it would seem that you could just rework the lighting to be drawn relative to the view location instead of drawing it straight on and having everything else move relative to the view location. I mean, I know there's a background element to the lighting but why does that have to be attached to the tile background?