Gamestudio Links
Zorro Links
Newest Posts
nba2king Latest Roster Update Breakdown
by joenxxx. 10/14/25 06:06
Help!
by VoroneTZ. 10/14/25 05:04
Zorro 2.70
by jcl. 10/13/25 09:01
ZorroGPT
by TipmyPip. 10/12/25 13:58
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 10/11/25 18:45
Reality Check results on my strategy
by dBc. 10/11/25 06:15
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (AndrewAMD, Quad), 9,160 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
joenxxx, Jota, krishna, DrissB, James168
19170 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
2D questions #403492
06/21/12 10:40
06/21/12 10:40
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
English Version as second!

Bitte auf englisch antworten laugh


Also, ich arbeite seit längerem an meinem 2D RPG Toolset. Das mapping klappt super, ist auf Panels basiert und nutzt einzelne Spritebitmaps als Grundlage. jedes Panel hat ein window indem das sprite angezeigt wird (für Animationen).

Nun habe ich ein paar fragen:

1.)
Wie erstellt man ein Fülltool, um einen  gerahmten bereich (x/y) zu füllen?

2.)
wie kann man ein normalmapping und schattensystem wie in der Ethanon Engine erwirken?
siehe:
http://www.asantee.net/ethanon/

3.)
Gibt es einen Weg Partikel über Panels anzuzeigen? Aktuell liegen sie immer darunter ^^"



=======================


i'm working on my 2D RPG Toolkit for a while now and finished the mapping system. Ir is based on Panels. Each Panel includes a window with a bitmap (a window for animations).

now i've some questions:

1.)
I've no idea how to create a filling tool to fill a framed area (x/y) of the map with selected tiles. Any idea how to do that?

2.)
Is there any way to create a normalmapping and shadowmap system like the Ethanon Engine is doing it?
See:
http://www.asantee.net/ethanon/

3.)
How to push Particles above Panels? At the moment, they are shown below them smirk



hoping for help laugh
thx for reading


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: 2D questions [Re: Espér] #403493
06/21/12 10:58
06/21/12 10:58
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
1.) Explain it with some images, your notes are very vague in my oppinion
2.) Not with panels. Panels don't supprt shaders.
3.) Particles are part of the 3D scenery and can not interact with 2D panels. Panels are alwyays drawn above the rendered image.

If you want to achieve 2.) and 3.), you have to write a panel system that is settled in world space via e.g. sprites or quad's (meshes with two polygons, forming a rectangle).

Last edited by HeelX; 06/21/12 10:58.
Re: 2D questions [Re: HeelX] #403496
06/21/12 11:43
06/21/12 11:43
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Using Panels and Windows for every tile will get *way* to slow by time, I guess.

It also prevents using cool effects and stuff.

As you want those, I suggest that you write a system based on draw_quad and then use bmap_process for the shader effects.

About particles, I am not sure, but I think the function effect_layer might help you.

(oh and for filling: floodfill)

Re: 2D questions [Re: HeelX] #403497
06/21/12 11:46
06/21/12 11:46
Joined: Apr 2005
Posts: 4,506
Germany
F
fogman Offline
Expert
fogman  Offline
Expert
F

Joined: Apr 2005
Posts: 4,506
Germany
Quad drawing:
http://www.conitec.net/beta/draw_quad.htm
Quote:
The bmap_rendertarget function can be used to draw the quad into a bitmap.



Particles over panels are possible since A8:
Quote:
The effect_layer function creates the effect outside the level, just like layered entities. This way effects can be placed on panels or follow the mouse pointer. Particles created with effect_layer are rendered on the media_layer, and use the view settings from the camera view.

http://www.conitec.net/beta/aent-effect.htm


I´m no shader programmer - maybe there is a way to realize normal or bump mapping through post processing?
Then you could use bmap_process?


Edit: Ninja´d by Rei...

Last edited by fogman; 06/21/12 11:48.

no science involved
Re: 2D questions [Re: HeelX] #403498
06/21/12 11:46
06/21/12 11:46
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
1.)

I don't know how to say the script to fill f.e. all yellow pixels of a bitmap with red, until they reach a pixel with other color or red.


2. & 3.)
hmm sounds bad smirk
need to think about that..


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: 2D questions [Re: Espér] #403499
06/21/12 11:50
06/21/12 11:50
Joined: Apr 2005
Posts: 4,506
Germany
F
fogman Offline
Expert
fogman  Offline
Expert
F

Joined: Apr 2005
Posts: 4,506
Germany
Highly unstable and in no way bulletproof! (It works only with the right sized bmap. But it should give you a start)

Quote:

