Summoning Wars Forum

Development => Programming => Topic started by: turan on March 09, 2012, 02:22:14 AM

Title: minimap and stuff...
Post by: turan on March 09, 2012, 02:22:14 AM
Hi there,

i just wanted to ask something about the minimap and some other stuff regarding side effects.

Do you already have ideas/concepts/someone working on a new version of it?

At the moment I'm trying to learn the Ogre/CEGUI stuff and get the big picture of OGRE projects in general and this one in particular. I've managed to setup and successfully compile the latest sumwars sources with eclipse CDT and CMake under ubuntu ( I could provide a simple howto if you wish ... its actually very easy to do this ;) )

However, first of all I wanted to ask if it wouldn't make more sense to create the mini map window from a XML source file, instead of hard coding it into the core? Because to my understanding it isn't more than a scaled down "TaharezLook/Frame" Window with some frame features disabled and little alpha tweaking at the moment? Isn't it more flexible to have this done via XML? Please correct me if I'm wrong. As i stated before I've justed started to look into the OGRE/CEGUI stuff, so please forgive me if I don't see some of the possibilities/features/advantages of coding it into the core.

The other thing I'd like to ask about the mini map is more kind of a mockup approach.
Is it possible to obtain  the exact position of the world objects providing the borders ( fences, stone and cave walls ) to draw (white?) lines on a scaled down, transparent frame representing them?(without too much overhead and/or breaking the projects layout<->Scene Manager?)? (see attached screen shot)

If this approach is a practicable one, isn't it then possible to obtain the walking direction data from a pair of two (time different) positions of the character relative to the scene, compared to each other? to draw a heading indicator for the mini map?

It would be really nice if someone could point me into the right direction how to obtain the above mentioned positioning data in a project compatible way. If not to be used by you directly, then at least for my learning curve ;)
 
These are  the questions about the mini map that I have at the moment.
I have another question regarding (unlikely) possible side effects from the use of
Code: [Select]
chdir(passed_path.c_str()); without passing the return value to a variable(during the determination of the working directory path in main_gui.cpp at lines 58 and 73). To just silencing the compiler I've replaced  the mentioned lines with
Code: [Select]
int result = chdir(passed_path.c_str());That leaves this 'result' var unused too, but I've asked me, if the whole path determining process couldn't be redeigned to use this return val. I wouldn't like to take the "compile with -Wno-unused-function" approach to avoid GCC warnings under linux.

Would be nice if you guys could think of a fix, because I want to write  a little installer like shell script for personal use, to auto apt-get dependencies/compile and install sumwars witch will have zenity(http://wiki.ubuntuusers.de/Zenity) dialogs in it... And cmake output, without warnings is far easier to parse( for the use in a zenity progressbar)  ;)


That's it. I hope you guys answer me  :)

Greetz
 Turan

Title: Re: minimap and stuff...
Post by: turan on March 10, 2012, 06:36:38 AM
EDIT:
playing arround with the minimap.cpp file, i've delayed the pursuit of (re)drawing the outer lines of the world objects for the moment, as i realized that the current map is actually a scaled down frame where you continuously positioning a label according to the players position in the world.
I must admit that i laughed a little bit at that approach :D But respect! i guess it's work with what you have at hand isn't it ?  ;)

But anyway, i stumbled across the label->setRotation() routine, witch takes a 3DIM vector as argument. As the Z-Axis argument of that Vector, could always be 0 (because of the 2D nature of the minimap scene), i thought if there isn't a way to obtain the player's world orientation and use that vector together with the Z-Axis Argument  = 0 to construct the 3DIM vector, witch the setRotation function expects as argument to proper yaw the label on the minimap? together with an arrow like image for the label (label->setProperty("Image", "set:TaharezLook image:MouseNoSoCursor") for example, do you think that could work as a heading indicator?

In general i didn't figured out yet:
How do i reference the player node to get the Orientation? How is this done for the normal mouse click movement at all ? I mean the player always faces the the mouse click direction - how can i obtain these orientation informations?

I'm a java man so the hole pointer madness isn't that simple to me. a little help is appreciated  ::)

