Printer-friendly copy
Top MechCommander MechCommander 2 topic #5317
View in linear mode

Subject: "Source Code Work" Previous topic | Next topic
rollinWed Aug-25-10 09:06 AM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
"Source Code Work"
Wed Aug-25-10 09:28 AM by rollin

          

ok I'm also fiddling a litte bit with the source code.


There is a bunch of things I would love to see improved and implemented over time by me or someone else


GAME




  • game able to display more objects per frame



  • give helicopter/planes the ability to "see" how big buildings are and fly around or over them if they are too high



  • new multiplayer code + coop function (play against bots)



  • change additive light to multiply (shader ?!)



  • change ingame fov per ini file



  • make skydome model higher (modelling)



  • play foot stamp sound when ever a mech foot hits the ground (in the same way as the food prints are generated)



  • message box (DONE)



EDITOR



  • read out camera rotation, angle, height



  • abl editor with visual waypoint modification functionality





I've added the functionality to display a text message through objectives (the function already there didn't worked in single player)






  

Alert Printer-friendly copy | Reply | Reply with quote | Top

Replies to this topic
Subject Author Message Date ID
RE: Source Code Work
Aug 26th 2010
1
RE: Source Code Work
Sep 01st 2010
2
RE: Source Code Work
Nov 26th 2010
19
      RE: Source Code Work
Nov 26th 2010
20
           RE: Source Code Work
Nov 26th 2010
21
                RE: Source Code Work
Nov 26th 2010
22
RE: Source Code Work
Oct 06th 2010
3
RE: Source Code Work
Oct 06th 2010
4
RE: Source Code Work
Oct 07th 2010
5
RE: Source Code Work
Oct 10th 2010
6
      RE: Source Code Work
Oct 10th 2010
7
           RE: Source Code Work
Oct 11th 2010
8
                RE: Source Code Work
Oct 11th 2010
9
                RE: Source Code Work
Oct 12th 2010
10
                     RE: Source Code Work
Oct 12th 2010
11
                     RE: Source Code Work
Oct 12th 2010
12
                          RE: Source Code Work
Oct 13th 2010
14
                     RE: Source Code Work
Oct 12th 2010
13
RE: Source Code Work
Nov 25th 2010
15
RE: Source Code Work
Nov 25th 2010
16
      RE: Source Code Work
Nov 25th 2010
17
           RE: Source Code Work
Nov 25th 2010
18
                RE: Source Code Work
Nov 29th 2010
23
                     RE: Source Code Work
Nov 29th 2010
24
                          RE: Source Code Work
Nov 29th 2010
25
                          RE: Source Code Work
Nov 29th 2010
28
                               RE: Source Code Work
Nov 29th 2010
29
                               RE: Source Code Work
Nov 30th 2010
34
                               RE: Source Code Work
Nov 30th 2010
33
                               RE: Source Code Work
Nov 30th 2010
36
                               RE: Source Code Work
Nov 30th 2010
38
                               RE: Source Code Work
Nov 30th 2010
37
                               RE: Source Code Work
Dec 16th 2010
65
                                    RE: Source Code Work
Dec 17th 2010
66
                                         RE: Source Code Work
Dec 17th 2010
67
                          RE: Source Code Work
Nov 29th 2010
26
                               RE: Source Code Work
Nov 29th 2010
27
                                    RE: Source Code Work
Nov 29th 2010
30
                                    RE: Source Code Work
Nov 29th 2010
31
                                    RE: Source Code Work
Nov 29th 2010
32
                                    RE: Source Code Work
Nov 30th 2010
35
                                         RE: Source Code Work
Nov 30th 2010
39
                                              RE: Source Code Work
Nov 30th 2010
40
                                              RE: Source Code Work
Nov 30th 2010
41
                                                   RE: Source Code Work
Nov 30th 2010
42
                                                   RE: Source Code Work
Dec 01st 2010
44
                                                   RE: Source Code Work
Dec 01st 2010
43
                                                        RE: Source Code Work
Dec 01st 2010
45
                                                             RE: Source Code Work
Dec 02nd 2010
46
                                                                  RE: Source Code Work
Dec 02nd 2010
47
                                                                       RE: Source Code Work
Dec 02nd 2010
48
                                                                       RE: Source Code Work
Dec 03rd 2010
49
                                                                            RE: Source Code Work
Dec 03rd 2010
50
                                                                                 RE: Source Code Work
Dec 03rd 2010
51
                                                                                 RE: Source Code Work
Dec 03rd 2010
52
                                                                                 RE: Source Code Work
Dec 03rd 2010
53
                                                                                      RE: Source Code Work
Dec 03rd 2010
54
                                                                                      RE: Source Code Work
Dec 04th 2010
55
                                                                                      RE: Source Code Work
Dec 04th 2010
56
                                                                                      RE: Source Code Work
Dec 05th 2010
57
                                                                                      RE: Source Code Work
Dec 05th 2010
58
                                                                                      RE: Source Code Work
Dec 05th 2010
59
                                                                                      RE: Source Code Work
Dec 06th 2010
60
                                                                                           RE: Source Code Work
Dec 06th 2010
61
RE: Source Code Work
Dec 07th 2010
62
RE: Source Code Work
Dec 08th 2010
63
      RE: Source Code Work
Dec 08th 2010
64
           RE: Source Code Work
Dec 22nd 2010
68
                RE: Source Code Work
Dec 23rd 2010
69
                     RE: Source Code Work
Mar 14th 2011
70
                          RE: Source Code Work
Sep 05th 2011
71
                               RE: Source Code Work
Sep 06th 2011
72
                                    RE: Source Code Work
Sep 07th 2011
73
                                         RE: Source Code Work
Sep 08th 2011
74
                                              RE: Source Code Work
Sep 08th 2011
75
                                                   RE: Source Code Work
Sep 09th 2011
76

rollinThu Aug-26-10 07:52 AM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
#1. "RE: Source Code Work"
In response to Reply # 0


          

also

GAME

  • able to create & use mech configuration files independently from singleplayer or multiplayer

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

rollinWed Sep-01-10 06:19 AM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
#2. "RE: Source Code Work"
In response to Reply # 0


          

The Code for the Message Window

http://blog.maginot.eu/index.php?p=till.5__mc2_code


if someone has a better idea for sharing code, tell me pls.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

    
MagicFri Nov-26-10 11:06 AM
Charter member
647 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#19. "RE: Source Code Work"
In response to Reply # 2
Fri Nov-26-10 11:15 AM by Magic

          

Quote

The Code for the Message Window

http://blog.maginot.eu/index.php?p=till.5__mc2_code


if someone has a better idea for sharing code, tell me pls.


rollin, thank you your message box:

I entered the code to my 2.5 with some modifications. No need to pause the game and press enter. It will display the message for a 10 (or more) sec and close after that period of time.

Here is the code:

