community attempt at multiplayer

Programming Reality Factory and Genesis3D.
Veleran
Posts: 895
Joined: Mon Aug 22, 2005 10:22 am
Location: Greece

Post by Veleran »

In multiplayer we can use extra indicator color on the radar,showing where the human players are.
User avatar
jonas
Posts: 779
Joined: Tue Jul 05, 2005 5:43 pm
Location: Texas, USA
Contact:

Post by jonas »

in trying to compile rf I finally got it to compile almost all the way jit just gets some errors in the linking process.j

Code: Select all

Generating Code...

Linking...

   Creating library ..\RealityFactoryD.lib and object ..\RealityFactoryD.exp

AutoSelect.obj : error LNK2019: unresolved external symbol __imp__DialogBoxParamA@20 referenced in function _DrvList_PickDriver

AutoSelect.obj : error LNK2019: unresolved external symbol __imp__EndDialog@8 referenced in function _DlgProc@16

AutoSelect.obj : error LNK2019: unresolved external symbol __imp__UpdateWindow@4 referenced in function _DlgProc@16

CGenesisEngine.obj : error LNK2001: unresolved external symbol __imp__UpdateWindow@4

AutoSelect.obj : error LNK2019: unresolved external symbol __imp__SetWindowPos@28 referenced in function _DlgProc@16

CGenesisEngine.obj : error LNK2001: unresolved external symbol __imp__SetWindowPos@28

AutoSelect.obj : error LNK2019: unresolved external symbol __imp__GetWindowRect@8 referenced in function _DlgProc@16

CGenesisEngine.obj : error LNK2001: unresolved external symbol __imp__GetWindowRect@8

AutoSelect.obj : error LNK2019: unresolved external symbol __imp__GetDesktopWindow@0 referenced in function _DlgProc@16

CGenesisEngine.obj : error LNK2001: unresolved external symbol __imp__GetDesktopWindow@0

AutoSelect.obj : error LNK2019: unresolved external symbol __imp__ReleaseDC@8 referenced in function _DlgProc@16

AutoSelect.obj : error LNK2019: unresolved external symbol __imp__SendDlgItemMessageA@20 referenced in function _DlgProc@16

AutoSelect.obj : error LNK2019: unresolved external symbol __imp__GetDC@4 referenced in function _DlgProc@16

AutoSelect.obj : error LNK2019: unresolved external symbol __imp__GetDlgItem@8 referenced in function _DlgProc@16

AutoSelect.obj : error LNK2019: unresolved external symbol __imp__SetFocus@4 referenced in function _ResetMainWindow

AutoSelect.obj : error LNK2019: unresolved external symbol __imp__ShowWindow@8 referenced in function _ResetMainWindow

CGenesisEngine.obj : error LNK2001: unresolved external symbol __imp__ShowWindow@8

AutoSelect.obj : error LNK2019: unresolved external symbol __imp__AdjustWindowRect@12 referenced in function _ResetMainWindow

AutoSelect.obj : error LNK2019: unresolved external symbol __imp__SetWindowLongA@12 referenced in function _ResetMainWindow

AutoSelect.obj : error LNK2019: unresolved external symbol __imp__GetWindowLongA@8 referenced in function _ResetMainWindow

CWeapon.obj : error LNK2001: unresolved external symbol __imp__GetAsyncKeyState@4

CLevelController.obj : error LNK2001: unresolved external symbol __imp__GetAsyncKeyState@4

CMenu.obj : error LNK2001: unresolved external symbol __imp__GetAsyncKeyState@4

CPawnCon.obj : error LNK2001: unresolved external symbol __imp__GetAsyncKeyState@4

CPawnLow.obj : error LNK2019: unresolved external symbol __imp__GetAsyncKeyState@4 referenced in function "public: virtual bool __thiscall ScriptedObject::getValue(class skString const &,class skString const &,class skRValue &)" (?getValue@ScriptedObject@@UAE_NABVskString@@0AAVskRValue@@@Z)

CAnimGif.obj : error LNK2001: unresolved external symbol __imp__GetAsyncKeyState@4

CAVIPlayer.obj : error LNK2001: unresolved external symbol __imp__GetAsyncKeyState@4

CCommonData.obj : error LNK2001: unresolved external symbol __imp__GetAsyncKeyState@4

CInput.obj : error LNK2001: unresolved external symbol __imp__GetAsyncKeyState@4