greetz
 turan

EDIT:
OK, given that the Z-Axis is towards you before the monitor  - it's the x and y arguments of the 3 DIM Pointer who can be 0. Where's the right place to implement a function to return the orientation angle? in player(base).cpp ?
Title: Re: minimap and stuff...
Post by: Lastmerlin on March 11, 2012, 02:08:29 PM
EDIT:
playing arround with the minimap.cpp file, i've delayed the pursuit of (re)drawing the outer lines of the world objects for the moment, as i realized that the current map is actually a scaled down frame where you continuously positioning a label according to the players position in the world.
I must admit that i laughed a little bit at that approach :D But respect! i guess it's work with what you have at hand isn't it ?  ;)
Yes, the minimap _is_ a horrible hack x( . I never had the time and Ogre programming skills to do something better...

But anyway, i stumbled across the label->setRotation() routine, witch takes a 3DIM vector as argument. As the Z-Axis argument of that Vector, could always be 0 (because of the 2D nature of the minimap scene), i thought if there isn't a way to obtain the player's world orientation and use that vector together with the Z-Axis Argument  = 0 to construct the 3DIM vector, witch the setRotation function expects as argument to proper yaw the label on the minimap? together with an arrow like image for the label (label->setProperty("Image", "set:TaharezLook image:MouseNoSoCursor") for example, do you think that could work as a heading indicator?
In 2D, we have only one angle (the rotation along Y, which is the height direction). It can be obtained by:
Code: [Select]
m_document->getLocalPlayer()->getShape()->m_angle;
Depending on position in code, the result of the first fucntion should be tested to be not NULL. Most probably, an already checked Player* pointer is already available.
Title: Re: minimap and stuff...
Post by: turan on March 11, 2012, 11:24:43 PM
hi LastMerlin,

very much thank you for the "m_angle"hint :)
After messing around with CEGUI::MouseCursor Vectors and arc2 mathematics,  that finally pointed me in the right direction i think ...  ;D
and yes, there's an existing pointer. I've used that one  ;)

I nearly archived what i wanted to do. Though if you say, that you aren't pleased with the mini map as it is at the moment, I don't know if you want to use it. But have a look at yourself:

what i did, was adding the following to minimapwindow.cpp:
I added
Code: [Select]
label->setRotation(CEGUI::Vector3(0,0,(player->getShape()->m_angle*180/PI)));between
Code: [Select]
label->setPosition(CEGUI::UVector2(cegui_reldim(relx), cegui_reldim(rely)));and
Code: [Select]
label->setVisible(true);
I also changed the label image by replacing
Code: [Select]
label->setProperty("Image", "set:TaharezLook image:CloseButtonNormal"); with
Code: [Select]
label->setProperty("Image", "set:TaharezLook image:MouseEsWeCursor");and adjusted its size(scale) by replacing
Code: [Select]
label->setSize(CEGUI::UVector2(cegui_reldim(0.03f), cegui_reldim( 0.03f)));with
Code: [Select]
label->setSize(CEGUI::UVector2(cegui_reldim(0.04f), cegui_reldim( 0.04f))); though its a little bit off center now.

I don't like that cursor image much, but i don't know how to set a custom image to a ThaarezLook Component yet :'(

greetz
 turan
Title: Re: minimap and stuff...
Post by: turan on March 12, 2012, 12:25:22 PM
EDIT:
ok...
adjusting /extending the ogre render to get just an outlined copy of the world objects, is something i'm not capable at the moment ( still learning ;) ). So i came up with this ( still the frame window hack, BUT extended :P ).

please tell, me if you like it.
greetz
 turan
 
Title: Re: minimap and stuff...
Post by: turan on March 12, 2012, 09:23:52 PM
EDIT:

playing around with the minimap values again, i came to this (screen shot).

