logo
Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

2 Pages12>
Options
Go to last post Go to first unread
Edgar  
#1 Posted : Friday, July 27, 2012 7:53:24 PM(UTC)
Edgar

Rank: Advanced Member

Groups: Developer, Registered
Joined: 2/19/2011(UTC)
Posts: 247

Thanks: 1 times
Was thanked: 45 time(s) in 31 post(s)
I just committed a patch to DirectEve which makes it possible to run without InnerSpace. The constructor now takes an optional IFramework object which wraps the two things DirectEve used InnerSpace for; EndScene hook and logging.

Code:
public DirectEve(IFramework framework = null)
{
  // here be dragons
}


The IFramework interface is very simple.

Code:
public interface IFramework : IDisposable
{
  void RegisterFrameHook(EventHandler<EventArgs> frameHook);
  void RegisterLogger(EventHandler<EventArgs> logger);
  void Log(string msg);
}


  • The RegisterFrameHook method is called by DirectEve to register a function which is expected to be called every time the game renders a frame (EndScene).
  • The RegisterLogger logger method is currently not used by DirectEve. It was intended to be used if DirectEve supplied logging functionality to the user. Since the user can supply this themselves I will probably remove this function at some point. For now just stub it out.
  • The Log method is called by DirectEve whenever it has some information to log. DirectEve doesn't log much information but this function will give you access to what it logs.


If you do not supply an IFramework object to DirectEve it will hook into InnerSpace at runtime and operate as it does today. No code will break.

NOTE: This patch was pushed just five minutes before the time of this post. It will take a while to make it to the support site for download.

UPDATE: I have a framework class already written which will provide a standalone EndScene hook and logger. If you are interested in writing something similar contact me and we can share code.

Edited by user Friday, July 27, 2012 7:57:45 PM(UTC)  | Reason: Not specified

Sponsor

Wanna join the discussion?! Login to your forum account. New Registrations are disabled.

ferox2552  
#2 Posted : Saturday, August 11, 2012 10:52:13 AM(UTC)
ferox2552

Rank: Advanced Member

Groups: Developer, Administrators, Registered
Joined: 9/16/2011(UTC)
Posts: 290

Thanks: 12 times
Was thanked: 53 time(s) in 39 post(s)
Hi,

I'm trying to get this to work and had allready made a library which calls EndScene() on every frame(easyhook/slimdx). As a noob coder with only basic c# experience i'm not sure how i can create a framework class that registers the frameHook() function in my endscene function.
Would be very appreciated if i could get a little help how to register that directeve function into endscene,

Ferox
Edgar  
#3 Posted : Saturday, August 11, 2012 11:17:35 AM(UTC)
Edgar

Rank: Advanced Member

Groups: Developer, Registered
Joined: 2/19/2011(UTC)
Posts: 247

Thanks: 1 times
Was thanked: 45 time(s) in 31 post(s)
Forget SlimDx. Just get WhiteMagic and do this http://privatepaste.com/406b3f6513

I'll clean up my framework class and post it somewhere soon.

Edited by user Saturday, August 11, 2012 11:18:08 AM(UTC)  | Reason: Not specified

yomon598  
#4 Posted : Tuesday, November 20, 2012 3:27:31 AM(UTC)
yomon598

Rank: Member

Groups: Registered
Joined: 4/9/2012(UTC)
Posts: 26

Thanks: 6 times
Was thanked: 1 time(s) in 1 post(s)
Any working solutions on replacing Innerspace?
While I do have a bit of coding experience it is solely in C/C++ and Python and my C# knowledge goes as far as being able to read and understand a bit of source code so I don't feel like tackling this myself.
I understand the main principle, the DirectEve ctor can use an IFramework object, but not sure what the frameHook should exactly do and what its prototype is - it's a hook for EndScene, it gets called each frame, but what else should it do?
Also, I don't know how Innerspace's dotnet command works and how it loads and executes questor's assembly.I'm familiar with native code injection, but not at all with .net code or how Innerspace operates.
Thanks for any solutions or hints!