CAnimGif.obj : error LNK2019: unresolved external symbol __imp__DispatchMessageA@4 referenced in function "public: int __thiscall CAnimGif::Play(int,int,bool)" (?Play@CAnimGif@@QAEHHH_N@Z)

CAVIPlayer.obj : error LNK2001: unresolved external symbol __imp__DispatchMessageA@4

CMenu.obj : error LNK2001: unresolved external symbol __imp__DispatchMessageA@4

CPawnCon.obj : error LNK2001: unresolved external symbol __imp__DispatchMessageA@4

CAnimGif.obj : error LNK2019: unresolved external symbol __imp__TranslateMessage@4 referenced in function "public: int __thiscall CAnimGif::Play(int,int,bool)" (?Play@CAnimGif@@QAEHHH_N@Z)

CAVIPlayer.obj : error LNK2001: unresolved external symbol __imp__TranslateMessage@4

CMenu.obj : error LNK2001: unresolved external symbol __imp__TranslateMessage@4

CPawnCon.obj : error LNK2001: unresolved external symbol __imp__TranslateMessage@4

CAnimGif.obj : error LNK2019: unresolved external symbol __imp__GetMessageA@16 referenced in function "public: int __thiscall CAnimGif::Play(int,int,bool)" (?Play@CAnimGif@@QAEHHH_N@Z)

CAVIPlayer.obj : error LNK2001: unresolved external symbol __imp__GetMessageA@16

CMenu.obj : error LNK2001: unresolved external symbol __imp__GetMessageA@16

CPawnCon.obj : error LNK2001: unresolved external symbol __imp__GetMessageA@16

CAnimGif.obj : error LNK2019: unresolved external symbol __imp__PeekMessageA@20 referenced in function "public: int __thiscall CAnimGif::Play(int,int,bool)" (?Play@CAnimGif@@QAEHHH_N@Z)

CAVIPlayer.obj : error LNK2001: unresolved external symbol __imp__PeekMessageA@20

CMenu.obj : error LNK2001: unresolved external symbol __imp__PeekMessageA@20

CPawnCon.obj : error LNK2001: unresolved external symbol __imp__PeekMessageA@20

CPawnLow.obj : error LNK2019: unresolved external symbol __imp__ShowCursor@4 referenced in function "public: bool __thiscall ScriptedObject::lowmethod(class skString const &,class skRValueArray &,class skRValue &,class skExecutableContext &)" (?lowmethod@ScriptedObject@@QAE_NABVskString@@AAVskRValueArray@@AAVskRValue@@AAVskExecutableContext@@@Z)

RabidFrameworkMain.obj : error LNK2001: unresolved external symbol __imp__ShowCursor@4

CCommonData.obj : error LNK2001: unresolved external symbol __imp__ShowCursor@4

CGenesisEngine.obj : error LNK2001: unresolved external symbol __imp__ShowCursor@4

CPawnCon.obj : error LNK2001: unresolved external symbol __imp__ShowCursor@4

CPawnHigh.obj : error LNK2001: unresolved external symbol __imp__ShowCursor@4

CStaticMesh.obj : error LNK2001: unresolved external symbol __imp__MessageBoxA@16

RabidFrameworkMain.obj : error LNK2001: unresolved external symbol __imp__MessageBoxA@16

qxTerrainMgr.obj : error LNK2001: unresolved external symbol __imp__MessageBoxA@16

CPawn.obj : error LNK2001: unresolved external symbol __imp__MessageBoxA@16

CPawnCon.obj : error LNK2001: unresolved external symbol __imp__MessageBoxA@16

CPlayer.obj : error LNK2001: unresolved external symbol __imp__MessageBoxA@16

CSpout.obj : error LNK2001: unresolved external symbol __imp__MessageBoxA@16

CEffects.obj : error LNK2019: unresolved external symbol __imp__MessageBoxA@16 referenced in function "public: __thiscall CPreEffect::CPreEffect(void)" (??0CPreEffect@@QAE@XZ)

CGenesisEngine.obj : error LNK2001: unresolved external symbol __imp__MessageBoxA@16

CInventory.obj : error LNK2001: unresolved external symbol __imp__MessageBoxA@16

CMenu.obj : error LNK2001: unresolved external symbol __imp__MessageBoxA@16

CGenesisEngine.obj : error LNK2019: unresolved external symbol __imp__DefWindowProcA@16 referenced in function "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)