However, not being satisfied with the square look at the moment ( i want to have the minimap in a circled shape ) i stumbeld across this
http://www.cegui.org.uk/phpBB2/viewtopic.php?f=9&t=6006 (http://www.cegui.org.uk/phpBB2/viewtopic.php?f=9&t=6006)
during my search for usefull documentation on how to -tweak/adjust the L&F.xml / create layouts- task  :)

I think it looks pretty nice. Though it wouldn't solve my heading indicator image problem, nor draw me a circled mini map   ;)

What do you think about that?

It comes with the MIT license. is this project compatible?

greetz
 turan
Title: Re: minimap and stuff...
Post by: turan on March 13, 2012, 11:00:40 AM
EDIT:

ähhhm  :o ... i just downloaded  the Glossy Serpent theme pack -- and in its license terms it says:
"Copyright (c) 2012 Augustin Preda" -- is that "DezGusty" ??? ? is this theme coming into summoning wars?
That would be awesome!!! :D

I'll replace the Taharez LAF in my local sumwars copy and see how its look like  :)

turan

Title: Re: minimap and stuff...
Post by: Lastmerlin on March 13, 2012, 02:00:46 PM
Nice work on the minimap :)
The cursor is still suboptimal indeed, but its already a great improvement. Nevertheless, a minimap with proper object drawing strategy and also shroud (imo very important) still remains to do. Circle-shaped minimap is nice to have, but really not essential.
Another think I am wondering about is: How will  this work with larger regions ? My current code just takes a snapshot of the region and stores is in a texture. Of course, resolution is horrible if the region is large. By scaling the image down this might get even worse...

Yes, Augustin Preda is DezGusty - but I dont know about plans to replace the theme. In fact, the current GUI made by hiponboy works very well imo. Although, as far as I know, its not a complete L&F yet (messing with L&F is _really_ messy).
Title: Re: minimap and stuff...
Post by: dezGusty on March 13, 2012, 04:46:55 PM
Offtopic : yes, the skin is made by me, but it's not designed to replace the skin done by hiponboy for Summoning Wars :) . (It's mainly designed for a rework of my older snake-like game. Some snakes should appear as small embellishments to various widgets as new versions appear). But I have nothing anything adapting items from it to Summoning Wars (or using it altogether). It's MIT licensed, so basically anyone can do whatever they want with it.
Title: Re: minimap and stuff...
Post by: turan on March 14, 2012, 01:39:55 AM
ah, my guess was  right  :P

I must say very nice work dezGusty , even if the theme pack might not make it into sumwars i like it very much, especially
the beautifully designed corners for the buttons and the progress bar! :) -- for that fantasy/medival type of game sumwars is, I think they would fit great for the label witch presents the enemy life bar in combat. But thats only my Opinion. I do find the actual theme,though functional, a little boring. But thats only my opinion ::)

Regarding the minimap and a shroud strategy:
I played a little bit with the camera->setFOVy() parameter in Scene.cpp and with setProjectionType(Ogre::PT_ORTHOGRAPHIC) disabled respectively set to default (perspective), it gives you much of a zoom effect, not showing the whole map at once. However this leads to the problem that the minimap has to be updated in the case the player leaves the projected FoV, while still in the same region. I think an altered update function has to be written, witch can handle that. Though I have no clue how this could be triggered. May bee with flags resulting from a compare operation of a second texture render with the mentioned FoV settings applied,in relation to the full mini map render as it is now?

IF this could be implemented( not necessarily by me  :D ), then a circle shaped minimap would be of great value, because the player indicator could then be centered and the whole minimap view  turned around accordingly to the player orientation -- connected mouse wheel events for zooming out/in while the minimap is active could then also be possible (of course to a limited ratio to never unveil the full map - keeping the "exploring" factor alive, while giving the needed orientation help). The minimap update function has then to be altered too to correctly reflect the player position(and indicator label size), depending on the actual zooming ratio.

This has also the benefit of resembling very closely what i had in mind, when I came up with the "diablo style" minimap approach, at least I think so  :D 

reagarding the indicator label image( aka cursor):

