Piquing interest...Map rotation/scrolling
Displaying 1-11 of 11 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Omni

Heya. This is feature list for the library I'm working on. Now, the library offers additional features on top of Verge's entity system.

If you like anything you see, let me know. If you think it's useless and/or it's already been implemented in Verge and I didn't know about it, then also please let me know, since I don't want to code something that's completely useless :)

I'll probably release this sometime, but if anybody's interested that time might be a bit sooner :)

------------
Entity rotation (rotation can be layer-dependent or independent)
Entity scaling (scale width and height)
Entity variable lucency
Entity rendering to specific layer
Library tries to determine entity width and height automatically. You can manually set it or let it recalculate after it has tried.
Entity on render commands (think HookEntity)
Access to buffer for Entity's current frame
(Access to buffer for all Entity data?--not sure if this is useful, it would take up more memory, since Verge already has all that stored somewhere, and it's unusual to store a pure copy of it).
Entity blendtypes (additive, subtractive)
Entity meshing (think Sega Genesis/Saturn games, aka "checkerboard" blitting)

Layer rotation
Layer scaling (rendering width and height is scaled to destination's width and height)
Layer lucency
Layer blendtypes
Layer meshing
Layer on render commands (think, HookLayer)
Layer offsets (for scrolling a layer in code)
Layer wrapping/tiling (wrap sections of a layer)

Draw a Layer to a certain destination
Draw a Layer's entities to a certain destination
Draw all data to a certain destination

Blit an image to a map location

Layer 0
If you put 'R' in your renderstring, Layer 0's on render command is called.
If you put 'E' in your renderstring, Layer 0's entities are called.

Enhanced map and entity drawing is HookRetraceable

----------------



All entities are layer 0 initially, since I didn't want to make any new entity creation features. If you leave Entities the way they are, then you can easily use them with just an "E" in the renderstring.

There is no real change to your entity code you have to make, simply new stuff you can do.


myent = EntitySpawn(stuff);
entity.angle[myent] = 128;
entity.lucency[myent] = 50;
entity.onrender[myent] = "PaperDollArmor";

layer.lucency[1] = 50; //Set Layer 1 to half lucency.
layer.angle[2] = 100; //Set Layer 2 to 100 degree rotation.


The only real adaption must be that you call DrawMap, which uses spaghetti code and Render() to draw the enhanced entities and layers. Or, optionally, use a bunch of DrawLayers() to create your own map render routine.

Does this sound remotely interesting?

Posted on 2004-07-13 02:20:04

gannon

Sounds very interesting.
question for Draw a Layer to a certain destination
do you plan on just doing the whole thing or what section I say(this would be better)?
also will you make it tile based or pixel based?
also will it be screen based or map based? (the x,y)

I can already think of a ton of effects you could do with this so I am looking forward to it.

Posted on 2004-07-13 02:39:58

Omni

It would be something like this:

DrawLayer(int layer, int dest)

You would have to manually position the camera yourself using xwin and ywin.

I assume you would like

DrawLayer(int layer, int xwin, int ywin, int renderwidth, int renderheight, int dest)

Since that lets you specify the exact rectangle of map space to render, but if you can achieve the same effect by using xwin, ywin, and layer[1].renderwidth or renderheight.



The renderwidth and height are in pixels.

If you mean the map blitting, there will be a

MapBlit(mapx, mapy, int image, int renderwidth, int renderheight, int dest)

Which will blit something to the map at the pixel positions mapx, mapy. If you decide to stretch and scale map layers, then this will be off. Though it will try to adjust for a stretched layer using the renderwidth and renderheight, it would be better if MapBlitting was done to a non-stretched display.

There is also a MapX2ScreenX and MapY2ScreenY conversion functions. Pixel based, tt's fairly simple, but it's there to simplify my map drawing.

However, as I can't seem to find any way to manipulate the renderstring in the V3 docs, unless I overlooked a SetRenderString(), I may have to wait for Vecna to release a new engine before I finish it. I have no real problem with that, though. I may have just overlooked the function.

Posted on 2004-07-13 02:48:41

gannon

example (not real)
I was thinking more along the lines of I would like to take from layer 2 a 3x3 tile square around my entity to a holding image. Then take the silhouette of that image and transparently put in on the screen just after that layer is rendered.

Posted on 2004-07-13 03:08:34

Omni

...Why would you do that?

Although, it doesn't sound...too difficult, maybe. You'd have to change xwin and ywin, then set renderwidth and height to 16*3, then DrawLayer() to a buffer.

After you get the image chunk, you'd have to set layer[2].onrender to "MyFunction" or something that would MapBlit that chunk.

That's a really unusual example.

Posted on 2004-07-13 03:15:31

gannon

I know but I recently had to do something like that because I wanted a overlay over the screen but not have the entities effected by the overlay. And have the thing over the entities effected by the overlay.

Posted on 2004-07-13 03:34:04 (last edited on 2004-07-13 03:36:58)

Omni

Hm, okay. Does that help?

As a side note, layer.onrender[layer] is called before rendering the entities for that layer, so all at-render layer commands are drawn beneath the entities. To draw above the entities...um, use the at-render on a layer above the entities :)

Posted on 2004-07-13 03:44:07

gannon

Just thinking of all the things I could do with it. Never tried V2 so I don't know anything about the renderstring.
with your lib putting a overlay without effecting the entities would be trival :)
good luck with it. I will be looking forward to it.

Posted on 2004-07-13 04:07:24

rpgking

This sounds great. Hope you're able to pull it off, because I can already think of a few uses.

Posted on 2004-07-13 07:02:21

blues_zodiakos

One use I can immediately think of for this is doing a background like the one in Final Fantasy 6 floating continent. The background is continuously being wrapped and scrolled, beneath all the map stuff. In verge3 as it currently is, this would be difficult without hijacking the map rendering or screwing with your retrace layer (you probably want stuff to happen OVER the map, as well, like clouds).

Also, I'd just like to say that I really like the stuff that you are doing. Sometime down the road (or faster), people making games will be extremely pleased with the amount of code they won't have to write because someone has taken the time to make these libraries.

Posted on 2004-07-15 04:25:53 (last edited on 2004-07-15 04:32:41)

Omni

Hey, thanks for the compliment :)

Right now, I'm using a custom map renderer made with BlitTile. Once the new Verge3 build has renderstring-editing, though, I'll set the library to use that.

Posted on 2004-07-15 04:57:08


Displaying 1-11 of 11 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.