[BETA] Custom Gui V0.8 - Update: 23/08/2007
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
- Posts: 184
- Joined: Thu, 9. Mar 06, 02:32
I see you're basically using the file system for mutex, sounds fine. Have you tested transparencies yet? Its probably not necessary, but it would help to integrate the overlay into the general X3 graphics system. I'm curious if XP can handle transparency overlay on what is essentially video, and whether quality is improved when running the transparent overlay in Vista. The transparency programs I currently use in XP display poorly when a video is playing underneath the transparent window.
-
- Posts: 119
- Joined: Tue, 15. Aug 06, 17:16
I *could* be wrong... but I too originally tot that Cycrow just adds a transparent child window over the 3D surface... which is tricky, coz it coudl mess up the message passing system (coz you are interacting with the top window)... though I admit that I'm not familiar with directx (sorry... opengl guy). But if he is actually hijacking the directx render cycle, then it's a different story, coz no new "window" is created. He is probably "drawing" directly onto the same directx surface the game is using (correct me if I'm wrong though,. I'm just speculating, as I do not quite know the all the possibilities with directx)
well, if this is the situation, then it avoided some of the very nasty issues with windows on "special" surfaces (like 3d, video feeds etc). The only cost involve here is the background processing required by the "other" app (not a prob if you have dual core, since x3 essentially only uses 1) and the script engine's processing of the files (which could be costly, but if not done at too high a freq and limit amount written, should be ok). and of coz, the cost of rendering the extra stuff per render cycle.
agree with cycrow that mutex is not needed. cross-process mutex is costly and troublesome and requires cooperation. unless the x3 binary is changed, doubt it can be done up front. If there is a fear of script wanting to write new data but the old data not consumed yet (which I agree *could* happen ... e.g. app reading the file and x3 script cannot write to it), a simple way to workaround (doesn't solve, and come to think of it, may not need to solve) is to emulate a cyclic buffer between producer-consumer style of relationship (x3 script produce, cycrow's app consume). basically, the x3 script can write to series of files by increasing a counter in the filename everytime (and cycle the number at some point). The app can then "consume" each file and deletes it and look for the next number etc. Assuming that the app can consume data faster than the x3 script can produce, even just 2-3 files may already be enough.
Of course, I haven't found the time to download it try (busy week.... and weekend...
) so I can only speculate atm.
well, if this is the situation, then it avoided some of the very nasty issues with windows on "special" surfaces (like 3d, video feeds etc). The only cost involve here is the background processing required by the "other" app (not a prob if you have dual core, since x3 essentially only uses 1) and the script engine's processing of the files (which could be costly, but if not done at too high a freq and limit amount written, should be ok). and of coz, the cost of rendering the extra stuff per render cycle.
agree with cycrow that mutex is not needed. cross-process mutex is costly and troublesome and requires cooperation. unless the x3 binary is changed, doubt it can be done up front. If there is a fear of script wanting to write new data but the old data not consumed yet (which I agree *could* happen ... e.g. app reading the file and x3 script cannot write to it), a simple way to workaround (doesn't solve, and come to think of it, may not need to solve) is to emulate a cyclic buffer between producer-consumer style of relationship (x3 script produce, cycrow's app consume). basically, the x3 script can write to series of files by increasing a counter in the filename everytime (and cycle the number at some point). The app can then "consume" each file and deletes it and look for the next number etc. Assuming that the app can consume data faster than the x3 script can produce, even just 2-3 files may already be enough.
Of course, I haven't found the time to download it try (busy week.... and weekend...