should i get him centered (TaharezLook MouseEsWeCursor) by creating a scheme file , eliminating the offset? ( if this is the right way to modify existing theme components; don't know yet).. or can/could someone of the graphic designers "inject" a suitable image into the TaharezLook.tga?

discussion, discussion ...  ;D

greetz
 turan

 



Title: Re: minimap and stuff...
Post by: turan on March 15, 2012, 06:37:51 AM
hi LastMerlin, hi dezGusty,

I'm now up with trying to modify the scene.h/scene.cpp:
by splitting the minimap rendering part from the createScene() function and putting it into
a separate handleMinimapScene(bool init) function, witch can be called for the initial render process during game startup  as well as during scene/region changes.
I also planed to overload this function with the param(s) from the local player camera to adjust the minimap cameras position, distance (setFovY aka zoom) and LookAt params accordingly to the players camera before the minmap texture gets rendered. I'm trying to achieve a synchronization between the players view of the region map and the minimap rendering.

I got only 2 problems with this attempt:
 1.) from where should i call the (to be created handleMinimapScene function -- other name(s) would be also ok, if it/they fit better into the projects naming policy) ? -- from within the minimapUpdate loop (minimapwindow.cpp) ? not sure about that yet  :-\...

AND much more important  :'(:
2.) one of my RAM Banks/and or modules died and my PC freezes periodically - so im left with just 1 GB of RAM and therefore an unstable and slow  dev platform. I decided to order a new PC, because this one is now 7 years old and has done it's duty. I'm going to strip/backup what is left of my box, after finishing this post. My new PC should be delivered at Friday/Saturday. So I won't be able to code till then.

In the meantime, I would like to ask you, if my idea is practical at all and/or if there are better ways/project compatible attempts to synchronize the players world view and the minimap rendering to achieve the minimap behavior i described in my last post.


greetz
 turan
Title: Re: minimap and stuff...
Post by: Lastmerlin on March 15, 2012, 10:23:58 AM
A few thoughts on minimap, what problems to expect etc:

The central issue with minimap or everything that is _not_ rendering directly to the output window is, that the technique I use (render to texture / RTT) takes _a_lot_ of time. For some reason, rendering to a 512x512 texture takes more than ten times the computation time than rendering to a 1024x768 window. I never got a clear explanation why that happens, but it has some really annoying implications: We must _not_ render the minimap each frame. Or more specifically: Rendering the minimap during normal gameplay is problematic in general, because even a computation time of 100ms causes a noticable lag.

Second problem:  Several objects (like fences) are important for gameplay, but really hard to see on the minimap. On the other hand, other objects, especially monsters, should _not_ be visible on the minimap. Honestly, the game will be way to easy, if mages or archers can see large cluster of enemies too early (not to mention the possibility to shoot area of effect spells or guided arrows in there).

The general idea I had a longer time ago for all this was using an own scene for the minimap. This allows a lot of really nice things:
- use vastly simplified meshes (also getting rid of the rendering cost problem)
- add arbitrary markers
- filter objects (like monsters)
- display shroud easily

If the update time can be reduced to lets say 1ms, we can easily update the content each 100ms (for instance) without noticably costs.

Drawback: Its a lot of work and it requires Ogre knowledge. Well thats the reason, I have not done it so far....


Title: Re: minimap and stuff...
Post by: turan on March 19, 2012, 12:50:10 PM
Hi LastMerlin,

I'm back with a shiny new Quad-Core Processor ;D
Haven't been able to pull out a build yet, because I'm always running into
Code: [Select]
OGRE EXCEPTION(6:FileNotFoundException):
Cannot locate resource TaharezLook.scheme in resource group GUI or any other group. in
ResourceGroupManager::openResource at /build/buildd/ogre-1.7.3-ogredev/OgreMain/src/OgreResourceGroupManager.cpp (line 753)
on my new 64-Bit Ubuntu :( (used 32 Bit  on my older PC).

Anyway regarding the "2nd scene" approach: Have you thought about a RenderTargetListener to strip/manipulate Objects from the scene, before the minimap gets rendered? I'm curious to try out this approach, because even though I was able to sync the minimap with the players cam, i get a "little" version of the player rendered into the minimap window ;D...wich is, together with the performance problem you already mentioned, totally unacceptable.

Please let me know what do you think about that attempt as a Interim solution...at least till the game has reached a 1.xx state  ;)