File controlGUI.cpp.
********************************************************************
// set the message text - mesage box by rollin modified by magic 26112010
/* by mgto */
void ControlGui::setInstantMessageText( const char* getString)
{

instantStartTime = scenarioTime;
//char tmp2<64>;
//sprintf( tmp2, "startTime: %ld", instantStartTime );
//MessageBox(NULL,tmp2,"TEST",MB_OK);

instantEndTime = instantStartTime + 10;

renderInstantMessageText (getString, instantEndTime);

// set message state
i_dispMsg = true;

}

********************************************************************
// render the message text - mesage box by rollin modified by magic 26112010
/* by mgto */
void ControlGui::renderInstantMessageText (const char* getString, int endTime)
{
// change text if getString is not empty
if (getString != "" )
i_text = getString;

// if there is some text to display: pause game, draw message box and display text
if (i_text != "")
{
//___________________________
// DRAW MESSAGE WINDOW

unsigned long itw_right, itw_left, itw_top, itw_width, itw_height;
itw_right =10;
itw_top = 10;
itw_width = 400;
itw_height = 200;
itw_left = Environment.screenWidth - itw_right - itw_width;

unsigned long txt_width, txt_height;
txt_height = helpFont.height();
txt_width = helpFont.width( i_text );

GUI_RECT rect = {
itw_left, // left
itw_top, // top
itw_left + itw_width, //right
itw_top + itw_height //bottom
};
drawRect( rect, 0x44000000 );

//___________________________
// DRAW TEXT

drawShadowText( 0xff41a0f0, 0xff000000, missionResultsFont.getTempHandle(), itw_left+10, itw_top+5, true, "Message Window", false, missionResultsFont.getSize() );

//drawShadowText( 0xffffc600, 0xff000000, guiFont.getTempHandle(), itw_left+itw_width/3, itw_top+itw_height-15, true, "Press Enter to Continue", false, guiFont.getSize() );

// void drawShadowText( long colorTop, long colorShadow, HGOSFONT3D font, long left, long top, long right, long bottom, bool proportional, const char* text, bool bold, float scale, long xOffset, long yOffset, int align)
drawShadowText( 0xffffffff, 0xff000000, helpFont.getTempHandle(), itw_left+10 , itw_top+40, itw_left+itw_width, itw_top+itw_height-20, true, i_text, true, helpFont.getSize(), 1, 1, 0 );
}

//___________________________
// CONTINUE

long expTime = scenarioTime;

if ((expTime > endTime) && i_dispMsg)
{
//change i_text to nothing
i_text = "";
// set message state
i_dispMsg = false;
}

}
******************************************************************
void ControlGui::render( bool bPaused )
if (drawGUIOn)
{
/* by mgto */ if ( !bPaused && !MPlayer ) // show only in singleplayer and when pausemenu is not displayed

renderInstantMessageText("",instantEndTime);
}

*******************************************************************
File controlGUI.h

public

void setInstantMessageText( const char* getString);

private

void renderInstantMessageText (const char* getString, int endTime);
long instantStartTime;
long instantEndTime;


Can I use this modified code in my 2.5?
Time can be entered to setInstantMessageText like this

setInstantMessageText( const char* getString, int timeToDisplay);?

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

        
rollinFri Nov-26-10 11:37 AM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
#20. "RE: Source Code Work"
In response to Reply # 19


          

Starman01: don't see how this could be usefull ..


magic: thx for sharing the code!

I and Wolfman are already using a furhter developed code (not mutch) where you are also able to set the style and size with fit files


Imo the pause is very important.

If you want to display story text you should let the player decide how long the needs to read the text


I'll need to update the code on my page

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

            
MagicFri Nov-26-10 11:57 AM
Charter member
647 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#21. "RE: Source Code Work"
In response to Reply # 20


          

Quote

Starman01: don't see how this could be usefull ..


magic: thx for sharing the code!

I and Wolfman are already using a furhter developed code (not mutch) where you are also able to set the style and size with fit files


Imo the pause is very important.

If you want to display story text you should let the player decide how long the needs to read the text


I'll need to update the code on my page


Yes, you are correct about the story. Thats why I changed the names of functions "instant". Handy for short notes like my formation changes.

Will make them work both.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                
rollinFri Nov-26-10 12:28 PM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
#22. "RE: Source Code Work"
In response to Reply # 21


          

Sorry Magic, I was in a hurry between work and stuff that I missed your question. Of course you may use the code in any edited form. That's why I released it in the first place!

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

rollinWed Oct-06-10 12:25 PM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
#3. "RE: Source Code Work"
In response to Reply # 0


          

to fix the editor resize bug look into the editorinterface.cpp and change the code to this

search for the line "case WM_SIZE:" and change the case with the following code




case WM_SIZE:
{
float w = LOWORD(lParam);
float h = HIWORD(lParam);
/* disabled by mgto */ //windowSizeChanged = true;

/* by mgto */
//MessageBox("wm_size"); // use this for debugging
if (w != g_newWidth && h != g_newHeight){

if ( (16 < (w - g_newWidth)) || (16 < (h - g_newHeight)) ){ // make bigger
windowSizeChanged = true;
}

if ( (-w + g_newWidth) > 20 || (-h + g_newHeight) > 20 ){ // make smaller
windowSizeChanged = true;
}

if (windowSizeChanged){
g_newWidth = w + 16; //scrollbar thickness
g_newHeight = h + 16; //scrollbar thickness
}
}

/* by mgto */


/* disabled by mgto */ //g_newWidth = w + 16/*scrollbar thickness*/;
/* disabled by mgto */ //g_newHeight = h + 16/*scrollbar thickness*/;

retVal = GameOSWinProc( m_hWnd,message,wParam,lParam );
if (editor && bThisIsInitialized)
{
editor->update();
}
//EditorObjectMgr::instance()->update();
}
break;
}

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

rollinWed Oct-06-10 12:29 PM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
#4. "RE: Source Code Work"
In response to Reply # 0


          