-
- Moderator (Script&Mod)
- Posts: 22421
- Joined: Sun, 14. Nov 04, 23:26
the rendering process in directx is simlar to that in opengl.
like a story you have a beginning, middle and end. The beginning basiclly sets up the back buffer ready for rendering. The middle adds all the objects to be rendered, then the end finishes th back buffer and presents it to screen.
what this software does, is emulate the DirectX dll. So instead of calling the functions from the directx dll, it calls it from mine, which acts as a proxy between the game and the proper dll.
all functions are simply passed from 1 to another.
what i do, is add stuff before the endscene call
Original
Gui
so its not just displaying a window over the top, it is part of the render cycle.
and it uses the same direct3d object to render that the game uses and renders onto the same screen
like a story you have a beginning, middle and end. The beginning basiclly sets up the back buffer ready for rendering. The middle adds all the objects to be rendered, then the end finishes th back buffer and presents it to screen.
what this software does, is emulate the DirectX dll. So instead of calling the functions from the directx dll, it calls it from mine, which acts as a proxy between the game and the proper dll.
all functions are simply passed from 1 to another.
what i do, is add stuff before the endscene call
Original
Code: Select all
StartScene
RenderObject1
RenderObject2
RenderObject3
EndScene
Code: Select all
StartScene
RenderObject1
RenderObject2
RenderObject3
RenderGui
EndScene
and it uses the same direct3d object to render that the game uses and renders onto the same screen
-
- Posts: 184
- Joined: Thu, 9. Mar 06, 02:32
-
- Moderator (Script&Mod)
- Posts: 22421
- Joined: Sun, 14. Nov 04, 23:26
-
- Posts: 416
- Joined: Mon, 12. Feb 07, 21:58
-
- Moderator (Script&Mod)
- Posts: 22421
- Joined: Sun, 14. Nov 04, 23:26
New Update, 0.5
- Added Input Block Command
- Added Mouse Control
- Added Rendering of Cursor
- Added Animation Sequences for Sprits
- Animation Block Commands: AnimimationStop, AnimimationRepear, Frame, Animation
- Added CloseOn Event Command block
- Close gui on mouse button
- Added Mouse Over Event
- Change Text Colour
- Added sound
- Added prepend/append text command
- Added Launcher Argument pass through
ChemODun, if you send the arguments to the lancher the same as you do for the x3.exe then it should work
2 new exampels included
Existing:
Example1: Basic display, same as the screen shot, shows text and a texture
Example2: Shows no border, and use of animated sprites
Example3: Shows how to use a custom border, and varibles
Example4: Shows animation sequences
New:
Example5: Shows the new animation sequences for sprites, using sounds and Close Events.
Example6: Menu System, shows use of mouse cursor and the MouseOver event
- Added Input Block Command
- Added Mouse Control
- Added Rendering of Cursor
- Added Animation Sequences for Sprits
- Animation Block Commands: AnimimationStop, AnimimationRepear, Frame, Animation
- Added CloseOn Event Command block
- Close gui on mouse button
- Added Mouse Over Event
- Change Text Colour
- Added sound
- Added prepend/append text command
- Added Launcher Argument pass through
ChemODun, if you send the arguments to the lancher the same as you do for the x3.exe then it should work
2 new exampels included
Existing:
Example1: Basic display, same as the screen shot, shows text and a texture
Example2: Shows no border, and use of animated sprites
Example3: Shows how to use a custom border, and varibles
Example4: Shows animation sequences
New:
Example5: Shows the new animation sequences for sprites, using sounds and Close Events.
Example6: Menu System, shows use of mouse cursor and the MouseOver event
-
- Moderator (Script&Mod)
- Posts: 22421
- Joined: Sun, 14. Nov 04, 23:26
-
- Posts: 1141
- Joined: Sun, 7. May 06, 03:53
-
- Posts: 184
- Joined: Thu, 9. Mar 06, 02:32
I was thinking about this today (work is so boring!)
It sounds like this overlay could be a great tool for storyline stuff. For example, there is currently the CCM (com chatter framework) which allows the player to "listen" to com chatter in order to find missions. Using an overlay, the com chatter process could be made much more realistic (by game standards). Instead of sitting in space waiting for a message to arrive, CCM could instead flash an overlay box in the corner of the screen, possibly even with an "incoming message" notification. If done well, this could include video or at least still images of the people involved in the "com chatter" and it could even allow for voice-overs. Further, it could be running all the time, not just when the player purposefully activates the command. In this way, the universe would come alive as the player would be engaged by the game to act.
Incorporating a "story mode" editor in your overlay program might streamline the creating of story elements, allowing people to easily piece together images, text, audio, and have these elements hooked into game events.
Depending on what information this program can read about the game, it might be possible to create customizable interactive informational menus. For example, a person with a lot of factories could customize a menu to display statistics for factory production and profit in real time. In addition, general game notifications could be greatly improved. Instead of just receiving a message that a ship is under attack, an overlay could also display a "warning" message on the screen, and so on. The possibilities are very exciting.
Oh! As far as I know X3 is basically single threaded, so multi-core systems don't see much benefit. Offloading script controls to an external program would allow the computer make use of multi-core environments. For example, in game scripts would only need to poll and write variables while calculations would be sourced out to a secondary program. Everything done in the secondary program (presumably) gets handed to a second processing unit, thus reducing the load on the processor handling the game and improving performance.
It sounds like this overlay could be a great tool for storyline stuff. For example, there is currently the CCM (com chatter framework) which allows the player to "listen" to com chatter in order to find missions. Using an overlay, the com chatter process could be made much more realistic (by game standards). Instead of sitting in space waiting for a message to arrive, CCM could instead flash an overlay box in the corner of the screen, possibly even with an "incoming message" notification. If done well, this could include video or at least still images of the people involved in the "com chatter" and it could even allow for voice-overs. Further, it could be running all the time, not just when the player purposefully activates the command. In this way, the universe would come alive as the player would be engaged by the game to act.
Incorporating a "story mode" editor in your overlay program might streamline the creating of story elements, allowing people to easily piece together images, text, audio, and have these elements hooked into game events.
Depending on what information this program can read about the game, it might be possible to create customizable interactive informational menus. For example, a person with a lot of factories could customize a menu to display statistics for factory production and profit in real time. In addition, general game notifications could be greatly improved. Instead of just receiving a message that a ship is under attack, an overlay could also display a "warning" message on the screen, and so on. The possibilities are very exciting.
Oh! As far as I know X3 is basically single threaded, so multi-core systems don't see much benefit. Offloading script controls to an external program would allow the computer make use of multi-core environments. For example, in game scripts would only need to poll and write variables while calculations would be sourced out to a secondary program. Everything done in the secondary program (presumably) gets handed to a second processing unit, thus reducing the load on the processor handling the game and improving performance.
-
- Posts: 1874
- Joined: Thu, 1. Mar 07, 09:21
Well seeing as it allows playing of sound files maybe rather than a message come up, if a ship is under attack(desperate trader in need) the video coms may be down and so people could record their vocals, aplly a bit of software distortion, filters and any other effects and there you go! A message on your comms!
-
- Moderator (Script&Mod)
- Posts: 22421
- Joined: Sun, 14. Nov 04, 23:26
well most of what you said is already possible with the current version.
one of the things im planning on making is a custom comms menu, so when you comm a ship, it uses the Custom Gui to display the options along with a portrait of the pilot.
popping up messages is easy.
you can just run scripts in the background that displays the message gui when ever you receive a new message, so it doesn't have to run of player commands.
it would be possible to make it work like MSN, where you get a message notification pop up and you click on it to display the message.
currently it only renders in the center of the screen, but thats only for the demos, it will eventualyl be able to be rendered anywhere
one of the things im planning on making is a custom comms menu, so when you comm a ship, it uses the Custom Gui to display the options along with a portrait of the pilot.
popping up messages is easy.
you can just run scripts in the background that displays the message gui when ever you receive a new message, so it doesn't have to run of player commands.
it would be possible to make it work like MSN, where you get a message notification pop up and you click on it to display the message.
currently it only renders in the center of the screen, but thats only for the demos, it will eventualyl be able to be rendered anywhere
-
- Posts: 1141
- Joined: Sun, 7. May 06, 03:53
i think he ment (least for part of it) is that when a message comes in instead of the simple "incomming message" voice you get the voice but at same time you see a little vid window with a rotating icon (mail icon or somthin to that effect) with words "incomming message" being displayed...now that would be neat to do...
Teladi Next Minute Shipping®
-
- Posts: 3029
- Joined: Fri, 18. Nov 05, 00:41
This looks so powerful Cycrow. The first thing that pops to mind is replacing (Overlaying) the race portraits with animated stills of much better models. I am planning on creating some models of the races in Zbrush, would you be interested in seeing them if I did?
Would it be possible to link your gui to the games default one, so when you comm something it overlays the new ones over the top, essentially replacing them?
The other thing that pops to mind (Stated above) is the idea to have things like your current credits/time etc displayed on screen. That would be very handy as it will limit the amount of menu switching we need to do.
Would it be possible to link your gui to the games default one, so when you comm something it overlays the new ones over the top, essentially replacing them?
The other thing that pops to mind (Stated above) is the idea to have things like your current credits/time etc displayed on screen. That would be very handy as it will limit the amount of menu switching we need to do.
-
- Posts: 7150
- Joined: Fri, 8. Apr 05, 19:09
You're talking about running it on an extern program. I don't understand much about programming so forgive me if I'm asking something stupid. ^^
Is it possible for such a program to recieve and send data over the internet and display it in real time in X3?
EDIT: I don't mean data about other players and where they are etc. like a multiplayer but more like exchanging statistics or similiar things.
Is it possible for such a program to recieve and send data over the internet and display it in real time in X3?
EDIT: I don't mean data about other players and where they are etc. like a multiplayer but more like exchanging statistics or similiar things.