greetz
 turan


EDIT: I'm ashamed  :-[ ... if you copy over the .sumwars dir from another user, you shouldn't forget to adjust the paths in the resources.cfg file... game runs now
Title: Re: minimap and stuff...
Post by: Lastmerlin on March 19, 2012, 11:59:06 PM
In general: Everything, that works better than what we have now is a good idea. Of course it should take a lot less effort if its a temporary solution - which seems to be the case.
Just one tip: Even with filtering - never try to update each frame. It will just result in abysmal performance. Unless you find the reason why rendering to a texture takes so much more time than rendering to window. For me, it makes absolutely no sense, I never got a good explanation, but I never got a fix either.
Title: Re: minimap and stuff...
Post by: turan on March 26, 2012, 12:34:29 PM
hi,

just a little progress update:

http://dl.dropbox.com/u/69238784/minimapMod.ogv

* i hope you can play .ogv files, because i use recordMyDesktop for screen casts and manually converting the '.ogv files into any other format ( f.g avi ) produces only garbage.

As I still stick to the Attempt of manipulating/hiding Objects before and after the texture Render ( pre and post update target listener ), I'm currently in the process to sort out the static graphic objects witch serve as level borders ( subtype: wall, fence etc.) to blend anything else out of the scene and maybee enlarge them or make them more visible.

I've extended the scene class with a 2nd graphic objects map and adjusted the insertObjects function accordingly. I therefore  renamed m_graphic_objects to m_graphic_objects_mov and created m_graphic_objects_stat accordingly. Moreover i renamed
getGraphicObject to getMovableGraphicObject and created getStaticGraphicObject(std::string typeName) to retrieve the named border objects. This attempt works quite smooth and well, as long as you don't use any recursive search attempts etc. during pre/post render operations  :D


CEGUI label has still attached that ugly mouse pointer. As stated before, this might be a job for one of the graphic artists, if my work might fit into the project... hopefully  ;)


i keep posting. please tell me what you think.

thanks in advance

greetz
 turan
Title: Re: minimap and stuff...
Post by: dezGusty on March 26, 2012, 01:37:45 PM
Hey, it looks quite good.

Don't worry about the CEGUI label for now. I'm sure we can make it look much nicer in the end :)
Title: Re: minimap and stuff...
Post by: turan on March 27, 2012, 04:05:19 PM
Thanks :) But ...   :'(

...it turned out that even a single Pre- or Post Renderoperation on one of the GameObject* std::maps slows down the whole thing, if many enemies are around. -- By way of trial, I did replace the whole std::map Obj. storages with vectors, but its nearly not as fast as it should be. though faster than the actual implementation using map.find processing.

If there should be a synchronized minimap ( moving along with the player on a lower scale ), then i think an extra scene becomes necessary. LastMerlin mentioned this a while ago.

The Pre- and Post Render Processing capability could be useful though to dynamically adjust the ambient light for caves and so on ( for the mainScene as well as for the minimap(Scene?)). f.g by assessing the regionID: if (regionID != {Cave Region ID} setAmbientLight(blabla) else (blabla))...

I would have liked to play around with the now separated static Level Border Game objects ( fences, walls etc. ) to draw a better looking Abstraction of the current Region for the minimap. But as said, without an extra scene, this kills overall game performance.

But enough of the bad news :) ...


Are there plans to rework the player Camera behavior (like fixed rear view to the player character only etc.)? need to know this to further adjust the CEGUI::Label->setRotation() in minimapwindow.cpp, IF the minimap should follow the camera rotation.


greetz
 turan   

Title: Re: minimap and stuff...
Post by: dezGusty on March 27, 2012, 05:53:10 PM
Hmm... I for one don't know anything about plans for a moving camera. But I'm just restarting my activity these days, as I wasn't active for a while, so I'm not in the best position to answer that question.
I think you'll get an answer when Lastmerlin comes back...
Title: Re: minimap and stuff...
Post by: turan on March 30, 2012, 06:48:56 PM
hi,