magic or anyone else who knows:
how to play a sound from one of the mclib cpps ? (i guess it's mclib folder.. the folder where mech3d.cpp is in)

normally everything works from the code folder using the gamesound.cpp (which is also in the code folder but working as a subclass of soundsys)

but I'm not able to create an instance to the soundsys class (which is referenced in mclib) nor reference gemsound.h into the mclib stuff


I don't understand the c++ organisation well enough to get this going

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

    
MagicThu Oct-07-10 06:19 AM
Charter member
647 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#5. "RE: Source Code Work"
In response to Reply # 4


          

Sorry,
I did not look at sounds.

magic

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

    
TheOldManSun Oct-10-10 07:00 AM
Member since Jun 16th 2010
28 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#6. "RE: Source Code Work"
In response to Reply # 4


  

          

Check 'ABLMC2.CCP' under 'CODE' directory.

It defines the commands that can be used in script files.
Among these commands are several that refer to playing sounds.
The set up, and header files at the beginning of this file should give you some idea of how to access them from other source code locations, and code examples of how to call 'MCLIB' functions.
Ref: PlayBetty or PlayDigitalMusic

Hope this helps.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

        
rollinSun Oct-10-10 11:36 AM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
#7. "RE: Source Code Work"
In response to Reply # 6


          

hi!

1. I can play sounds form files in the 'code' directory
2. There is no code I can find under mclib that is actually using a sound system. the bink code has something in it but I'm quite sure the bink code is not compiled any more

I can not use the normal way to play sounds 'cause I'm not able to use soundsys (can't get an Instance of the class to work) nor am I able to reference the gemesoundsystem which is under 'code' and not included in the mclib sub-vproject. If I inlclude it I get the error that aFont can't be initialized but I'm not able to fix that

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

            
TheOldManMon Oct-11-10 10:03 AM
Member since Jun 16th 2010
28 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#8. "RE: Source Code Work"
In response to Reply # 7


  

          

Correct me if I'm wrong (wouldn't be the first time).
I'm new to C++ and don't know what's available through the compiler, and what has to be coded.

MCLib is part of the game Library? Primarily setting up access to existing C++ background functions like the sound system, so they can be called later. If that is the case, you wouldn't be able to access SoundSys, because it technically doesn't exist until it is compiled. Library functions have that tendency.

Where as Code accesses (includes) MCLib, and uses the defined functions. Therefore, you now have access to SoundSys.

The coding setup was most likely never intended to play any sounds from within MCLib, just make sound available.

Is there anyway you can accomplish what you are trying to do in the Code section?
Which brings up the question, what exactly are you trying to do?
I understand you're trying to play a sound file, but for what purpose?

A bit more information might help others point you in the right direction.

Which all brings me around to one last question...

Bink Code? You found Bink Code? Where is it? What filename?

Okay, that was actually 4 questions, but I'm interested in restoring Video capability to the game. It's not a high priority item with anyone else, but I think the game has lost alot of potential without it.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                
wolfmanMon Oct-11-10 11:55 AM
Member since Apr 15th 2003
351 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#9. "RE: Source Code Work"
In response to Reply # 8


  

          

This is what I think (and try to convince people of since some time) video back would be a real value for MC2. It needs a good C++ coder for that; my understanding of object oriented coding is too limited.
Bink is not the way to go because it is a thrid party code that you have to pay for. I believe this is why Microsoft took it out of the source code before they relesad it.

check out wolfman's missions and wolfman's forum at
http://s2.invisionfree.com/wolfman_x_forum/index.php

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                
rollinTue Oct-12-10 06:31 AM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
#10. "RE: Source Code Work"
In response to Reply # 8


          

yes, that it's part of a library could be true. Instancing a Class only after compiling could make sense but I'm not sure it's really true here

anyway.. the bink stuff (which is nothing more as a little bit code not doing the real video stuff) is called something like ...bink.cpp or ..bnk.cpp also within the mclib folder

I want to play a sound every time a mech foot touches the ground

the necessary information is within the mech3d.cpp but as it is part of mclib I need to get a soundsystem there. I see no easy way to transfer the mech-foot-touch-ground information into the 'code' section


and wolfman: you would also need someone who knows a bit about implementing a video codec not only handling c++ code.
But as people are normally not able to create some quality videos I wouldn't call this a really big value to the community .. multiplayer would be better imo

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                    
TheOldManTue Oct-12-10 09:52 AM
Member since Jun 16th 2010
28 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#11. "RE: Source Code Work"
In response to Reply # 10


  

          

Couldn't find find .CPP you referenced, but no matter, it will take me a while figure out the codec thing and how everything connects together.

Just 'one' quick question, and it requires no response.

Have you considered the full audio ramifications of 16 Mechs (32 feet) all slapping happy across your video screen, and into your ear drums?

And that's just player Mechs add in the enemy and ....v

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                        
rollinTue Oct-12-10 10:37 AM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
#12. "RE: Source Code Work"
In response to Reply # 11


          

the filename is : mclib/mc2bink.cpp

and the class I would love to call is 'SoundSystem' and there is already an instance of it called 'sndSystem' but it's used by /gui/ or /viewer/

as said mc2bink.cpp is using the soundSystem instance of the GgameSoundSystem class I guess. but mc2bink is not used anymore.. but it makes me wonder if it IS possible to get the sounds active from the mclib folder


and yes I'm aware how a bad foot step sound implementation would sound like .. and I also know there are some old files in the source showing that they where planing to implement these sounds but decided against it.. bc of lac of time or other reasons
but I'm sure I'm able to create a good foot step sound implementation if I'm somehow able to get these sounds working

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                            
TheOldManWed Oct-13-10 10:57 AM
Member since Jun 16th 2010
28 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#14. "RE: Source Code Work"
In response to Reply # 12


  

          

No such file, I got one called MC2Movie in the Code. You may have one of the first downloads of the source, before all the Bink stuff was cleaned out. I got mine just a couple of months ago.

Anyway, back to your problem...
Mech3d looks like it's setting up the animation frames. It may not be the best place for your Mod.

We can look at this logically.

Problem: You need to add sound based on a specific action/animation situation. Walk or Run.

So, other questions to figure out...
What calls Mech3d?
What other process has a sound associated with an animation action?
Is there another direction to work from?

Possible solution:
Find a similar process, and see how that works.
Look at the process for Jump. It uses special animation, and has a specific sound associated with it. (Which only works after the first jump.} It also has several functions for it in Mech3d, but no calls to play an SFX in those functions.

Where is the sound process executed? SFX sound = JUMPJETS = 76

There has to be something that says process a jump action, and play this SFX with it. Check the GUI process for the Jump Action.

That's your way in. Start with the mouse click for jump. Follow it to when and where it plays a sound. Apply the same or similar coding to walk and run. Walk should be easy, since all mechs walk at the same speed. Run will be more difficult since each mech chassis has its own speed.
You might actually find most of the code already there commented out, or a reference to what was planned.

Also check on how SFX Sound Channels are set up. There are a set number of channels and a priority system, so if there are too many things to be played at the same time, high priority gets played and low gets trashed. Set your priority appropriately.

Hope this helps.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                    
wolfmanTue Oct-12-10 12:04 PM
Member since Apr 15th 2003
351 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#13. "RE: Source Code Work"
In response to Reply # 10
Tue Oct-12-10 12:04 PM by wolfman

  

          

Quote

yes, that it's part of a library could be true. Instancing a Class only after compiling could make sense but I'm not sure it's really true here

anyway.. the bink stuff (which is nothing more as a little bit code not doing the real video stuff) is called something like ...bink.cpp or ..bnk.cpp also within the mclib folder

I want to play a sound every time a mech foot touches the ground

the necessary information is within the mech3d.cpp but as it is part of mclib I need to get a soundsystem there. I see no easy way to transfer the mech-foot-touch-ground information into the 'code' section


and wolfman: you would also need someone who knows a bit about implementing a video codec not only handling c++ code.
But as people are normally not able to create some quality videos I wouldn't call this a really big value to the community .. multiplayer would be better imo


You know that I believe video and multiplayer are the two big things missing and a lot af great campaigns had video in it. I totally disagree with your judgement on the skill people have to do this. The German campaign "Operation Fimbulwinter" is almost video only with a great story and actors. I can live without foodstep sound but understand the challenge to implement it and the good feeling once it work

check out wolfman's missions and wolfman's forum at
http://s2.invisionfree.com/wolfman_x_forum/index.php

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

Starman01Thu Nov-25-10 08:53 AM
Member since Nov 10th 2010
110 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#15. "RE: Source Code Work"
In response to Reply # 0
Thu Nov-25-10 08:53 AM by Starman01

          

@rollin :

regarding that :


"give helicopter/planes the ability to "see" how big buildings are and fly around or over them if they are too high"



Have you made any progress in that ? After taking a look into some fit files, I found that most if not all object have the same settings in the (Bound) part. X, Y and Z is all set to 20. Have you tried changing those values ?

Either MS didn't get it working, or was simply to lazy to edit different bounding boxes per model

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

    
rollinThu Nov-25-10 09:10 AM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
#16. "RE: Source Code Work"
In response to Reply # 15


          

that was a good idea!

unfortunately the bounds are only creating a 2d rectangle. Not sure for what that was or is used. Changing the values doesn't seem to do anything 0.o

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

        
Starman01Thu Nov-25-10 11:20 AM
Member since Nov 10th 2010
110 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#17. "RE: Source Code Work"
In response to Reply # 16
Thu Nov-25-10 11:22 AM by Starman01

          

Hm, maybe it's disabled in the code ? That would explain why they didn't bother to change the values. Karl found this in the code, maybe it's related and you can add the z-axis :


// convert to block and vertex

long tileCol;

long tileRow;



land->worldToTile( data->vector, tileRow, tileCol );



int blockI = tileCol/20;

int blockJ = tileRow/20;



data->blockNumber = blockJ * land->blocksMapSide + blockI;

tileCol -= blockI * 20;

tileRow -= blockJ * 20;



data->vertexNumber = tileRow * 20 + tileRow;

countObject(data);



data++;

}




