Minor requests for the next release - Page 2

Minor requests for the next release

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Torrasque
Posts: 1022
Joined: 05 Oct 2004, 23:55

Post by Torrasque »

And of course I'd appreciate very much if this gets into the CVS :)
Make a diff file and post it to sourceforge, it is really easier for the SY.


http://sourceforge.net/docman/display_d ... ommanddiff
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

Can't you include date, player names, maps, in the demo filename, like tademo99b2 does? Also, add some 0 before any number used in filename (so it goes file0001 file0002 etc... instead of file1 file10 file11 file2 file3...).

And use the same scheme for naming screenshots files.
User avatar
Min3mat
Posts: 3455
Joined: 17 Nov 2004, 20:19

Post by Min3mat »

LewsTherin? sounds like a WoT loving spring player! i'd love to play him (im a WoT fan :D)
colorblind
Spring Developer
Posts: 374
Joined: 14 Mar 2005, 12:32

Post by colorblind »

zwzsg wrote:Can't you include date, player names, maps, in the demo filename, like tademo99b2 does?
You can, but I didn't. Feel free to change it. And the filenames do run from demo000.sdf to demo001.sdf etc. The benefits from the textfile come from the extra information you can store: events (e.g. player deaths), statistics (e.g. resource incomes), etc. But these aren't included atm.

As for the diff files I just ran CVS Diff with TortoiseCVS; I hope the things below are usefull.


Code: Select all

Index: rts/Net.h
===================================================================
RCS file: /cvsroot/springrts/taspring/rts/Net.h,v
retrieving revision 1.4
diff -u -r1.4 Net.h
--- rts/Net.h	3 Jul 2005 12:04:10 -0000	1.4
+++ rts/Net.h	15 Jul 2005 12:15:49 -0000
@@ -131,7 +131,9 @@
 	void FlushConnection(int conn);
 	void SendRawPacket(int conn, unsigned char* data, int length, int packetNum);
 
-	void CreateDemoFile(char* name);
+	char demoBinFile[50];
+	char demoTxtFile[50];
+	void CreateDemoFile(void);
 	void SaveToDemo(unsigned char* buf,int length);
 	bool FindDemoFile(const char* name);

Code: Select all

Index: rts/Net.cpp
===================================================================
RCS file: /cvsroot/springrts/taspring/rts/Net.cpp,v
retrieving revision 1.7
diff -u -r1.7 Net.cpp
--- rts/Net.cpp	3 Jul 2005 18:03:14 -0000	1.7
+++ rts/Net.cpp	15 Jul 2005 12:40:08 -0000
@@ -11,6 +11,7 @@
 #include "scripthandler.h"
 #include "gamesetup.h"
 #include "team.h"
+#include "pregame.h"
 //#include "mmgr.h"
 
 //////////////////////////////////////////////////////////////////////
@@ -150,7 +151,7 @@
 		gu->spectating=true;
 		return 1;
 	} else {
-		CreateDemoFile("test.sdf");
+		CreateDemoFile();
 	}
 
 	SOCKADDR_IN saOther;
@@ -543,14 +544,53 @@
 	}
 }
 
