Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - goodohman

#1

Yes dear CJ,

I am trying to have a video played on part of the screen, on an object, etc... somewhat similar to what scotch made with theoraplayer which doesn't work well and is quite limited i think.

Could we collaborate to make something here? could you nodge scotch for that matter as well?

THANKS!!!
#2

tzachs, sorry for the long delay!

Your example is working alright, but the return type is actually derived from using the:

private static TOut CSRun<TIn, TOut>(TIn value, string className)

method (CSRunStringToString...)

Could you PLEASE verify a pure in-code string return type and let me know?

BIG THANKS!
#3

Hello CJ! It's a great honor to meet your maker :)
Apologize for the long delay, I have not been here (or there) for some time.

1. API - you'll probably want to add AudioChannel and Attributes as well?

2. I thouhgt that it would return null with any unregistered object

3. How would you use then a class method in the code?

4. The internal names used in the editor for the objects/hotspots/etc...

Thanks!
#4

I hope I don't become synonym with complaints :O

but...

Please note that when selecting a character and dragging him to trigger a room leave,
The game will crash because some of the vars in godmodule are not updated I think

Big Thanks for your great contribution!
#5

Thanks Tzachs!

The C# Runner link appears to be dead, could you repost?
Alternatively, could you give me the short version answer?

Thanks!!

p.s.
any idea on how to access the new ags features from the plugin? (i.e. new audio stuff and attributes)
#6

Hi there,

I'm trying to return a String from a function.

First I just tried to return a C# string - kaboom... it crashed
Then I thought wait.. return a CreateScriptString(mystring) - kaboom...
Then I thought wait... the IAGSEngine and agspluginPINVOKE might be wrong with the return type,
so I've changed them from "string" to "IntPtr" and still - kaboom...
I thought maybe "IntPtr" is not "real" enough as a const char*, so I've changed all to "void*" (in usafe context),
and guess what? yeah... - kaboom

so.. smiley or anybody else.. PLEAAAASSSEEEE does someone knows how to return a string from c# ?

Thanks!!!!!!!!!!!!!!
#7
Thanks monkey,

Do you mean that extender functions can also be taken?
Then how do you use them in this way???

The prime reason for using the names...
I was thinking of going away from AGS scripting at all, and using C# plugin to script ALL the game (much like the XAGE dude was suggesting for his XAGE Editor). Then, I would only call a HandleMyAction() function in the plugin within key events in the AGS game, actually most of them can be called from the unhandled_event event, and the others can be called by RequestEventHook() within the plugin itself.
This way, I can have ALL the game scripted inside the DLL with all the ease and benefits of C# and .NET
So, to keep synchronization between the AGS objects, I didn't want to have a conversion table, but rather call the objects by their name.
One good possibility is to use .NET's Dictionary<String, AGSxxx> then for example, upon a room enter event,
the AGSObjects, hotspots,etc... is being "filled" in the current dictionary, and to access an object I just use a string indexing, for example AGSObjects["oDoorKey"] which returns a reference to that object.
So I wanted to have the names so I can "connect" them to the right object when doing the loop on the engine->GetNumObjects()... but since there are no names within the objects, I thought that actually I can enumerate all the objects from WITHIN the AGS script, then I can have all the names within the plugin.
I hope my explanation makes sense :)

btw:
One interesting "side effect" of using this approach is, that by changing the game's "logic" dll, you can actually change all how the game evolves (all the story line) while still keeping all the "materials" (graphics, rooms, audio, etc...)

#8
Hello CJ, I hope you'll have the time for this.

1. The API needs exposing of the new Audio objects and Attributes (anything else?)

2. BTW I've noticed that GetManagedObjectAddressByKey() never seem to return NULL, only addresses with 8 bytes increments.

3. for GetScriptFunctionAddress() - which f() are considered "script functions"? those which are not instantiated object methods? like Room.foo() and Screen.foo() ???

4. Could you PLEASE expose the managed objects' names?

Thanks!

Oh yes... in the risk that I might get kicked out - is there any way to remove a rectangle from being updated in your OnPaint?
or is it an absolute necessity to actually edit the raw BITMAP and that's it? (re the DirectShow flickering problem)

Thank you some more!


#9

THANK YOU!

Now it works flawlessly!!!
#10

Thank you for the answer Calin!
#11
Scotch,
Could you please take a look and help me here?

Thanks!!!
#12

oopsy daisy..

I've changed the line, but exactly the same AGS runtime error.
#13
Calin,
Sorry for my ignorance..
What is this plugin for?

Thanks!
#14
Advanced Technical Forum / DirectShow plugin
Tue 16/11/2010 14:16:09
Hello CJ, pumaman, and/or any other people that can help with this.
I have this plugin that does a DirectShow video playback (currently using VMR9) and is very nice and versatile.
The problem is that when the video rectangle is located on the game rectangle, there is flickering because of the "fight" between the video's onpaint and the game's onpaint event.
I *THINK* the solution is something along the lines of what's suggested in the DirectShow docs, i.e., in the game's onpaint event, the painting should be done for the game's client area MINUS the video's client rectangle.
The issue is, how do I access the game's onpaint event?
It seems that the exposed events (pre/final/etc...) are EXTENSIONS of the paint event.
Is there another way? (constantly bringing the video to the foreground is not an acceptable solution)

Any idea? please please I really want us to have this plugin.

Thanks!

p.s.
Maybe the theoraplayer guy can help?
#15
Thanks Edmundito.

The Display() is: gui Y=219, screen H=600

(and the GUI comes all squashed and small on the left middle of the room, just as it is in the Editor)

The error: AGS had a problem running your game [bla bla standard] ..
the actual yellow line: GUI.Y co-ordinates specified are out of range.

The games is 800x600 32bit color. My display res is 1440x900 native.

Thanks again!
#16
Edmundito! BRAVISSIMO MOLTO FORTE!!!

Just tell me why
gGodModeModule.Y = System.ScreenHeight - 12;
complains that the coordinates are out of range?

Thanks!



#17

Thanks Khris. This is what I finally did, some variant of HandleCurrentRoomBackground()

btw, on another issue: is there a way to know whether the View is currently locked?
(currently I just use my own wrapper function for that purpose, setting a global boolean)
#18
(btw: I'm using build 103)
#19
I found a workaround that works here.
I still wish it would be fixed though...

Thanks!
#20

CJ, pumaman, every man is a god, every man is truly free,
but,
what about the walkbehinds?
They make me C R A Z Y
The baseline seems never to be updated properly!

PLEAAASSSEEEEEEE FIX THIS and post an editor update, or tell me the right magical sequence to make it work.

THANKS!
SMF spam blocked by CleanTalk