CGenesisEngine.obj : error LNK2019: unresolved external symbol __imp__DestroyWindow@4 referenced in function "public: __thiscall CGenesisEngine::CGenesisEngine(bool,int,int,char *,struct HINSTANCE__ *,char,bool,bool,char *)" (??0CGenesisEngine@@QAE@_NHHPADPAUHINSTANCE__@@D001@Z)

CGenesisEngine.obj : error LNK2019: unresolved external symbol __imp__CreateWindowExA@48 referenced in function "public: __thiscall CGenesisEngine::CGenesisEngine(bool,int,int,char *,struct HINSTANCE__ *,char,bool,bool,char *)" (??0CGenesisEngine@@QAE@_NHHPADPAUHINSTANCE__@@D001@Z)

CGenesisEngine.obj : error LNK2019: unresolved external symbol __imp__RegisterClassA@4 referenced in function "public: __thiscall CGenesisEngine::CGenesisEngine(bool,int,int,char *,struct HINSTANCE__ *,char,bool,bool,char *)" (??0CGenesisEngine@@QAE@_NHHPADPAUHINSTANCE__@@D001@Z)

CGenesisEngine.obj : error LNK2019: unresolved external symbol __imp__LoadCursorA@8 referenced in function "public: __thiscall CGenesisEngine::CGenesisEngine(bool,int,int,char *,struct HINSTANCE__ *,char,bool,bool,char *)" (??0CGenesisEngine@@QAE@_NHHPADPAUHINSTANCE__@@D001@Z)

CGenesisEngine.obj : error LNK2019: unresolved external symbol __imp__LoadIconA@8 referenced in function "public: __thiscall CGenesisEngine::CGenesisEngine(bool,int,int,char *,struct HINSTANCE__ *,char,bool,bool,char *)" (??0CGenesisEngine@@QAE@_NHHPADPAUHINSTANCE__@@D001@Z)

CGenesisEngine.obj : error LNK2019: unresolved external symbol __imp__GetOpenFileNameA@4 referenced in function "public: __thiscall CGenesisEngine::CGenesisEngine(bool,int,int,char *,struct HINSTANCE__ *,char,bool,bool,char *)" (??0CGenesisEngine@@QAE@_NHHPADPAUHINSTANCE__@@D001@Z)

CInput.obj : error LNK2019: unresolved external symbol __imp__GetSystemMetrics@4 referenced in function "public: void __thiscall CInput::Default(void)" (?Default@CInput@@QAEXXZ)

CLevelController.obj : error LNK2001: unresolved external symbol __imp__GetSystemMetrics@4

CMenu.obj : error LNK2001: unresolved external symbol __imp__GetSystemMetrics@4

CPawnLow.obj : error LNK2001: unresolved external symbol __imp__GetSystemMetrics@4

CPlayer.obj : error LNK2019: unresolved external symbol __imp__GetCursorPos@4 referenced in function "public: void __thiscall CPlayer::Tick(float)" (?Tick@CPlayer@@QAEXM@Z)

CMenu.obj : error LNK2001: unresolved external symbol __imp__GetCursorPos@4

CPawnCon.obj : error LNK2001: unresolved external symbol __imp__GetCursorPos@4

CPawnHigh.obj : error LNK2001: unresolved external symbol __imp__GetCursorPos@4

CPawnLow.obj : error LNK2001: unresolved external symbol __imp__GetCursorPos@4

CPlayer.obj : error LNK2019: unresolved external symbol __imp__ClientToScreen@8 referenced in function "public: void __thiscall CPlayer::Tick(float)" (?Tick@CPlayer@@QAEXM@Z)

RabidFrameworkMain.obj : error LNK2001: unresolved external symbol __imp__ClientToScreen@8

CMenu.obj : error LNK2001: unresolved external symbol __imp__ClientToScreen@8

CPawnCon.obj : error LNK2001: unresolved external symbol __imp__ClientToScreen@8

CPawnHigh.obj : error LNK2001: unresolved external symbol __imp__ClientToScreen@8

CPawnLow.obj : error LNK2001: unresolved external symbol __imp__ClientToScreen@8

CPlayer.obj : error LNK2019: unresolved external symbol __imp__GetClientRect@8 referenced in function "public: void __thiscall CPlayer::Tick(float)" (?Tick@CPlayer@@QAEXM@Z)

RabidFrameworkMain.obj : error LNK2001: unresolved external symbol __imp__GetClientRect@8