I should have read the absence notice of LastMerlin :)
Anyway, may bee you can help with that one. How do I  properly load a *.png file through the resource Manager in a Project compatible way?
I've put the file I want to load into the share Gui Resources folder, where all the other menu stuff is and added a #
[named_file] Xml scheme for that file. debugging messages during game startup Tell me I've referenced the right resource File info. Every PNG in that folder gets loaded, except the one i need :D. What do I miss here?

Code: [Select]
Ogre::FileInfoListPtr files;
Ogre::FileInfoList::iterator it;
std::string file;
Ogre::Image imgC;
files = Ogre::ResourceGroupManager::getSingleton().findResourceFileInfo("GUI","*.png");
for (it = files->begin(); it != files->end(); ++it)
{
file = it->filename;
if (file == "minimap_circle.png") {
imgC.load(file,"GUI");
std::cout << "TEST: CircleImage=" << file << std::endl;
}
std::cout << "TEST: found ImageName=" << file << std::endl;
}


I need this PNG for an ogre image, witch I intend to lay on top of the RTT of the mini map to become a circled shaped map ;)

Thanks in advance

greetz
 turan


EDIT:
solved! got it loaded -- had the wrong path. memo to me: don't open like 18+ File managers, Browser, 3 Terminals and vlc playlist  on ONE desktop  ;D

EDIT:
not so solved at all  :( -- the image gets loaded, but either if  I create a CEGUI::Imageset from the file directly, nor if I create a OGRE::Texture first and then cast it to a CEGUI::Texture and create the Imageset with this texture, the image doesn't get displayed, if I set the Image property of the minimap window to use this Imageset!

Do I need a camera/viewport attachment for this ? -- I don't want to(it doesn't work if I) create a rendertarget from this loaded texture. Remember, it should only serve as a layer on top of the rendered minimap. Its just a simple png with a circle and transparent background to be put into an extra CEGUI Static Image window on top of the minimap window --to give the whole thing a circle like shape.

Can someone of the staff members help me out with that? - I'm fairly new to ogre and the cegui
madness. I've been working with this for only 2 Weeks now or so .... and now 3 days for a simple resource loading -- this drives me crazy. I wonder what it will be like to catch mouse events on the scene and process them for use inside that CEGUI Window, witch is used for the minimap ...... ::)

So, once again, a little help is appreciated.... But if you prefer to implement a new minmap by yourself or don't want another contributer for the project:

Here's a short summary what I did so far. Maybe you found the attempt useful in some kind of way at least as an idea basis:

for the scene.cpp


for the minimap window:

I tried to:

and I planed to:
receive mouse wheel (middle mouse) events of the player movement and process them inside the minimapwindow.cpp to adjust the player indicator rotation, if the camera is rotated.

I will now increase work on my existing java projects for now. Maybe there will be a littlebit more activity after the easter weekend. I'll then come back to see if someone has answered.

greetz
 turan
 
Title: Re: minimap and stuff...
Post by: fusion44 on April 04, 2012, 06:58:54 PM
Sorry Turan, of course we want you as an contributor to Sumwars! Development is going very slowly at the moment because of real life isues of many of the team members :-(
On the up side I've got my editor problem solved and I'll resume the work on it now :)


I can't see anything obviously wrong with what you are doing. Can you push the source to a clone so I could take a look?

Btw,
this is a screenshot of the minimap of OpenMW:
http://dl.dropbox.com/u/2899105/mini.jpg

Maybe we can share some code? They do not use CEGUI, but MyGui but I thing the fog of war is not dependant on MyGui.
Title: Re: minimap and stuff...
Post by: turan on April 10, 2012, 12:48:47 PM
hi fusion,

i hope you had a good easter weekend? ...For my part, I've eaten too much  ;D