Edgar  
#5 Posted : Tuesday, November 20, 2012 8:10:37 AM(UTC)
Edgar

Rank: Advanced Member

Groups: Developer, Registered
Joined: 2/19/2011(UTC)
Posts: 247

Thanks: 1 times
Was thanked: 45 time(s) in 31 post(s)
Below is some code to help you. The D3DDetour code came from https://github.com/miceiken/D3DDetour. I modified it so it doesn't need SlimDX although you still need WhiteMagic.

http://privatepaste.com/dcd8a70b76

Edited by user Tuesday, November 20, 2012 8:15:55 AM(UTC)  | Reason: Not specified

yomon598  
#6 Posted : Tuesday, November 20, 2012 6:06:20 PM(UTC)
yomon598

Rank: Member

Groups: Registered
Joined: 4/9/2012(UTC)
Posts: 26

Thanks: 6 times
Was thanked: 1 time(s) in 1 post(s)
Thank you for posting the needed classes.I have WhiteMagic compiled, but I'm not sure I will be able to figure how to properly use the code you supplied within Questor.
I will try though, thanks!
Edgar  
#7 Posted : Sunday, March 3, 2013 9:10:07 PM(UTC)
Edgar

Rank: Advanced Member

Groups: Developer, Registered
Joined: 2/19/2011(UTC)
Posts: 247

Thanks: 1 times
Was thanked: 45 time(s) in 31 post(s)
I updated the examples in DT's Questor branch. Standalone use without InnerSpace is working again.

See https://github.com/Da-Te...e/experimental/TreeTest1

I'm going to convert this over to GreyMagic soon...

Edited by user Sunday, March 3, 2013 9:12:33 PM(UTC)  | Reason: Not specified

thanks 1 user thanked Edgar for this useful post.
bbday on 3/3/2013(UTC)
bbday  
#8 Posted : Sunday, March 3, 2013 10:54:11 PM(UTC)
bbday

Rank: Advanced Member

Groups: Registered
Joined: 11/4/2011(UTC)
Posts: 313

Thanks: 9 times
Was thanked: 36 time(s) in 28 post(s)
Originally Posted by: Edgar Go to Quoted Post
I updated the examples in DT's Questor branch. Standalone use without InnerSpace is working again.

See https://github.com/Da-Te...e/experimental/TreeTest1

I'm going to convert this over to GreyMagic soon...


Do you think also possible add max fps?
Edgar  
#9 Posted : Sunday, March 3, 2013 11:09:32 PM(UTC)
Edgar

Rank: Advanced Member

Groups: Developer, Registered
Joined: 2/19/2011(UTC)
Posts: 247

Thanks: 1 times
Was thanked: 45 time(s) in 31 post(s)
Originally Posted by: bbday Go to Quoted Post
Originally Posted by: Edgar Go to Quoted Post
I updated the examples in DT's Questor branch. Standalone use without InnerSpace is working again.

See https://github.com/Da-Te...e/experimental/TreeTest1

I'm going to convert this over to GreyMagic soon...


Do you think also possible add max fps?


Not sure what you mean. The BT is only pulsed every 1.5 seconds.

Edgar  
#10 Posted : Monday, March 4, 2013 9:38:23 AM(UTC)
Edgar

Rank: Advanced Member

Groups: Developer, Registered
Joined: 2/19/2011(UTC)
Posts: 247

Thanks: 1 times
Was thanked: 45 time(s) in 31 post(s)
Pushed some bug fixes to the BT test app
bbday  
#11 Posted : Monday, March 4, 2013 10:26:08 AM(UTC)
bbday

Rank: Advanced Member

Groups: Registered
Joined: 11/4/2011(UTC)
Posts: 313

Thanks: 9 times
Was thanked: 36 time(s) in 28 post(s)
Originally Posted by: Edgar Go to Quoted Post
Originally Posted by: bbday Go to Quoted Post
Originally Posted by: Edgar Go to Quoted Post
I updated the examples in DT's Questor branch. Standalone use without InnerSpace is working again.

