![]() |
Re: Unreal engine driver communication
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? |
Re: Unreal engine driver communication
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 |
Re: Unreal engine driver communication
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. |
Re: Unreal engine driver communication
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...) |
Re: Unreal engine driver communication
Quote:
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. |
Re: Unreal engine driver communication
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. |
Re: Unreal engine driver communication
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. |
Re: Unreal engine driver communication
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 |
Re: Unreal engine driver communication
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. |
Re: Unreal engine driver communication
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. |
All times are GMT +2. The time now is 12:36. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.