Topic: minimap and stuff...

dezGusty on March 26, 2012, 01:37:45 PM
Reply #15

dezGusty

  • Artists
  • Full Member
  • *
  • Posts: 245
  • Karma: +8/-0
    • View Profile
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 :)
Logged

turan on March 27, 2012, 04:05:19 PM
Reply #16

turan

  • Newbie
  • *
  • Posts: 36
  • Karma: +2/-0
    • View Profile
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   

« Last Edit: March 27, 2012, 04:11:26 PM by turan »
"Es entspricht dem menschlichen Wesen, den zu hassen, den man verletzt hat." - Agricola 42, 4.
Logged

dezGusty on March 27, 2012, 05:53:10 PM
Reply #17

dezGusty

  • Artists
  • Full Member
  • *
  • Posts: 245
  • Karma: +8/-0
    • View Profile
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...
Logged

turan on March 30, 2012, 06:48:56 PM
Reply #18

turan

  • Newbie
  • *
  • Posts: 36
  • Karma: +2/-0
    • View Profile
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
  • split up the Game Objects in 3 Category types (1 additional one )(std::map storage): static, static_border and movable
  • implement a function to set all objects of one of the above categories visible/invisible by function parameter
  • adjust the minimap_camera to be synchronous with the players cam( yaw according to players_phi and set camera FOV
    according players cam m_distance(r) (with some region specific adjustments(r+const val for towns and r-const val for regions)
  • add a RenderTarget Listener to the sceene
  • disable visibility for: shadows, player light and movable objects during the Pre- Render process and enable it again afterwards during the Post- Render process


for the minimap window:
  • set the label position for the player ( Indicator ) to a  fixed position at the middle of the minimap window
  • setRotation according to player->getShape()->m_angle * 180 / PI
  • add a second static image window to the minimap frame window with the exact size and position of the window displaying the render on top of that window

I tried to:
  • load an extra texture from a PNG, create an Imageset from it
  • an display that Circle image with transparency on that second window to give the minimap a circle shape

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
 
« Last Edit: April 02, 2012, 10:39:09 PM by turan »
"Es entspricht dem menschlichen Wesen, den zu hassen, den man verletzt hat." - Agricola 42, 4.
Logged

fusion44 on April 04, 2012, 06:58:54 PM
Reply #19

fusion44

  • Administrator
  • Sr. Member
  • *****
  • Posts: 459
  • Karma: +10/-0
    • View Profile
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.
« Last Edit: April 04, 2012, 07:01:27 PM by fusion44 »
Logged

turan on April 10, 2012, 12:48:47 PM
Reply #20

turan

  • Newbie
  • *
  • Posts: 36
  • Karma: +2/-0
    • View Profile
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:
  • make it a circle
  • attach a mouse listener, to process the camera movement

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




« Last Edit: April 10, 2012, 12:50:22 PM by turan »
"Es entspricht dem menschlichen Wesen, den zu hassen, den man verletzt hat." - Agricola 42, 4.
Logged

fusion44 on April 14, 2012, 09:43:25 PM
Reply #21

fusion44

  • Administrator
  • Sr. Member
  • *****
  • Posts: 459
  • Karma: +10/-0
    • View Profile
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 :)
Logged

turan on April 15, 2012, 10:39:21 AM
Reply #22

turan

  • Newbie
  • *
  • Posts: 36
  • Karma: +2/-0
    • View Profile
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
"Es entspricht dem menschlichen Wesen, den zu hassen, den man verletzt hat." - Agricola 42, 4.
Logged

turan on May 14, 2012, 12:18:48 AM
Reply #23

turan

  • Newbie
  • *
  • Posts: 36
  • Karma: +2/-0
    • View Profile
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.
« Last Edit: May 14, 2012, 12:22:10 AM by turan »
"Es entspricht dem menschlichen Wesen, den zu hassen, den man verletzt hat." - Agricola 42, 4.
Logged

dezGusty on May 14, 2012, 07:24:55 AM
Reply #24

dezGusty

  • Artists
  • Full Member
  • *
  • Posts: 245
  • Karma: +8/-0
    • View Profile
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 :)
Logged

turan on January 31, 2013, 02:27:59 PM
Reply #25

turan

  • Newbie
  • *
  • Posts: 36
  • Karma: +2/-0
    • View Profile
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
"Es entspricht dem menschlichen Wesen, den zu hassen, den man verletzt hat." - Agricola 42, 4.
Logged

Jorge Avila on January 31, 2013, 06:37:43 PM
Reply #26

Jorge Avila

  • Graphic design
  • Full Member
  • ***
  • Posts: 171
  • Karma: +6/-0
    • View Profile
    • Portfolio/photography
I think the prototype is great, will the enemies and targets be highlighted in the minimap?
Logged

dezGusty on January 31, 2013, 07:09:57 PM
Reply #27

dezGusty

  • Artists
  • Full Member
  • *
  • Posts: 245
  • Karma: +8/-0
    • View Profile
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?
Logged

turan on February 01, 2013, 01:04:58 AM
Reply #28

turan

  • Newbie
  • *
  • Posts: 36
  • Karma: +2/-0
    • View Profile
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
« Last Edit: February 01, 2013, 01:06:40 AM by turan »
"Es entspricht dem menschlichen Wesen, den zu hassen, den man verletzt hat." - Agricola 42, 4.
Logged

dezGusty on February 01, 2013, 08:56:09 AM
Reply #29

dezGusty

  • Artists
  • Full Member
  • *
  • Posts: 245
  • Karma: +8/-0
    • View Profile
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)
Logged