I just don't know where he exactly found it.

@Karl : In which file was this located ?

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

            
wolfmanThu Nov-25-10 04:08 PM
Member since Apr 15th 2003
351 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#18. "RE: Source Code Work"
In response to Reply # 17


  

          

Quote

Hm, maybe it's disabled in the code ? That would explain why they didn't bother to change the values. Karl found this in the code, maybe it's related and you can add the z-axis :


// convert to block and vertex

long tileCol;

long tileRow;



land->worldToTile( data->vector, tileRow, tileCol );



int blockI = tileCol/20;

int blockJ = tileRow/20;



data->blockNumber = blockJ * land->blocksMapSide + blockI;

tileCol -= blockI * 20;

tileRow -= blockJ * 20;



data->vertexNumber = tileRow * 20 + tileRow;

countObject(data);



data++;

}




I just don't know where he exactly found it.

@Karl : In which file was this located ?


It can be found in objmgr.cpp

check out wolfman's missions and wolfman's forum at
http://s2.invisionfree.com/wolfman_x_forum/index.php

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                
KarlMon Nov-29-10 12:53 AM
Member since Sep 28th 2010
132 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#23. "RE: Source Code Work"
In response to Reply # 18


          

Anyone had a look at increasing the number of objects that can be displayed on screen? I have and have found some code that to an untrained eye looks promising but I cant seem to get the MC2 source code to compile.

TG_Shape::tglHeap = new UserHeap;
TG_Shape::tglHeap->init(tglHeapSize,"TinyGeom");

//Start up the TGL RAM pools.
colorPool = new TG_VertexPool;
colorPool->init(30000);

vertexPool = new TG_GOSVertexPool;
vertexPool->init(30000);

facePool = new TG_DWORDPool;
facePool->init(40000);

shadowPool = new TG_ShadowPool;
shadowPool->init(30000);

trianglePool = new TG_TrianglePool;
trianglePool->init(20000);

Has anyone else come across this piece of code?

To me (an untrained eye) it would seem increasing the value will increase the RAM allocation and also increase the number of instances of these geometric features that the game can handle? I know MASSIVE assumption!

Again I am very new to C++ so most of the time I dont know what I am looking at but I am keen to learn and help with the current multiple projects to revamp the MC2 engine.

By the way if anyone one wants a program written that says "Hello World" in a cmd window, I can do that no problems!

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                    
rollinMon Nov-29-10 06:08 AM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
#24. "RE: Source Code Work"
In response to Reply # 23


          

depends.. In which file did you find it?

Looks interesting indeed!

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                        
MagicMon Nov-29-10 09:24 AM
Charter member
647 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#25. "RE: Source Code Work"
In response to Reply # 24
Mon Nov-29-10 09:28 AM by Magic

          

File is mission.cpp

Mission::initTGLForMission()

Rollin I made a hybrid of your message box:

void ControlGui::setMessageText( int mode, const char* getString, int timeToDisplay)

if mode = 0 (default) timeToDisplay is required in seconds.
mode > 0 it displays your mesage box with pause game and press enter to continue, timeToDisplay not required.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                            
rollinMon Nov-29-10 06:28 PM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
#28. "RE: Source Code Work"
In response to Reply # 25


          

Magic, I've updated my message window code here

http://blog.maginot.eu/index.php?p=till.5__mc2_code


The biggest change is the implementation of the buttonLayout(...).fit Files to set the messagebox size and colors for every resolution in a proper way


It should be easy to implement the changes into your version of the code.

Note: only controlGui.h and .cpp have changed and you need to add the new block to each buttonLayout(...).fit file

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                
rollinMon Nov-29-10 06:31 PM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
#29. "RE: Source Code Work"
In response to Reply # 28
Mon Nov-29-10 06:32 PM by rollin

          

oh and something else


could you implement the following bug fix?!



it's only a very tiny visual bug of the mech torso rotation. I'm quite sure nobody else notice it but me it drives crazy




mech.cpp


old line
if ((torsoRelFacing < -fireArc) || (torsoRelFacing > fireArc) )

new line
if ( (torsoRelFacing < -fireArc) || (torsoRelFacing > fireArc) || ( (torsoRotation <= fireArc) && (torsoRotation >= -fireArc) ) )

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                    
MagicTue Nov-30-10 08:26 AM
Charter member
647 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#34. "RE: Source Code Work"
In response to Reply # 29


          

Quote

oh and something else


could you implement the following bug fix?!



it's only a very tiny visual bug of the mech torso rotation. I'm quite sure nobody else notice it but me it drives crazy




mech.cpp


old line
if ((torsoRelFacing < -fireArc) || (torsoRelFacing > fireArc) )

new line
if ( (torsoRelFacing < -fireArc) || (torsoRelFacing > fireArc) || ( (torsoRotation <= fireArc) && (torsoRotation >= -fireArc) ) )


OK will do, and will post with my latest release, possibly tomorrow.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                
MagicTue Nov-30-10 08:24 AM
Charter member
647 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#33. "RE: Source Code Work"
In response to Reply # 28


          

Quote

Magic, I've updated my message window code here

http://blog.maginot.eu/index.php?p=till.5__mc2_code


The biggest change is the implementation of the buttonLayout(...).fit Files to set the messagebox size and colors for every resolution in a proper way


It should be easy to implement the changes into your version of the code.