Anyway. Is there any solid conclusion within the project how the mini map should look like in the end? Circle map radar type sitting at a corner of the screen, displaying the players FOV while walking through the world or a scaled down version of the whole region witch had to be explored (with FOG, like the one in the link you provided)? or both types?

FOG(of War) seems not such a big deal as from what I read till now. But it would be only apply able for the "not radar" like version of a mini map.
BTW: Fog itself seems to be a nice tool to create more atmosphere within the game regions ( when it comes to winter, ice style shaped regions for example ?  ;))

But for the moment I'm still struggling with the radar type map:

CEGUI:Imageset creation from an Image ends with a segfault :( Im using:

Code: [Select]
Ogre::FileInfoListPtr filesInfo;
Ogre::FileInfoList::iterator it;
std::string file;
std::string cImgName;
filesInfo = Ogre::ResourceGroupManager::getSingleton().findResourceFileInfo("GUI","*.png");
for (it = filesInfo->begin(); it != filesInfo->end(); ++it)
{
file = it->filename;
if (file == "minimap_circle.png")
{
cImgName = file;
std::cout << "PATH=" << cImgName << std::endl;

}
}
CEGUI::Imageset tmpTextureImageSetC = CEGUI::ImagesetManager::getSingleton().createFromImageFile(
"minimapC_set_tmp",cImgName,(CEGUI::utf8*)"GUI");
CEGUI::Texture* ceguiCircleTex = tmpTextureImageSetC.getTexture();
CEGUI::Imageset& textureImageSetC = CEGUI::ImagesetManager::getSingleton().create(
"minimapC_set",*ceguiCircleTex);
textureImageSetC.defineImage(
"minimapC_img", CEGUI::Point(0.0f, 0.0f),CEGUI::Size(
ceguiCircleTex->getSize().d_width,
ceguiCircleTex->getSize().d_height),
CEGUI::Point(0.0f, 0.0f));

within the scene creation
and:
Code: [Select]
mapviewCircle->setProperty("Image", "set:minimapC_set image:minimapC_img");
within the minimap window.

do you have a tutorial source witch shows how to make a round (circle shaped) cegui window?... That would be nice. I've found a forum thread on the CEGUI Forum, but the CEGUI staff member there ( I think it was Kulik ) just laughed at a guy who asked for help in drawing a circle shaped CEGUI Window. SO I won't ask there. I don't need such arrogant behavior.
But I'm stuck at the moment, figuring out why the game segfaults during the Image draw to a CEGUI Static image Window.

Ive attached my modified scene.cpp, scene.h and mimimapwindow.cpp ( I don't know how to push to clone yet -- never worked with mercurial before  - i have to read on how to do that ) -- maybe you could diff the files to see what I've modified.

thats it for now
greetz
 turan




Title: Re: minimap and stuff...
Post by: fusion44 on April 14, 2012, 09:43:25 PM
Hi turan,

I've looked at the code, but I need to have also the minimap_circle.png image to trace the problem properly. Can you please upload that one too?

Thank you :)
Title: Re: minimap and stuff...
Post by: turan on April 15, 2012, 10:39:21 AM
hi fusion,

sorry i forgot that :( I've used 4 pictures for testing. None of them worked for me at all.
Here they are.

greetz
 turan
Title: Re: minimap and stuff...
Post by: turan on May 14, 2012, 12:18:48 AM
hi guys,

just wanted to let you know, that I'm very busy with my java projects at the moment and as Java is a very pleasure to me in Opposition to C++ i also wanted you to know that i don't intend to further work on,  or better say "experiment" with the sumwars codebase.

This hasn't something to do with sumwars itself, i like the gametype and the project very much and be assured that if you pull out new versions of it, I'll definitly play them :)

It just turned out, that I don't like the whole graphical programming very much, at least with the given tools like
ogre ( in some aspects ) and CEGUI ( in many more aspects  :P ).

So theres only one thing to do ... let me say goodbye :'(
... I wish you the very best, creativity and good progress in developing and extending summoning wars for the future. Keep up releasing new versions of it, so i can play them  ;D

yours
 turan

EDIT: As for my part this thread can be closed.
Title: Re: minimap and stuff...
Post by: dezGusty on May 14, 2012, 07:24:55 AM
Hi turan,

I'm sorry to hear that. But the door is open for new contributions in case you change your mind.
Just a small question: do you have your code checked into a specific branch? In case someone wants to continue your experiments :)
Title: Re: minimap and stuff...
Post by: turan on January 31, 2013, 02:27:59 PM
Hey DezGusty,
obviously  I did changed my mind  ;)