-void CNet::CreateDemoFile(char* name)
+void CNet::CreateDemoFile()
 {
-	recordDemo=new ofstream(name, ios::out|ios::binary);
+	for(int a=0;a<9999;++a){
+		sprintf(demoBinFile,"demos/demo%03i.sdf",a);
+		sprintf(demoTxtFile,"demos/demo%03i.txt",a);
+		CFileHandler ifs(demoBinFile);
+		if(!ifs.FileExists())
+			break;
+	}
+	
+	recordDemo=new ofstream(demoBinFile, ios::out|ios::binary);
 	if(gameSetup){
 		char c=1;
 		recordDemo->write(&c,1);
 		recordDemo->write((char*)&gameSetup->gameSetupTextLength,sizeof(int));
 		recordDemo->write(gameSetup->gameSetupText,gameSetup->gameSetupTextLength);
+
+		ofstream fout(demoTxtFile, ios::trunc);
+		fout << "*****************************\n";
+		fout << "*                           *\n";
+		fout << "*    TA Spring demo file    *\n";
+		fout << "*                           *\n";
+		fout << "*****************************\n";
+		fout << "\n";
+		fout << "\n";
+		fout << "Version:\t" << game->version		<< "\n";
+		fout << "Mapname:\t" << pregame->mapName	<< "\n";
+		fout << "\n";
+		fout << "\n";
+		fout << "================================================\n";
+		fout << "Side\t| Team\t| Ally team\t| Player\n";
+		fout << "------------------------------------------------\n";
+		for(int a=0;a<gameSetup->numPlayers;++a){
+			if(!gs->players[a]->spectator){ // we don't care for spectators
+				int team = gs->players[a]->team;
+				fout << gs->teams[team]->side	<< " \t| "		<< team << " \t| ";
+				fout << gs->team2allyteam[team] << " \t\t| "	<< gs->players[a]->playerName << "\n";
+			}
+		}
+		fout << "================================================\n";
+		fout << "\n";
+		fout << "\n";
+		fout << "================================================\n";
+		fout << "Time\t| Event\n";
+		fout << "------------------------------------------------\n";
+		fout << flush;
+		fout.close();
 	} else {
 		char c=0;
 		recordDemo->write(&c,1);

Code: Select all

Index: rts/Game.h
===================================================================
RCS file: /cvsroot/springrts/taspring/rts/Game.h,v
retrieving revision 1.5
diff -u -r1.5 Game.h
--- rts/Game.h	14 Jul 2005 17:02:14 -0000	1.5
+++ rts/Game.h	15 Jul 2005 09:59:23 -0000
@@ -65,6 +65,8 @@
 	float consumeSpeed;
 	int chatSound;
 
+	std::string version;
+	std::string fullversion;
 	bool playing;
 	bool allReady;
 	bool chatting;

Code: Select all

Index: rts/Game.cpp
===================================================================
RCS file: /cvsroot/springrts/taspring/rts/Game.cpp,v
retrieving revision 1.22
diff -u -r1.22 Game.cpp
--- rts/Game.cpp	14 Jul 2005 17:02:14 -0000	1.22
+++ rts/Game.cpp	15 Jul 2005 10:25:04 -0000
@@ -109,6 +109,8 @@
 CGame::CGame(bool server,std::string mapname)
 {
 	stupidGlobalMapname=mapname;
+	version		= "0.51b2";
+	fullversion = "TA Spring " + version;
 
 	time(&starttime);
 	lastTick=clock();
@@ -244,7 +246,7 @@
 	userInput="";
 	showList=0;
 
-	info->AddLine("TA Spring 0.51b1");
+	info->AddLine(fullversion);
 
 	if(!server){
 		netbuf[0]=NETMSG_EXECHECKSUM;

Code: Select all

Index: rts/Team.cpp
===================================================================
RCS file: /cvsroot/springrts/taspring/rts/Team.cpp,v
retrieving revision 1.5
diff -u -r1.5 Team.cpp
--- rts/Team.cpp	14 Jul 2005 17:02:14 -0000	1.5
+++ rts/Team.cpp	15 Jul 2005 12:44:41 -0000
@@ -8,6 +8,7 @@
 #include "infoconsole.h"
 #include "player.h"
 #include "unit.h"
+#include "net.h"
 //#include "mmgr.h"
 
 //////////////////////////////////////////////////////////////////////
@@ -200,7 +201,7 @@
 	}
 
 	if(units.empty()){
-		info->AddLine("Team%i(%s) is no more",teamNum,gs->players[leader]->playerName.c_str());
+		info->AddLine("Team %i (%s) is no more",teamNum,gs->players[leader]->playerName.c_str());
 		isDead=true;
 		for(int a=0;a<MAX_PLAYERS;++a){
 			if(gs->players[a]->active && gs->players[a]->team==teamNum){
@@ -208,7 +209,14 @@
 				if(a==gu->myPlayerNum)
 					gu->spectating=true;
 			}
-		} 
+		}
+		char time[10];
+		sprintf(time,"%02i:%02i",gs->frameNum/60/30,(gs->frameNum/30)%60);
+		ofstream fout(net->demoTxtFile, ios::app);
+		fout << time << "\t| ";
+		fout << "Team " << teamNum << " (" << gs->players[leader]->playerName << ") was annihilated\n";
+		fout << flush;
+		fout.close();
 	}
 }
b1ind
Posts: 48
Joined: 21 Apr 2005, 04:01

Post by b1ind »

OT:
Another WoT fan here :D
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Post by PauloMorfeo »

shnorb wrote:... also, what is the reason for being able to teamchat when spectating in a game...? ...
This probably came from an attempt to cut down work. Instead of programming extra stuff for spectating, they probably just reused the same features that allow you to play allied playing with the same army but make that player with a simple exception of making it unable to assign any kind of comands.

About the .cheat comand!
After you have done it, doing it again will not revert the situation. It should. Sometimes one players gets destroyed and we .cheat for him to .spectate but then cheats get enabled and we might want to be keeping track of the messages to see if no one is doing «real» cheats...
shnorb
Posts: 147
Joined: 04 Jun 2005, 07:25

Post by shnorb »

yeah thats a good idea... i always feel uneasy once they have been activated...
colorblind
Spring Developer
Posts: 374
Joined: 14 Mar 2005, 12:32

Post by colorblind »

Here's a small list of things proposed and implemented:
  • Have the .info and .clock automatically displayed at startup.
  • When a player dies, he automatically becomes a spectator.
  • Not-finished buildings can selfdestruct.
  • Spectator-only chat.
Proposed but not implemented (for as far as I can see) concerning gameplay:
  • Special keybinds to team- and ally-chat.
  • Toggle cheats instead of just enabling them
These are really easy to implement, but I myself don't have any time to spare atm.
And some other, less important things that aren't implemented:
  • Screenshot / replay (+text file) directory
  • Smaller fonts in the menu
  • a "play CORE" random enemies script as well as the "play ARM" one
    and get it to use 1000/1000 resources
shnorb
Posts: 147
Joined: 04 Jun 2005, 07:25

Post by shnorb »

are the health/experience bars going to be toggleable in the next version?
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Post by PauloMorfeo »

I might as well add a few requests...

# Dragon Teeths do not show up ghosted when we see them but loose LOS on them, like «normal» buildings. Would be nice to have.

»» These may be dependent on the GUI and the dude that is working on the new one seems to be having a hard enough time with it without having to go add new stuff, but, here it goes for the record ««

# In the settings, an option to disable 3D sounds and instead, hear all sounds as if we were right near them. (ugly but easy(?) solution for the fact that when we are using a zoomed out camera, we don't hear nothing... Since we would also hear the sounds of battling of other players, this could be too much...)

# In the settings, an option to disable the single middle-click button. I use alot the Middle-Click+drag to move the camera around. The problem is that sometimes i don't drag enough and it activates that weird mode. Annoying.

# The space-key should be the one used to go to last sent message, instead of F3. It must be a large and easily pressed panic button instead of the F3 key lost in the middle of all the other keys.

# Would be nice to have the ability to change the alliances in-game. Currently, people are loosing alot of time defining alliances in the Battlerooms and alot more, choosing the start positions in game and, sometimes, choosing wrong positions.
User avatar
Min3mat
Posts: 3455
Joined: 17 Nov 2004, 20:19

Post by Min3mat »

# The space-key should be the one used to go to last sent message, instead of F3. It must be a large and easily pressed panic button instead of the F3 key lost in the middle of all the other keys.

Utterly agree

# In the settings, an option to disable 3D sounds and instead, hear all sounds as if we were right near them. (ugly but easy(?) solution for the fact that when we are using a zoomed out camera, we don't hear nothing... Since we would also hear the sounds of battling of other players, this could be too much...)

Not so sure about that...i listen to music normally so i suppose its not going to affect me much

# In the settings, an option to disable the single middle-click button. I use alot the Middle-Click+drag to move the camera around. The problem is that sometimes i don't drag enough and it activates that weird mode. Annoying.

Not quite sure what you mean? u middle click whilst dragging to move the camera? :s


# Would be nice to have the ability to change the alliances in-game. Currently, people are loosing alot of time defining alliances in the Battlerooms and alot more, choosing the start positions in game and, sometimes, choosing wrong positions.

nah i'd hate that, unless u are permanently allied with your allyteam and can only change status with ppl not on your ally team
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

# The space-key should be the one used to go to last sent message, instead of F3. It must be a large and easily pressed panic button instead of the F3 key lost in the middle of all the other keys.
No the space bar should do what it did in TA.
# Would be nice to have the ability to change the alliances in-game. Currently, people are loosing alot of time defining alliances in the Battlerooms and alot more, choosing the start positions in game and, sometimes, choosing wrong positions.
Alliances made in the battleroom should be permanent throughout game, alliances thus can be made and broken ingame unless they conflict with pregame alliances or create an everyones allied situation.
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Post by Gnomre »

Alliances in game should be possible, otherwise you can't do the fun little mini-game on gods of war where you ally with the people on the two islands nearest you, and they do the same... Creates a fun game of politics alongside your normal war :D

But yeah, seriously, no ally in game makes it impossible to have random teams and do things like north vs south or east vs west with your teammate being whoever started on your side, and so on... Basically, it just makes the game too rigid. If you're worried about backstabbing, just don't play with people you don't trust... it's that simple.
Post Reply

Return to “Engine”