Note: only controlGui.h and .cpp have changed and you need to add the new block to each buttonLayout(...).fit file


OK but why doing so, it can be done in the code by checking resolution and switch.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                    
rollinTue Nov-30-10 09:53 AM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
#36. "RE: Source Code Work"
In response to Reply # 33


          

it's simple for others to change the look without working with the source code. You are the code right now.. but you also have to think about those who want to mod your mod (mission builders like me for example)

Quote

Quote

Magic, I've updated my message window code here

http://blog.maginot.eu/index.php?p=till.5__mc2_code


The biggest change is the implementation of the buttonLayout(...).fit Files to set the messagebox size and colors for every resolution in a proper way


It should be easy to implement the changes into your version of the code.

Note: only controlGui.h and .cpp have changed and you need to add the new block to each buttonLayout(...).fit file


OK but why doing so, it can be done in the code by checking resolution and switch.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                        
MagicTue Nov-30-10 10:47 AM
Charter member
647 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#38. "RE: Source Code Work"
In response to Reply # 36


          

Quote

it's simple for others to change the look without working with the source code. You are the code right now.. but you also have to think about those who want to mod your mod (mission builders like me for example)


OK, point taken.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                    
rollinTue Nov-30-10 09:53 AM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
#37. "RE: Source Code Work"
In response to Reply # 33
Tue Nov-30-10 09:55 AM by rollin

          

THAT is great

Quote



Already did that except I left color at the same level and used its 30000 for polys (70000). Tested on a large map with big forests - no object disappearing, but again my maps are not that complex.

Wolfman, you have bigger and more complex maps, have you tried this?
Plus directly above there is something like this 40 * 1024 * 1024 (I upgraded my comp yesterday and Im still in data transfer, my studio 2008 is not yet up, I cant look in the code), make it 80 * 1024 * 1024.

Its in my latest update (upload - tomorrow).

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                
MagicThu Dec-16-10 08:23 AM
Charter member
647 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#65. "RE: Source Code Work"
In response to Reply # 28


          

Quote

Magic, I've updated my message window code here

http://blog.maginot.eu/index.php?p=till.5__mc2_code


The biggest change is the implementation of the buttonLayout(...).fit Files to set the messagebox size and colors for every resolution in a proper way


It should be easy to implement the changes into your version of the code.

Note: only controlGui.h and .cpp have changed and you need to add the new block to each buttonLayout(...).fit file


rollin, since you work with wolfman and I dont plan to work on the editor can we agree about using the same code for your message box. Will you agree to use hybrid version because if we use different versions missions created in wolfmans editor may not be compatible (portable to 2.5)? I freed mechs and vehicles and I will free everything else of object2, so in theory missions created in wolfmans editor should be playable in mc2.5

My old missions are playable even without any change in mission fit files (with new obj number for mechs and vehicles).

I plan to change my corebrain.abx to be compatible with the original and wolfmans corebrain.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                    
rollinFri Dec-17-10 06:14 AM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
#66. "RE: Source Code Work"
In response to Reply # 65


          

I have nothing to say in this case. It's wolfmans thing and not mine.

I'm just helping here and there with code stuff

What you or wolfman do with the code, if you use the same or not, is something both of you have to communicate.

I don't have time to do or look into anything atm anyway.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                        
MagicFri Dec-17-10 11:53 AM
Charter member
647 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#67. "RE: Source Code Work"
In response to Reply # 66


          

Quote

I have nothing to say in this case. It's wolfmans thing and not mine.

I'm just helping here and there with code stuff

What you or wolfman do with the code, if you use the same or not, is something both of you have to communicate.

I don't have time to do or look into anything atm anyway.


OK thank you.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                        
KarlMon Nov-29-10 05:03 PM
Member since Sep 28th 2010
132 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#26. "RE: Source Code Work"
In response to Reply # 24


          

Your right Rollin I guess the file is important so...
This code can be found in both mission.cpp under the mechcmd2 project and also in editor.cpp under the editormfc project

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                            
rollinMon Nov-29-10 06:12 PM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
#27. "RE: Source Code Work"
In response to Reply # 26
Mon Nov-29-10 06:12 PM by rollin

          

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!



Karl you are close to beeing the hero of the day..