See https://github.com/Da-Te...e/experimental/TreeTest1

I'm going to convert this over to GreyMagic soon...


Do you think also possible add max fps?


Not sure what you mean. The BT is only pulsed every 1.5 seconds.



something like innerspace you can set max fps, like 5 or 10 fps, only for performance reason when you have a lot istance.
bbday  
#12 Posted : Monday, March 4, 2013 11:53:06 AM(UTC)
bbday

Rank: Advanced Member

Groups: Registered
Joined: 11/4/2011(UTC)
Posts: 313

Thanks: 9 times
Was thanked: 36 time(s) in 28 post(s)
small problem if i try use injector.exe and launch process (exefile.exe) application not responding (i tried also with admin privilege) but if i try with running process it working. (function Arguments TreeTest1.exe)

Edited by user Monday, March 4, 2013 11:53:38 AM(UTC)  | Reason: Not specified

Edgar  
#13 Posted : Monday, March 4, 2013 5:10:17 PM(UTC)
Edgar

Rank: Advanced Member

Groups: Developer, Registered
Joined: 2/19/2011(UTC)
Posts: 247

Thanks: 1 times
Was thanked: 45 time(s) in 31 post(s)
Originally Posted by: bbday Go to Quoted Post
small problem if i try use injector.exe and launch process (exefile.exe) application not responding (i tried also with admin privilege) but if i try with running process it working. (function Arguments TreeTest1.exe)


Yeah. I saw that too. Not sure why. I think it is an issue with the injector. It works fine if you launch Eve before injecting.

Originally Posted by: bbday Go to Quoted Post
something like innerspace you can set max fps, like 5 or 10 fps, only for performance reason when you have a lot istance.


Not sure how to go about doing that. Would you just add a delay in the OnFrame event?

Edited by user Monday, March 4, 2013 5:13:29 PM(UTC)  | Reason: Not specified

ISeeDEDppl  
#14 Posted : Monday, March 4, 2013 7:00:36 PM(UTC)
ISeeDEDppl

Rank: Advanced Member

Groups: Registered
Joined: 7/31/2011(UTC)
Posts: 93

Thanks: 3 times
Was thanked: 34 time(s) in 21 post(s)
no,a delay in the onframe event would just make it lag / studder =)

Innerspace seems to do it on a slightly higher level somehow convincing the game that the renderer can only do x frames per sec (as if it were a hardware limitation or similar).
bbday  
#15 Posted : Monday, March 4, 2013 8:54:24 PM(UTC)
bbday

Rank: Advanced Member

Groups: Registered
Joined: 11/4/2011(UTC)
Posts: 313

Thanks: 9 times
Was thanked: 36 time(s) in 28 post(s)
something like this

fps limiter
bbday  
#16 Posted : Monday, March 4, 2013 8:58:12 PM(UTC)
bbday

Rank: Advanced Member

Groups: Registered
Joined: 11/4/2011(UTC)
Posts: 313

Thanks: 9 times
Was thanked: 36 time(s) in 28 post(s)
Originally Posted by: ISeeDEDppl Go to Quoted Post
no,a delay in the onframe event would just make it lag / studder =)

Innerspace seems to do it on a slightly higher level somehow convincing the game that the renderer can only do x frames per sec (as if it were a hardware limitation or similar).


Stopwatch stopwatch = new Stopwatch();

long UpdateFPS = 50; // Use 25, 40 or 50 - GameUpdate per second (so You can stay with integer)
long MaxFPS = 120; // No need to comment
long MaxFrameSkip = 10; // Limit to GameUpdate loop before each RenderOneFrame()

long SkipUpdate = 1000 / UpdateFPS;
float SkipFrame = 1000f / MaxFPS;

long Loops = 0;
float LastFrame = 0;
float NextFrame = 0;