Current prototype of my minimap looks quite similar to my old attempt  (http://dl.dropbox.com/u/69238784/minimapMod.ogv --- haven't recorded a new vid yet) but stays permanently on the screen as an addition to the existing ( yet to be modified ) minimap.

As I'm now trying to get fog into it to disguise unseen areas until they are discovered by the player, its very important to discuss the need of having the player camera rotateable or if we, what i would prefer, could switch to an fixed isometric view to the gamescene like most (if not all) Hack'nSlash games have.

I would appreciate a solid statement about that, before i continue implementing stuff.

greetz
 turan
Title: Re: minimap and stuff...
Post by: Jorge Avila on January 31, 2013, 06:37:43 PM
I think the prototype is great, will the enemies and targets be highlighted in the minimap?
Title: Re: minimap and stuff...
Post by: dezGusty on January 31, 2013, 07:09:57 PM
Hi turan,

I would also like to have a fixed camera, like it is in the default position for the regular gameplay. But I think there is a chance that if we do that, we'll end up regretting the decision later on.
But that should not affect the minimap in my oppinion, as the minimap should always point north. And I think you could simply remove the fog of war in a radius around the player.

But I haven't studied the topic in-depth, so I'm probably omitting something. Is there a technical reason to prefer a fixed player camera for the minimap to be displayed properly?
Title: Re: minimap and stuff...
Post by: turan on February 01, 2013, 01:04:58 AM
Hi guys,

@Jorge: I don't intend to neither highlight nor show enemies or targets at all, because the "radar" as i call it, should only serve as an orientation help and show the player where he has been allready and where not. Building this whole thing with f.e having quest targets to be shown in mind, would defenitly need a whole new implementation attempt, and i think much of the existing gamecode ( scene structure, game window creation etc. ) has to be rewritten (at least massivly extended )to acomplish such "plugin" capabilities. thats not realy what I am after at this early stage. sorry :(

@dez: to keep it simple yes  ;) ... to be honest it has nothing to do with fog in the first place, but I was seeking a decession about that topic becaue  I wanted to have the cegui "frame" finshed before playing around with fog.
>As I create a cegui window and adjust the minimap cam before each redenring process, so that it matches the players location. actualy the heading indicator of the player is just (still) a square cegui label in the middle of the radars' child window, witch takes the rendered map as imageset and only adjusts itself accordingly to the players cam rotation. But with the scene camera able to be moved by the player, i would need a mouselistener to take that rotation into account too. So it would be easier for me  :D ...and of course much more common to stay with a fixed isometric gameview. -- at least from my side:thumbs up for a pure, original,  diablo like , Hack n' Slash'ishgameview!!  ;D

greetings
 turan
Title: Re: minimap and stuff...
Post by: dezGusty on February 01, 2013, 08:56:09 AM
I would suggest implementing it with support for a rotatable player camera. But with an optional property for displaying the player direction. (E.g.: if the player direction is set from outside the minimap class, it means it is available, so display an arrow. Otherwise, the direction is not available, so display a circle for the player location)
Title: Re: minimap and stuff...
Post by: Jorge Avila on February 01, 2013, 08:18:26 PM
i think that the minimap should not be configured by the player, it should work as is.

To make orientation easier, the arrow could point up allways and the map could rotate, or the map could be static and the arrow rotates, your choice.
But direction should always be displayed.

Not knowing where you are going is one of the most annoying thing, doesn't it? =)

NOTE: i forgot to say that the current camera has a horrible hack, to limit some skillpowers. So... the camera could be improved but we need to improve those skills first, an so on... haha. :D