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

Topics - Nickenstien

#1
Advanced Technical Forum / Shader 1.4
Sat 18/07/2009 00:46:00
Hi. :)

We are getting some error reports from people trying to play TGP (mainly on laptops) with D3D enabled.

The error is:


There was a problem initializing graphics mode 800 x 600 (32-bit).
(Problem: 'Graphics card does not support Pixel Shader 1.4')
Try to correct the problem, or seek help from AGS homepage.


Is there a specific need for shader 1.4 support? As most cards support shader 1.1 and this could be making any AGS game fail to work with D3D on lots of older cards. Cards which should be able to handle AGS/TGP just fine.

Strangely, this error was generated by a laptop with shader 2.0 support.

Cheers,
Nick

#2
Hi.

I am having a slight problem with DLL calls.

For the most part my DLL is successfully called every frame, however there are instances where it seems that on certain frames, DLL's are not called by the game/AGS-Engine.

This appears to happen when different dialogue options are highlighted with the mouse.

EG: When the user has a set of dialogue choices, moving the cursor over them causes them to highlight/change-colour. At this very instant it seems that DLLs are not called for one frame.

This is causing the Direct3D visual effects that I am overlaying to not be rendered during that frame, so they briefly disappear.

This also happens for one frame when a conversation is initiated. So when clicking on a character with a speech-bubble icon, I get a single frame flash of my effects not being rendered.

Specifically, the following events do not occur during the frame in question:

AGSE_PRESCREENDRAW
AGSE_PREGUIDRAW
AGSE_POSTSCREENDRAW

It is probable that no events are passed to the DLL during that frame, although these are the ones I am using to know when to render specific layers of my effects.

Are there any known workarounds for this?

Or maybe something I can do to ensure that the events are passed to my DLL every-frame, regardless of any special states that the AGS-Engine might be processing, which would normally cause the DLL-events to be skipped?

Cheers,
Nick
#3
Advanced Technical Forum / Script import bug
Mon 24/11/2008 19:06:52
Hi there. :)

I have created some scripts that I wish to use in another project, however the import-script facility only allows for the importing of the old-style Script-modules (*.scm) files.

The scripts I wish to import are *.ash & *.asc, but the import dialogue won't allow this. Even if I force the dialogue to display and load *.ash/*.asc files it reports a load error, as it wants *.scm files.

The create-new-scripts option will generate blank *.asc/*.ash files, whilst the import-script option only allows *.scm files. Also, the help documentation states that *.scm is the old way, so I am guessing that the code for the script-importer-dialogue requires an update to accept the newer *.asc/*.ash files.

I can work around this by creating new blank scripts within the second project, and then copy-pasting the code into them, but I thought that you might want to know that the script-importer is a bit broke (or rather, is out-of-sync with the new *.asc/*.ash way of working). However this work-around is getting very fiddly/cumbersome, as I am working over-the-net with somebody else. We are juggling quite a lot of scripts now and this is starting to make our script-sharing get a little messy/complicated.

I believe that I am using the latest Build (3.0.2.44 - June 2008).

Cheers,
Nick
#4
Hi :)

The draw order of some things seems to have changed since V2.7 (or I made some kind of error back then, and have only just spotted it when using latest AGS3.02.44 build. Or maybe the DLL template project I was using with 2.7 is now out of sync with the latest AGS build (integer constants for Pre/Post/Sprite/Gui draw interupts/events have possibly changed values since then)?).

All of my 'bits' now get rendered before the game-sprites do, so I am assuming that the following values defined in the header file:

AGSE_PREGUIDRAW
&
AGSE_POSTSCREENDRAW

Have since changed to use new values, and I am now using an out-of-date template, which is no longer compatible with AGS3.02.44.



So to rectify this and update my stuff to be compatible with the latest AGS release, I am trying to grab the latest Plug-in template project and rebuild all of my DLL code into that. However the file can't be extracted and reports a corruption error.
(Error: "The archive is either an unkown format or the file is damaged").

file : http://www.adventuregamestudio.co.uk/agsplugin119.zip

EDIT - Some extra info: I have tried with WinZip, WinRAR & 7-Zip. (All to no avail.)

Maybe it's just the server having a bad day. ;) 
#5
Hi. :)

I am having a problem with the RepExec functions in room scripts.

Basically they cease to be called when anything is happening that hides the player's cursor. So during a scripted animation or whenever dialogue is being displayed, RepExec fails to be called.

This is problematic as I am developing and using a plug-in to draw full screen overlays, updating and adding them to my plug-in drawlist during RepExec. So they disappear whenever the user's cursor does.

I am using the latest version of the AGS editor.

Any ideas/thoughts would be much appreciated.

Cheers,
nick
#6
Hello  :)

Is there any way that I can generate Mouse-move and Mouse-Click events from my plug-in ?

I have created a plug-in that launches a Direct3D window (or full screen) and Hides the AGS window.

This lets me (or anyone using the plug-in) to run the game in a window of any resolution or a full-screen resolution that AGS does not support itself. It also lets me do all manner of lovely hardware accelarated graphical effects in the game.

However, As I am using my window rather than AGS' , I need to be able to move the AGS cursor and generate click events from within my plug-in code or I can't interact with the game (rendering the system useless)  :(  .

Could some functionality be provided to get a handle to DirectInput   (In the same way that you can access DirectDraw2 or DirectSound) ?

Or could some SetMouseMove(x, y)   SetMousePos(x, y)  &  SetMouseClick(ButtonID)    type functions be added  ?


Cheers,
            Nick.
#7
Hi  ;)

Does anybody know if there is a way to tell AGS to to set the alpha bit in a pixel to 255 when that pixel was rendered, rather than leaving the alpha byte empty when in 32bit colour mode ?

I am attempting to copy each layer of the AGS display out onto separate textures so that I can do post-render effects on each of the layers individualy.

So, for instance I let AGS render the background, I then memcpy the scanlines from AGS frame buffer into my textures, and then memset the whole AGS framebuffer area to 0's. This is to make AGS then render the Sprites onto a clean surface. I can then repeat this procedure once the sprites are rendered, then the GUI and finaly the mouse cursor, leaving me with a seperate texture for each layer, that I can do my effects with and finaly render them myself.

However, when AGS goes on to render the sprites, it will write the RGB values into its frame-buffer, but it will leave the 4th byte of every pixel as 0 (the alpha value). This means when I memcpy the scanlines for the sprites they have 0 alpha. I need my spritelayer to have alpha of 0 where nothing was drawn (the memset after the background does this), however I also need the pixels that were drawn by the sprites to have an alpha value of 255.

I can check myself if RGB exist and then set the alpha-byte myselfe, otherwise leave it as 0, however doing this means i have to check for RGB in every pixel and copy it accordingly, meaning that I cant memcopy entire scanlines which makes the whole thing too slow to be of any use.

But if the Alpha bit was filled by AGS, then I could memcpy every scanline in an acceptable time.

Any ideas would be greatly appreciated.

Cheers,
             Nick.


#8
Hi folks  ;)

I was wonering if there is any way to stop your game from hibernating/pausing when its actual window loses focus or is minimised ?

I would like to achieve this as I am currently developing a special effects plug-in for AGS, but I need to use a different window for the interface so that I am not limited to using only DirectDraw2.  But obviously when any clicks occur on my 'new' window this causes the main AGS window to loose focus, and hence the AGS engine is suspended. This in turn causes my second window to cease recieving image data from AGS.

Does anybody know of any way around this ?

Cheers,
            Nick
SMF spam blocked by CleanTalk