Magic and Wolfman (when you're back)


open mission.cpp (not mission2 or anything else yet)
and double all Pool Values

(stuff is around line 3075)

It does work here but I've already changed some values in the mid level renderer (MLR) so please do only this and nothing else and test it with a very crowded map (big forest or something like that)

I'm not saying we have it.. but we are certainly very very close!

Great find Karl!

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                
KarlMon Nov-29-10 08:45 PM
Member since Sep 28th 2010
132 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#30. "RE: Source Code Work"
In response to Reply # 27


          

Whoohoo! Hero of the day is what I was aiming for!

Wicked I am glad that something I found was actually useful. Not sure if you can tell from the code but are the values quoted in my post byte values? just curious really.

Also remember these values are also present in editor.cpp, would be keen to know what effect these values have on the mission editor, I would investigate myself but I first have to figure out how to get MC2 compiling.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                    
Starman01Mon Nov-29-10 08:57 PM
Member since Nov 10th 2010
110 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#31. "RE: Source Code Work"
In response to Reply # 30


          

That's great news guys, I'm keeping my fingers pressed that it works

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                
KarlMon Nov-29-10 09:03 PM
Member since Sep 28th 2010
132 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#32. "RE: Source Code Work"
In response to Reply # 27


          

Similar to the code I posted there is also this additional code in editor.cpp

Its lives in the code block directly under the previously posted code block in editor.cpp only

//------------------------------------------------
// Fire up the MC Texture Manager.
mcTextureManager = new MC_TextureManager;
mcTextureManager->start();

//Startup the vertex array pool
mcTextureManager->startVertices(2000000);

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                
MagicTue Nov-30-10 08:38 AM
Charter member
647 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#35. "RE: Source Code Work"
In response to Reply # 27


          

Quote

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!



Karl you are close to beeing the hero of the day..



Magic and Wolfman (when you're back)


open mission.cpp (not mission2 or anything else yet)
and double all Pool Values

(stuff is around line 3075)

It does work here but I've already changed some values in the mid level renderer (MLR) so please do only this and nothing else and test it with a very crowded map (big forest or something like that)

I'm not saying we have it.. but we are certainly very very close!

Great find Karl!


Already did that except I left color at the same level and used its 30000 for polys (70000). Tested on a large map with big forests - no object disappearing, but again my maps are not that complex.

Wolfman, you have bigger and more complex maps, have you tried this?
Plus directly above there is something like this 40 * 1024 * 1024 (I upgraded my comp yesterday and Im still in data transfer, my studio 2008 is not yet up, I cant look in the code), make it 80 * 1024 * 1024.

Its in my latest update (upload - tomorrow).

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                    
wolfmanTue Nov-30-10 10:52 AM
Member since Apr 15th 2003
351 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#39. "RE: Source Code Work"
In response to Reply # 35


  

          

Quote

Quote

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!



Karl you are close to beeing the hero of the day..



Magic and Wolfman (when you're back)


open mission.cpp (not mission2 or anything else yet)
and double all Pool Values

(stuff is around line 3075)

It does work here but I've already changed some values in the mid level renderer (MLR) so please do only this and nothing else and test it with a very crowded map (big forest or something like that)

I'm not saying we have it.. but we are certainly very very close!

Great find Karl!


Already did that except I left color at the same level and used its 30000 for polys (70000). Tested on a large map with big forests - no object disappearing, but again my maps are not that complex.

Wolfman, you have bigger and more complex maps, have you tried this?
Plus directly above there is something like this 40 * 1024 * 1024 (I upgraded my comp yesterday and Im still in data transfer, my studio 2008 is not yet up, I cant look in the code), make it 80 * 1024 * 1024.

Its in my latest update (upload - tomorrow).


I double all the pool values in mission and editor.cpp and can convince myself it is better or it has not chnged on dense forest maps. Need to make amore objective testing. This seems to be more psychology and the wish driving perseption

check out wolfman's missions and wolfman's forum at
http://s2.invisionfree.com/wolfman_x_forum/index.php

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                        
Starman01Tue Nov-30-10 01:30 PM
Member since Nov 10th 2010
110 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#40. "RE: Source Code Work"
In response to Reply # 39
Tue Nov-30-10 01:48 PM by Starman01

          

I have a good testing object for you guys. This is a mission wip from myself with a very big city. The retail editor and the game had already problems displaying it, and that even if the trees and props are still missing.

Mission is based on MC2X

I have now overlayed the city with a dense forest, that should generate enough polys (after all, the trees alone don't have that much polys, so that might be the reason why you haven't noticed any big changes yet)

Download here :

http://wcsaga.hard-light.net/team/Starman/downloads/data2.rar

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                        
rollinTue Nov-30-10 05:26 PM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
#41. "RE: Source Code Work"
In response to Reply # 39


          

There are some settings with the mid level renderer that might have an influence on what karl posted


the first place can be found in mlr.hpp around line 117

something like Max_Number_Vertices_Per_Frame = ... and so on

this is "just" a place that initializes basic values that can be changed on function call anyway but as this function seems to be not always called with all arguments this is not that unimportant.

so for the first test it would be interesting what happens if you double the values here (make sure they can be divided by 2 like 1024, 2048 ...)

the 2nd place is in mechcmd2.cpp
seach for "MidLevelRenderer::InitializeClasses(

2nd test would be to change values here but not in mlr.hpp

3rd test would be to change values in both files



here is my current state where I see now a lot more objects on screen

in mlr.hpp i use still some old values for testing which are way higher the the defaults:
vertices : 16384
primitives : 16384
the others values are the default ones

now in mechcmd2 i use also some old test values but this time lower ones!
(512, 512, 0,0,true)


that's all I can tell for the moment

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                            
KarlTue Nov-30-10 08:10 PM
Member since Sep 28th 2010
132 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#42. "RE: Source Code Work"
In response to Reply # 41


          

Since you are all looking at the code at the moment, has anyone come across this site? it outlines some code corrections to fix little bugs in the game, this may be old news but thought I would mention it

http://klucher.com/blog/mechcommander-2-fix-guide/

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                                
wolfmanWed Dec-01-10 11:46 AM
Member since Apr 15th 2003
351 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#44. "RE: Source Code Work"
In response to Reply # 42


  

          

Quote

Since you are all looking at the code at the moment, has anyone come across this site? it outlines some code corrections to fix little bugs in the game, this may be old news but thought I would mention it

http://klucher.com/blog/mechcommander-2-fix-guide/

All these fixes are in MC2X. I was one of the guys who asked poenty of questions when MS still supported questions that were not XNA only related.

check out wolfman's missions and wolfman's forum at
http://s2.invisionfree.com/wolfman_x_forum/index.php

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                            
MagicWed Dec-01-10 10:28 AM
Charter member
647 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#43. "RE: Source Code Work"
In response to Reply # 41


          

Quote

There are some settings with the mid level renderer that might have an influence on what karl posted


the first place can be found in mlr.hpp around line 117

something like Max_Number_Vertices_Per_Frame = ... and so on

this is "just" a place that initializes basic values that can be changed on function call anyway but as this function seems to be not always called with all arguments this is not that unimportant.

so for the first test it would be interesting what happens if you double the values here (make sure they can be divided by 2 like 1024, 2048 ...)

the 2nd place is in mechcmd2.cpp
seach for "MidLevelRenderer::InitializeClasses(

2nd test would be to change values here but not in mlr.hpp

3rd test would be to change values in both files



here is my current state where I see now a lot more objects on screen

in mlr.hpp i use still some old values for testing which are way higher the the defaults:
vertices : 16384
primitives : 16384
the others values are the default ones

now in mechcmd2 i use also some old test values but this time lower ones!
(512, 512, 0,0,true)


that's all I can tell for the moment


I played one of my old solo missions last night. Not many buildings on the map but between 40 and 50 mechs in one huge battle. My force (16 mechs), nearly half of my units are gone invisible regularly and many of the enemies, but not any more. I saw no disappearance of any unit. Will test this (mlr, mechcmdr2)tonight and post my latest update tomorrow.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                                
rollinWed Dec-01-10 04:30 PM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
#45. "RE: Source Code Work"
In response to Reply # 43


          

is it possible to read the settings for the pool stuff out of the settings or options cfg? OK, of course it's possible but how much effort?

Would be cool as soon as we know for sure what's necessary to increase the models per screen.

Wolfman says he's not sure if doubling the values alone did something significant

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                                    
MagicThu Dec-02-10 09:57 AM
Charter member
647 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#46. "RE: Source Code Work"
In response to Reply # 45


          

Quote

is it possible to read the settings for the pool stuff out of the settings or options cfg? OK, of course it's possible but how much effort?

Would be cool as soon as we know for sure what's necessary to increase the models per screen.

Wolfman says he's not sure if doubling the values alone did something significant


I tried changed mlr alone and mlr and mechcmd2 and saw no differnce to my previous post.

My machine is phenom x4 with 4 Gb ddr3 and ATI 4850 with 1Gb ddr5 and I had object disappearance when I had many objects (mechs and buildings) in view. Mostly disappearance of refit truck. I did not have time to test, only 4-5 missions where I had the truck disappearance, and its there - visible. Apart from that, no visual change, not that I expected to see any.

Plus Im talking about highest resolution 1920x1080.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                                        
rollinThu Dec-02-10 10:56 AM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
#47. "RE: Source Code Work"
In response to Reply # 46


          

ok, so far we are not sure what the MLR is doing (bc I also didn't saw any real change)

but changing the values in mission.cpp does increase the amount of objects one can see (I tested it and magic tested it)

Magic, when are you releasing your latest build?

And I hope we can get this into MC2X too

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                                            
MagicThu Dec-02-10 11:17 AM
Charter member
647 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#48. "RE: Source Code Work"
In response to Reply # 47


          

released.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                                            
wolfmanFri Dec-03-10 12:42 AM
Member since Apr 15th 2003
351 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#49. "RE: Source Code Work"
In response to Reply # 47
Fri Dec-03-10 12:43 AM by wolfman

  

          

Quote

ok, so far we are not sure what the MLR is doing (bc I also didn't saw any real change)

but changing the values in mission.cpp does increase the amount of objects one can see (I tested it and magic tested it)

Magic, when are you releasing your latest build?

And I hope we can get this into MC2X too


I tripled the pool values (kept color) in mission and editor cpp and left everything else in any other file as is.

Great result about 50 mechs in superdense woods and no missing textures.

Definitely much better than before. Still you can reach limitations but at other level compared to before.

I tried to change one entry from 40*1024*1024 to 120*3072*3072.

This variant crashed the gaming exe with the error message:
Heap TinyGeom Error bad 0009. I took this back to the starting values.

Will use the settings in next MC2X revision

check out wolfman's missions and wolfman's forum at
http://s2.invisionfree.com/wolfman_x_forum/index.php

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                                                
MagicFri Dec-03-10 07:07 AM
Charter member
647 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#50. "RE: Source Code Work"
In response to Reply # 49
Fri Dec-03-10 07:09 AM by Magic

          

Quote

I tripled the pool values (kept color) in mission and editor cpp and left everything else in any other file as is.

Great result about 50 mechs in superdense woods and no missing textures.

Definitely much better than before. Still you can reach limitations but at other level compared to before.

I tried to change one entry from 40*1024*1024 to 120*3072*3072.


Very good, we are definitely good here.

Wolfman you must not change 1024*1024 only 40.

Try 120*1024*1024. (3072*3072 will crush the game).

Can you please send me a list of your object2 files? Im moving all mechs out of object2, and by the time I sent you my second model release pack we had an agreement about usage of empty spaces in object2 so we should be more/less compatible there. I want to make my new object2 compatible with your object2 if possible (buildings and vehicles).

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                                                    
rollinFri Dec-03-10 08:45 AM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
#51. "RE: Source Code Work"
In response to Reply # 50


          

I also hope we can close the technical gap between wolfmans and magics mod. For me it would be great to port my maps easily from one mod to another and just deal with the balance changes based on the different gameplay

I know wolfman has it's way of thinking about mc2 as magic has too. But getting conform on a basic technical level would help both!

That's also my motivation why I release all my changes and modifications to everyone!

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                                                        
Starman01Fri Dec-03-10 08:53 AM
Member since Nov 10th 2010
110 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#52. "RE: Source Code Work"
In response to Reply # 51


          

Seconded

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                                                    
wolfmanFri Dec-03-10 12:08 PM
Member since Apr 15th 2003
351 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#53. "RE: Source Code Work"
In response to Reply # 50
Fri Dec-03-10 12:12 PM by wolfman

  

          

After you declared to finish your MC2 activities some years ago I used whatever slots anywhere have been available and extended the content of inventory by adding objects from other authors. I believe it is not compatible at all.

And I believe that I overcame the limitations in object2.pak. It can handle now around 3000 objects compared to issue it had before at a little over 1000.

check out wolfman's missions and wolfman's forum at
http://s2.invisionfree.com/wolfman_x_forum/index.php

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                                                        
Starman01Fri Dec-03-10 07:47 PM
Member since Nov 10th 2010
110 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#54. "RE: Source Code Work"
In response to Reply # 53


          

While you guys dig through the code, have you encountered the existing limits for objects and warrior brains for missions ?

In Chapter 2 of my campaign I decided to use the 120x120 map size two times, and for big maps with lots of battles you ran quickly into the warrior limit, i think it's currently 120 (counting all mechs and vehicles)

Also at some point the editor refuses to add any more trees (and objects I guess), he says it runs out of resources (while not getting slow or something). Certainly nothing that needs to be done quickly, but it should get a place on the "needs" list, when you plan to insert bigger maps too.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                                                            
KarlSat Dec-04-10 08:04 PM
Member since Sep 28th 2010
132 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#55. "RE: Source Code Work"
In response to Reply # 54


          

Found alittle bit of code regarding texture size for models, under aseconv -> Source files -> ase2tgl.cpp

Line 51

"long ObjectTextureSize = 128;"

When/if someone gets anytime would you mind changing this value to say 512 or 1024 and run a model though please (if it is as easy as that)

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                                                            
Starman01Sat Dec-04-10 08:45 PM
Member since Nov 10th 2010
110 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#56. "RE: Source Code Work"
In response to Reply # 55
Sat Dec-04-10 08:48 PM by Starman01

          

1024 is too much imo, I would say max 512. After all, think about the size of the units ingame, most of the time you are zoomed out a bit. Until there is no decent Lod system, I would say 512 is enough
But with a good lod system, nice camera angles you could zoom in into 3rd person view, then 1024 will become interesting

Only thing that needs uge textures are landscape textures.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                                                            
rollinSun Dec-05-10 06:40 PM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
#57. "RE: Source Code Work"
In response to Reply # 56


          

I say 512 is too much.

Of course it's never bad to loosen restrictions but I doubt there are many people around capable of filling all these pixel with a good texture.

Also this would lead to
redoing all default textures to get an consistent look
doubling or tribbling all objects polycounts to really make the texel density worth the effort

I say, 256 would be nice and still difficult to fill


A Texture size of 512 or 1024 would mean to use normalmapping and creating a mechcommander 3

for everything else, less is more then enough!

- my opinion

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                                                            
Starman01Sun Dec-05-10 07:51 PM
Member since Nov 10th 2010
110 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#58. "RE: Source Code Work"
In response to Reply # 57
Sun Dec-05-10 07:55 PM by Starman01

          

Quote
but I doubt there are many people around capable of filling all these pixel with a good texture.





Certainly not on this board, that's true. That's why I picked the HLP board in the second place (first because it's very good for it's technical)

Technically I agree with 256, but I often zoom in very close for a nice MW feeling, that's what I meant with a lod system, only then 512 would be useful. For more far out zoom, it's unnecessary of course

On the other hand, there is nothing wrong with a MC3 at all But that's certainly something that isn't worth worrying or discussing right now...

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                                                            
KarlSun Dec-05-10 08:10 PM
Member since Sep 28th 2010
132 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#59. "RE: Source Code Work"
In response to Reply # 58


          

Fair enough, I really dont care what it is changed too, I was more interested in finding the benefit limit, at what point do more pixels = no more useful detail. It sounds like the more experienced heads here already have a handle on that which is fine by me.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                                                        
MagicMon Dec-06-10 11:25 AM
Charter member
647 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#60. "RE: Source Code Work"
In response to Reply # 53


          

Quote

After you declared to finish your MC2 activities some years ago I used whatever slots anywhere have been available and extended the content of inventory by adding objects from other authors. I believe it is not compatible at all.

And I believe that I overcame the limitations in object2.pak. It can handle now around 3000 objects compared to issue it had before at a little over 1000.


OK, I guess I will have to remove all objects from object2.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                                                            
Starman01Mon Dec-06-10 11:34 AM
Member since Nov 10th 2010
110 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#61. "RE: Source Code Work"
In response to Reply # 60


          

That would be best, since it's also important to easy mod all the other stuff

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

MagicTue Dec-07-10 09:50 AM
Charter member
647 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#62. "RE: Source Code Work"
In response to Reply # 0


          

Rollin,

have you seen this?

struct Limits {
static unsigned
Max_Number_Vertices_Per_Frame,
Max_Number_Primitives_Per_Frame,
Max_Number_ScreenQuads_Per_Frame,
Max_Size_Of_LightMap_MemoryStream;

enum {
Max_Number_Vertices_Per_Mesh = 1024,
Max_Number_Vertices_Per_Polygon = 32,
Max_Number_Of_Texture_Bits = 14,
Max_Number_Textures = 1 << Max_Number_Of_Texture_Bits,
Max_Number_Of_NGon_Vertices = 9,
Max_Number_Of_Multitextures = 8,
Max_Number_Of_Lights_Per_Primitive = 16,
Max_Number_Of_FogStates = 4
};
};

in mlr.hpp.

You are much more versed in modeling then I.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

    
rollinWed Dec-08-10 10:19 AM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
#63. "RE: Source Code Work"
In response to Reply # 62


          

yes I've seen them


but I don't see any use to increase them atm. Interesting only of someone wants to try to create a new graphics quality level

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

        
Starman01Wed Dec-08-10 10:30 AM
Member since Nov 10th 2010
110 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#64. "RE: Source Code Work"
In response to Reply # 63


          

Quote

but I don't see any use to increase them atm. Interesting only of someone wants to try to create a new graphics quality level


*cough*

*points at starman*

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

            
KarlWed Dec-22-10 10:07 PM
Member since Sep 28th 2010
132 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#68. "RE: Source Code Work"
In response to Reply # 64


          

Hi guys

Could someone with code experience please look at objmgr.cpp particularly the section about "Gameobjectmanager::Load" approx line 3028

I am watching the video links that I posted the other day in the sticky thread and they guy on the video is going on about there being building, vehicle, mech, terrain, etc object limits set in this code and that if these limits were exceeded MC2 would just not draw them

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                
MagicThu Dec-23-10 03:12 PM
Charter member
647 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#69. "RE: Source Code Work"
In response to Reply # 68


          

Quote

Hi guys

Could someone with code experience please look at objmgr.cpp particularly the section about "Gameobjectmanager::Load" approx line 3028

I am watching the video links that I posted the other day in the sticky thread and they guy on the video is going on about there being building, vehicle, mech, terrain, etc object limits set in this code and that if these limits were exceeded MC2 would just not draw them


Been there, changed many things but nothing about graphics. Its about objects but not about poly limits.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                    
rollinMon Mar-14-11 08:05 AM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
#70. "RE: Source Code Work"
In response to Reply # 69


          

Here is the solo mission quicksave fix

I'll collect all changes now on one page where I can use colors to make more clear what's new

http://blog.maginot.eu/null.php?p=till.5__mc2_code

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                        
rollinMon Sep-05-11 09:18 PM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
#71. "RE: Source Code Work"
In response to Reply # 70


          

Hi Magic,

do you also notice an increase in crashes with the more-objects-higher-viewdistance? Working with mc2x r16 atm and not sure what is causing the crashes.

You have told that you have fixed some issues with the memory and poly/objects heaps.. Did this fixed the issues for you? And do you have no more crashes connected with that?

Would be nice to get some insight in what you have found out on that issue!

cheers
rollin

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                            
MagicTue Sep-06-11 07:37 AM
Charter member
647 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#72. "RE: Source Code Work"
In response to Reply # 71


          

Well, no time for testing. Please install MCO and see.
I had no reports of such crushes lately.

I reduced object rendering (buildings, not mechs and vehicles) if the distance from camera is greater then value. I also reduced shadow rendering.

We have one map (120x120 with lots of objects) made by starman that had constant crushes, not any more.

There are also indications of some other things that can cause crushes, terrain passable or impassable calculations or path calculations.

There is also a possibility that new objects can cause unexplained crushes. For example My new Kodiak had 10 weapon nodes, there was an error in ase file that was translated OK to tgl and agl and caused some severe crushes. The error was an empty line in ase between weapon node 8 and 9. That empty line caused unexplained memory related errors.

Memory changes were connected to after mission crushes for maps above 120.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                
rollinWed Sep-07-11 06:18 PM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
#73. "RE: Source Code Work"
In response to Reply # 72


          

Hi, thanks for the valuable info!

I want to make some tests but I have a simple problem now. If I want to load my map with the mco editor but the editor crashes. Funny is: even if I want to load some of the maps that come with mco it crashes (e_1_x for example)

It would be great if missing objects are replaced by a dummy object. That way I just have to go over all dummy objects and change them back to the object they should be.

Strange is that the editor has the functionality to do so as long as the object is not visible (== hidden behind the fog)

would be great to have this dummy-object-function

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                    
MagicThu Sep-08-11 07:39 AM
Charter member
647 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#74. "RE: Source Code Work"
In response to Reply # 73
Thu Sep-08-11 11:37 AM by Magic

          

The editor will crush if you have set model id for model to be displayed in objectives

l modelID = ... must be new objnum for mechs,
vehicles and new buildings, or the editor crush on show object in objectives.

I changed those Ids in my mission.fit files and all of them can be opened now.

Missing objects will work for buildings, but not for movers, if you have mover objects from X, their object numbers will find a file from different object in MCO and that will create an error. For example you have a mech from X with object num 55. It will load file 55 from MCo object2 and that file can be from another mech (it will not crush in that case), or from vehicle (crush) or from building (crush).

So you have to remove all mover objects from x and (I think) the editor will handle the buildings.

Or open your mission.fit file and change all object numbers and names for mechs and vehicles to MCO numbers. You can find all those numbers in buildings.csv and for all mechs, vehicles and new buildings in missions/moveobj.fit.

EDIT: Can you do the writing of that dummy-object function? I will try but I am very short on time...

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                        
rollinThu Sep-08-11 07:31 PM
Member since Aug 25th 2010
114 posts
Click to send email to this author Click to send private message to this authorClick to add this author to your buddy list
#75. "RE: Source Code Work"
In response to Reply # 74


          

yes got it working. thanks for the tip!!


btw a suggestion: can you "fade out" the shadows? like make the transparency dependent on the view distance and disable them when they reach the max range

about the dummy object hting. I'll have to setup a source code and visual studio first. my other rig where I did all the code work is not here where I live now. Will try to get this running.

thx again for your help!!

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

                                            
MagicFri Sep-09-11 05:46 AM
Charter member
647 posts
Click to send email to this author Click to send private message to this authorClick to view this author's profileClick to add this author to your buddy list
#76. "RE: Source Code Work"
In response to Reply # 75


          

Quote

btw a suggestion: can you "fade out" the shadows? like make the transparency dependent on the view distance and disable them when they reach the max range


Interesting idea, noted.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

Top MechCommander MechCommander 2 topic #5317 Previous topic | Next topic
Powered by DCForum+ Version 1.27
Copyright 1997-2005 DCScripts.com