CMenu.obj : error LNK2001: unresolved external symbol __imp__GetClientRect@8

CPawnCon.obj : error LNK2001: unresolved external symbol __imp__GetClientRect@8

CPawnHigh.obj : error LNK2001: unresolved external symbol __imp__GetClientRect@8

CPawnLow.obj : error LNK2001: unresolved external symbol __imp__GetClientRect@8

RabidFrameworkMain.obj : error LNK2001: unresolved external symbol __imp__SetCursorPos@8

CMenu.obj : error LNK2019: unresolved external symbol __imp__SetCursorPos@8 referenced in function "public: void __thiscall CRFMenu::GameLevel(void)" (?GameLevel@CRFMenu@@QAEXXZ)

CPawnCon.obj : error LNK2001: unresolved external symbol __imp__SetCursorPos@8

CPawnLow.obj : error LNK2001: unresolved external symbol __imp__SetCursorPos@8

CPlayer.obj : error LNK2001: unresolved external symbol __imp__SetCursorPos@8

CMenu.obj : error LNK2019: unresolved external symbol __imp__SetTimer@16 referenced in function "public: void __thiscall CRFMenu::DoGame(bool)" (?DoGame@CRFMenu@@QAEX_N@Z)

CMp3.obj : error LNK2019: unresolved external symbol __imp__SendMessageA@16 referenced in function "public: __thiscall CMp3Manager::~CMp3Manager(void)" (??1CMp3Manager@@QAE@XZ)

..\RealityFactoryD.exe : fatal error LNK1120: 36 unresolved externals

Creating browse information file...

Microsoft Browse Information Maintenance Utility Version 8.00.50727

Copyright (C) Microsoft Corporation. All rights reserved.

Build log was saved at "file://c:\rf source\Debug\BuildLog.htm"

RGF - 98 error(s), 55 warning(s)

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Looks like something to do with platform sdk. I can only find one platform sdk..... is there more then one and I got the wrong one? It doesn't say anything about a missing header or library so I'm assuming I got all the paths set up correctly. Any ideas?
Jonas

Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better. - John Carmack
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Post by QuestOfDreams »

If you get such linking errors it means that the compiler does not find the correct library which provides these functions.
Did you follow all these steps when setting up the PSDK?
http://msdn.microsoft.com/vstudio/expre ... fault.aspx
User avatar
jonas
Posts: 779
Joined: Tue Jul 05, 2005 5:43 pm
Location: Texas, USA
Contact:

Post by jonas »

I believe so but I will reverify, that all the steps were done.
Jonas

Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better. - John Carmack
User avatar
jonas
Posts: 779
Joined: Tue Jul 05, 2005 5:43 pm
Location: Texas, USA
Contact:

Post by jonas »

Really great news! It worked!!!!!!!!!!!!! looks like I missed step 4 in that platform sdk guide. This is great. Thanks for the help Quest.
Jonas

Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better. - John Carmack
User avatar
jonas
Posts: 779
Joined: Tue Jul 05, 2005 5:43 pm
Location: Texas, USA
Contact:

Post by jonas »

ok I'm starting back up on this. I formated my computer and repartitioned it so I could play around with a couple of different linux distros and not have to keep resizing my windows partition every time I added another one. So here I go.
Jonas

Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better. - John Carmack
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

any headway on this project?
Herp derp.
User avatar
zany_001
Posts: 1047
Joined: Fri Mar 02, 2007 8:36 am
Location: Aotearoa

Post by zany_001 »

were is multiplayer on the rf1 dev list?
Once I was sad, and I stopped being sad and was awesome instead.
True story.
User avatar
jonas
Posts: 779
Joined: Tue Jul 05, 2005 5:43 pm
Location: Texas, USA
Contact:

Post by jonas »

Its toward the top as far as I'm concerned. I have just got past a couple of hardware issues. Now I have 2 pc's to test multiplayer on. But then comes another problem.. I don't have a router to hook them both into atm, so I have to get a crossover cable to link the 2 machines together and hope that works.

Some of the things I plan on putting in:
Showing weapons for opponents.
Bullets along with explosions.
Pawn scripting in sync.
Attributes will be able to be picked up by everyone.


I have a few more I plan to put in after those are completed.