Loops = 0; // init value // ---MOD---

stopwatch.Start();

RenderRunning = true; // public,

while (RenderRunning) // do false to stop
{
// Loops = 0; // moved to ELSE block // ---MOD---

// changed "while" to "if" // ---MOD---
if (stopwatch.ElapsedMilliseconds > NextFrame && Loops < MaxFrameSkip) // ---MOD---
{
// put here game update function

// Application.DoEvents(); // ---MOD---
NextFrame += SkipUpdate;
Loops++;
}
else // ---MOD---
{ // ---MOD---
Loops = 0; // ---MOD---
switch (MaxFPS) // if MaxFPS is 0 then its unlimited
{
case 0:
root.RenderOneFrame();
break;
default:
if (stopwatch.Elapsed.TotalMilliseconds >= LastFrame + SkipFrame)
{
LastFrame = (float)stopwatch.Elapsed.TotalMilliseconds;
// Im not sure if float is better than double
// need to research if double->float convertion is better than using double instead of float

root.RenderOneFrame();

// put here graphic update if needed
}
break;
} // switch
} // ---MOD---

} // while

stopwatch.Reset();

http://www.ogre3d.org/ad...amp;t=13133&start=30
http://msdn.microsoft.co...agnostics.stopwatch.aspx
Edgar  
#17 Posted : Saturday, March 9, 2013 7:10:16 PM(UTC)
Edgar

Rank: Advanced Member

Groups: Developer, Registered
Joined: 2/19/2011(UTC)
Posts: 247

Thanks: 1 times
Was thanked: 45 time(s) in 31 post(s)
Originally Posted by: bbday Go to Quoted Post
small problem if i try use injector.exe and launch process (exefile.exe) application not responding (i tried also with admin privilege) but if i try with running process it working. (function Arguments TreeTest1.exe)


I fixed the domain manager so it returns to the injector after the assembly launches instead of waiting for the assembly to exit. I'm not sure why we even need that domain manager. The original code allowed you to reload your assembly without injecting again. While nice it's not necessary.

Edited by user Saturday, March 9, 2013 7:12:08 PM(UTC)  | Reason: Not specified

below  
#18 Posted : Wednesday, March 13, 2013 11:57:48 PM(UTC)
below

Rank: Advanced Member

Groups: Registered
Joined: 3/1/2011(UTC)
Posts: 65
Man

Thanks: 13 times
Was thanked: 3 time(s) in 3 post(s)
So I am getting it right ? The supporter version of DE has an innerspace replacement ? Like OOB ? No need for innerspace or coding myself...stuff?
Havn't installed Eve yet, just trying to figure out what I actually need right now to get the rumbling started.
bbday  
#19 Posted : Thursday, March 14, 2013 11:02:27 AM(UTC)
bbday

Rank: Advanced Member

Groups: Registered
Joined: 11/4/2011(UTC)
Posts: 313

Thanks: 9 times
Was thanked: 36 time(s) in 28 post(s)
Originally Posted by: below Go to Quoted Post
So I am getting it right ? The supporter version of DE has an innerspace replacement ? Like OOB ? No need for innerspace or coding myself...stuff?
Havn't installed Eve yet, just trying to figure out what I actually need right now to get the rumbling started.


There is a lot of work to doing before running with questor, it is also possible add something like rg inside and have something to special Boo hoo!
thanks 1 user thanked bbday for this useful post.
below on 3/14/2013(UTC)
bbday  
#20 Posted : Sunday, April 14, 2013 2:50:17 PM(UTC)
bbday

Rank: Advanced Member

Groups: Registered
Joined: 11/4/2011(UTC)
Posts: 313

Thanks: 9 times
Was thanked: 36 time(s) in 28 post(s)
Now i try to rebuild questor to use without innerspace with DomainManager.

Last De have some contromisure agaist ccp, but DomainManager/Injectionlib need something in that way it is possible include isxstealth or something like this?
Users browsing this topic
2 Pages12>
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.