// Compares two VECTORS
// v1 = Vector 1
// v2 = Vector 2
// returns: 1 if vectors match, otherwise 0
var VecCompare(VECTOR* v1, VECTOR* v2)
{
if(v1.x == v2.x && v1.z == v2.z && v1.z == v2.z)
return(1);
else
return(0);
}


VECTOR gvBmapSelectionColor;
void BmapMagicWandExFill(BMAP* bmp, vPosX, vPosY, VECTOR* vFillColor, VECTOR* vSelectionColor)
{
if(vPosX < 0)return;
if(vPosX > bmap_width(bmp)-1)return;
if(vPosY < 0)return;
if(vPosY > bmap_height(bmp)-1)return;
var vAlpha;
VECTOR vColor;

var format = bmap_lock(bmp, 0);
var pixel = pixel_for_bmap(bmp, vPosX, vPosY);
pixel_to_vec(vColor, vAlpha, format, pixel);

if(VecCompare(vColor, vSelectionColor))
{
pixel = pixel_for_vec(vFillColor, 100, format);
pixel_to_bmap(bmp, vPosX, vPosY, pixel);

BmapMagicWandExFill(bmp, vPosX-1, vPosY, vFillColor, vSelectionColor);
BmapMagicWandExFill(bmp, vPosX+1, vPosY, vFillColor, vSelectionColor);
BmapMagicWandExFill(bmp, vPosX, vPosY-1, vFillColor, vSelectionColor);
BmapMagicWandExFill(bmp, vPosX, vPosY+1, vFillColor, vSelectionColor);
}
bmap_unlock(bmp);
}

// Magic Wand Fill tool - does a magic wand selection and fills it with vFillColor
// bmp = pointer to bitmap
// vPosX = x position of the selection point
// vPosY = y position of the selection point
// vFillColor = BGR fill color
void BmapMagicWandFill(BMAP* bmp, vPosX, vPosY, VECTOR* vFillColor)
{
var vAlpha;
var format = bmap_lock(bmp, 0);
var pixel = pixel_for_bmap(bmp, vPosX, vPosY);
pixel_to_vec(gvBmapSelectionColor, vAlpha, format, pixel);
bmap_unlock(bmp);
BmapMagicWandExFill(bmp, vPosX, vPosY, vFillColor, gvBmapSelectionColor);
}


Last edited by fogman; 06/21/12 11:53.

no science involved
Re: 2D questions [Re: fogman] #403501
06/21/12 12:16
06/21/12 12:16
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
I'm very sorry, I wasn't aware of effect_layer. In my defense I have to say that it isn't listed in the index.

Re: 2D questions [Re: HeelX] #403503
06/21/12 12:38
06/21/12 12:38
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
thx fogman - i'll take a look into it after work laugh
Same with effect_layer

this thing with normal+shadowmapping for panels is bad smirk
Seems like i need to forget that idea frown


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: 2D questions [Re: Espér] #403504
06/21/12 13:24
06/21/12 13:24
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Originally Posted By: Espér
this thing with normal+shadowmapping for panels is bad smirk Seems like i need to forget that idea frown
Why? You could reprogram everything so that you could use sprites instead. With that, you can do also fancy postprocessing. Another reason for not using panels is that their coordinates, even though they are typed as var's, are snapped for drawing to integer coordinates. So, doing things like ->pos_x += 5 * time_step results in jittered motion.

For RUDI, I have done falling snowflakes in the main menu with panels - the only solution to this was clamping fps_max and doing something like pos_y -= 1 each frame --- without the use of time_step. So, I rely upon the fact, that a regular computer renders the main menu with, say, 60 fps.

For the credits, I have falling snow flakes, too, but this time I did everything in world space with sprites and so on. Here, I safely do ->z -= 5 * time_step or so. Another advantage is that rotated panels are not properly filteres as their sprite-counterparts in world space.

Another advantage is that you have problems with the monitor resolution - if you do everything with sprites you can simply switch the resolution and the sprites don't change their relative size on the screen as if it happens when you use panels.

Don't use panels for 2D games!

Last edited by HeelX; 06/21/12 13:25.
Re: 2D questions [Re: HeelX] #403508
06/21/12 13:54
06/21/12 13:54
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
okay
thanks for the constructive words

*rises his fist* REPROGRAMMING started laugh


new Question:
4.)
How to recreate the animations of my panel system with sprites?
I use Rpg-Maker XP System Characters and Autoriles.. Means multiple directions and frames in 1 bitmap...
with window, i only showed up one tile or charaframw i needed - how to do that with sprites?

Last edited by Espér; 06/21/12 13:57.

Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Page 1 of 3 1 2 3

Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1