Any ideas for pawn scripting? I was thinking maybe a command in the top of a script that makes it be ran by the host and the host sends all the data. That could possibly slow stuff down, but that's the only way I'm seeing.
Jonas

Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better. - John Carmack
User avatar
scott
Posts: 1151
Joined: Tue Jul 05, 2005 1:59 am
Location: United Kingdom

Post by scott »

you say you dont have a router, do they both have wireless capabilities then as there could be anothe soloution to this.
*GD*
User avatar
jonas
Posts: 779
Joined: Tue Jul 05, 2005 5:43 pm
Location: Texas, USA
Contact:

Post by jonas »

Nope neither pc I'm using has wireless. My laptop has wireless but it and rf don't seem to see eye to eye. I tried a connection sharing deal and put 2 ethernet cards in one pc and tried bridging the connection, and sharing connection between them but for some reason it didn't seem to work. So I've resorted to a cross-over cable. I got a couple of cables and I'm going to attempt to make one...... I hope it works.
Jonas

Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better. - John Carmack
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

i just realized something.... how can you make PvP games ans stuff
Herp derp.
User avatar
jonas
Posts: 779
Joined: Tue Jul 05, 2005 5:43 pm
Location: Texas, USA
Contact:

Post by jonas »

when you say PvP you mean player versus player right? Yes Player versus player will be available just by simply connecting to the host. More advance stuff will probably be added after everything works correctly.

I was finally able to get a cross-over cable made. I think my first cable was bad to start with....... lol Then with a little adjusting I have both computers linked. So now I will begin on the coding. I will be going on a trip so I might not get to work on it very much till next weekend.
Jonas

Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better. - John Carmack
User avatar
jonas
Posts: 779
Joined: Tue Jul 05, 2005 5:43 pm
Location: Texas, USA
Contact:

Post by jonas »

Well.... I've been working on this for off and on for 2 or 3 months now, and I can't even get it the weapons to show up on the players. :shock:
This looked pretty promising...

Code: Select all

CCD->Weapons()->DisplayThirdPerson(Player[index]->id);
But it didn't work :? I've stayed up most of the night trying to figure it out. :? Any suggestions?
Jonas

Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better. - John Carmack
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Post by Jay »

i've just looked at the definition of the NetPlayer:

Code: Select all

class NetPlayer
{
public:
	NetPlayer();
	~NetPlayer();

	void Create(char *actorname);
	int GetId()											{ return Id;						}
	void SetId(int id)									{ Id = id;							}
	void SetBaseRotation(const geVec3d &Rotation)		{ BaseRotation = Rotation;			}
	void SetlocalRotation(const geVec3d &Rotation)		{ localRotation = Rotation;			}
	void SetlocalTranslation(const geVec3d &Translation){ localTranslation = Translation;	}

public:
	geActor *Actor;
	char ActorName[128];
	char Animation[128];
// changed QD 02/01/07
	char PlayerName[64];
	float Scale;
// end change
	float AnimTime;
	int Id;
	geVec3d localTranslation;
	geVec3d localRotation;	
	geVec3d oldTranslation;
	geVec3d oldRotation;	
	geVec3d BaseRotation;

private:

};
I think Id refers to 'IdentificationNumber' of the Player. Has nothing to do with the weapons. I would say you have to add a new geActor* variable for the weapon and then use it like the pawn weapons are used...

Code: Select all

class NetPlayer 
{ 
public: 
   NetPlayer(); 
   ~NetPlayer(); 

   void Create(char *actorname); 
   int GetId()                                 { return Id;                  } 
   void SetId(int id)                           { Id = id;                     } 
   void SetBaseRotation(const geVec3d &Rotation)      { BaseRotation = Rotation;         } 
   void SetlocalRotation(const geVec3d &Rotation)      { localRotation = Rotation;         } 
   void SetlocalTranslation(const geVec3d &Translation){ localTranslation = Translation;   } 

public: 
   geActor *Actor; 
   geActor *WeaponActor; //change here
   char ActorName[128]; 
   char Animation[128]; 
// changed QD 02/01/07 
   char PlayerName[64]; 
   float Scale; 
// end change 
   float AnimTime; 
   int Id; 
   geVec3d localTranslation; 
   geVec3d localRotation;    
   geVec3d oldTranslation; 
   geVec3d oldRotation;    
   geVec3d BaseRotation; 

private: 

};
you might have a look at the CPawn.cpp for the weapon rendering.
that may be a start. Just a question: are the projectiles shown in the other player's views?
Everyone can see the difficult, but only the wise can see the simple.
-----
Post Reply