.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Cyborg Factory > United Bot
United Bot The ultimate beast is being given birth right here! Half-Life 2

Reply
 
Thread Tools
Re: Unreal engine driver communication
Old
  (#11)
Lazy
Member
 
Lazy's Avatar
 
Status: Offline
Posts: 236
Join Date: Jan 2004
Location: Toronto, Ontario, Canada
Default Re: Unreal engine driver communication - 12-04-2004

Heres what you would need to do...

- Define a global structure in unrealscript with members like searchkey, opcode, param1, param2, param3, param4.
- Every frame check the opcode and act on it.
- At the end of every frame zero-out the opcode and parameter members.

In the C++ driver...

- Find the address by injecting a dll and use it to find the searchkey.
- Using shared memory, tell the engine driver where the structure is loaded.
- Read/WriteProcessMemory your opcodes and parameters.

Maybe that would work?
  
Reply With Quote
Re: Unreal engine driver communication
Old
  (#12)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: Unreal engine driver communication - 12-04-2004

UnrealScript can allocate objects on the fly, however, that memory won't be readable by external applications since UnrealScript can't change the page access flags to make it a global page table. The only way that I'm aware of to read that memory would be to have an application running at Ring-0 (the same access level as the Operating System, something like a virtual device driver).

If you could get the memory buffer working, you could probably use the TCP/IP stream to signal the UnrealScript code when there's something to be read and the UnrealScript code could send something back on the TCP/IP steam when there's something ready to be read by the external C++ application.

I wouldn't count on this method working until someone *ACTUALLY DOES IT*. When you have a working prototype that can send data back and forth, only then should you consider this a working alternative.

botman
  
Reply With Quote
Re: Unreal engine driver communication
Old
  (#13)
botmeister
Ex-Council Member
 
botmeister's Avatar
 
Status: Offline
Posts: 1,090
Join Date: Nov 2003
Location: Canada
Default Re: Unreal engine driver communication - 12-04-2004

Polling should OK since the driver only needs to kick in after Unreal updates each frame. The two way communications can be done through the shared memory buffer (assuming Unrealscript can create one).

Even if we can get two way communications to work, botman is indicating that the facilities provided by Unreal script may be too limiting.

For example, are we able to determine things such as if a bot has ammo left or not, what is a bots health, etc.


Maker of the (mEAn) Bot.Admin Manager

"In theory, there is no difference between theory and practice. But, in practice, there is." - Jan L.A. van de Snepscheut

Last edited by botmeister; 12-04-2004 at 23:21..
  
Reply With Quote
Re: Unreal engine driver communication
Old
  (#14)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Unreal engine driver communication - 14-04-2004

All this is possible with UnrealScript. The main limitation is access to the world's data. But this can be circumvented by interpreting the map files ourselves and build a world mesh in parallel to the engine, just like what I do in my bot with the navmesh, only more detailed.

Besides we already decided that we WERE sticking with the Unreal engine.

Who is doing this currently ?
I'm not yet decided to throw away €30 in order to buy an Unreal copy (just a matter of taste: I don't enjoy the game...)



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: Unreal engine driver communication
Old
  (#15)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Unreal engine driver communication - 14-04-2004

Quote:
Originally Posted by Lazy
Looks like we'll have to inject some code to get the same result, shouldn't be too hard but the method I use only works on 2K/XP so another set of injection functions will have to be written.
Looks like I missed this part in your post, Lazy.
Could you tell us more ? How do you see things ? I'm a total n00b with code injection, but from what I hear it sounds very promising.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: Unreal engine driver communication
Old
  (#16)
FrostyCoolSlug
Member
 
FrostyCoolSlug's Avatar
 
Status: Offline
Posts: 318
Join Date: Mar 2004
Default Re: Unreal engine driver communication - 14-04-2004

Code injection is basically what Hacks do to CS, Previously it was DLL 'hooking', now its injection. However, i'm not sure how legal this is, or if we would need function named from the header files to be able to do this.

And this will need to be made to work on Linux as well.


=====
Craig "FrostyCoolSlug" McLure
Network Administrator of the ChatSpike IRC Network
  
Reply With Quote
Re: Unreal engine driver communication
Old
  (#17)
Lazy
Member
 
Lazy's Avatar
 
Status: Offline
Posts: 236
Join Date: Jan 2004
Location: Toronto, Ontario, Canada
Default Re: Unreal engine driver communication - 14-04-2004

Code injection is not just used for hacks, basically you force a remote process to call LoadLibrary with your dll using CreateRemoteThread.

Once created, you call WaitForSingleObject on the remote thread and get the result of LoadLibrary with GetExitCodeThread.

Once the dll has been loaded by the remote process it becomes part of the application.
Calling GetModuleFilename in DllMain under DLL_PROCESS_ATTACH and displaying it with a message box will show the name of the application you injected the dll into.
  
Reply With Quote
Re: Unreal engine driver communication
Old
  (#18)
FrostyCoolSlug
Member
 
FrostyCoolSlug's Avatar
 
Status: Offline
Posts: 318
Join Date: Mar 2004
Default Re: Unreal engine driver communication - 14-04-2004

obviously, i was using hacks as an example as to how companies arnt very happy with that method, the dont cancel accounts for the cheating, the do it for the modification of the engine.

Nice avatar btw Lazy :p


=====
Craig "FrostyCoolSlug" McLure
Network Administrator of the ChatSpike IRC Network
  
Reply With Quote
Re: Unreal engine driver communication
Old
  (#19)
Lazy
Member
 
Lazy's Avatar
 
Status: Offline
Posts: 236
Join Date: Jan 2004
Location: Toronto, Ontario, Canada
Default Re: Unreal engine driver communication - 14-04-2004

Well, I'm sure plenty of methods can be thought up.
The only problem is that posting them one at a time like this is very very slow.
An IRC meeting would be much faster and probably produce more ideas.

We may not have to use the injection method either, we have the problem solved with the structure keys.
We simply search through unreal's memory for a pre-defined key number.
When that is found we have the address of the structure in unreal and it can be casted into a similar C one and acted upon.

[Edit]
^^ Thanks, though I cannot make anymore.
After that one I forgot how to animate them properly.
  
Reply With Quote
Re: Unreal engine driver communication
Old
  (#20)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Unreal engine driver communication - 20-04-2004

The problem with IRC is that most of the stuff that is said there tends to be immediately forgotten.

About the memory method: is someone already working on it or do I need to fetch an ugly warez copy of Unreal over KaZaA (with the appropriate viruses) and pollute my computer with it to get my hands in it ?

I'm just reluctant on buying a game I don't enjoy playing.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com