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 - Crimson Wizard

#11321
I got your game, and I see that it is SeekMP3PosMillis(0) that causes this.
This is a bit complicated, and I think that's actually a bug introduced when new Audio system was created (in 3.2).


//--------------------------------------------
EDIT: just to clarify, what you sent me is all the files that you actually run the game with? The crash is related to missing VOX file.
Have you saved these games with the VOX and tried to restore without one?
//--------------------------------------------


Thing is that saved game remembers a currently playing music, and tries to start it on load. But there's no VOX, so it can't play.
At the same time, there's a certain internal value, that tells engine that the music track of certain type WAS present at the time of saving the game. Although sound clip is missing, this value is not reset.
When SeekMP3PosMillis() is called, engine checks that value, and thinks that there's a music track of certain format playing, but does not actually check if anything is loaded in the audio channel. So it then tries to work with non-existing channel, and crashes due accessing invalid memory.

How to deal with it? Normally, this should be fixed in the engine (which I might do).
Meanwhile, add IsMusicPlaying() check before SeekMP3PosMillis() call. Thankfully, IsMusicPlaying() makes sufficient checks and recognizes when the music is not loaded; it also resets the aforementioned value, so any subsequent music-related functions will work correctly.

Actually you may just write:
Code: ags

IsMusicPlaying();
SeekMP3PosMillis (0);

Yes, without even "if" condition, because, as I said, it will bring game state to consistency simply by being called. :)
#11322
Quote from: Alan v.Drake on Sat 21/09/2013 22:10:05
Sorry for the late reply Crimson,
I've just commited the last two edits I did a while ago. I don't seem to get any error, let me know if something explodes.

That's a bit strange, I got two compiler errors:
1. new Character_ChangeRoom function with 5 params is not visible in couple of files, so I had to declare it in acruntim.h
2. new_room_loop is not visible at Character_ChangeRoom, so I had to put "extern int new_room_loop;" before function implementation.
#11323
I kinda feel myself an idiot now, because all those formulas were in Calin Leafshade's AGSBlend plugin.
The advantage of these are that they process all pixels in one loop, while Allegro drawing calls a function for every pixel, which may affect perfomance in the long run (ironically, the Allegro's loop itself is written is assembler).
Slight disadvantage is that Calin's are not optimized in the same way as Allegro's algorythms are (for instance he multiplies/divides on 255, while there's a way to work with 256 (which should be converted to bitwise shift by compiler, which is way faster) while loosing half-of-percent in color precision (which is not a big deal with 32-bit colors and AA anyway).

I am now thinking about implementing all those nice Calin's blending modes, maybe in the next subrelease, like 3.3.1 or something (yeah I still hope we can make 3.3.0 a release candidate, heh).
#11324
The Rumpus Room / Re: *Guess the Movie Title*
Sat 21/09/2013 16:14:58
Quote from: Abisso on Sat 21/09/2013 15:53:11
Wow, that was fast. I took the screenshot by myself and I believe it summarizes the movie very well
Yes, pretty well; very symbolic image, in a way, too.


Next, might be pretty obscure, but, hell, I so loved those paintings (hence big screenshot :))!
Also the story is classy and may be used as a base for adventure game.


#11325
The Rumpus Room / Re: *Guess the Movie Title*
Sat 21/09/2013 15:47:13
I think this is "Gongdong gyeongbi guyeok JSA" aka "J.S.A.: Joint Security Area".
#11326
Yes, this problem persists for a very long time now.
(I know you had problems accessing bug tracker for some reason, but I'll give this just in case: http://www.adventuregamestudio.co.uk/forums/index.php?issue=378.0
)

I think JJS found a way to fix this, but I forgot to check how it works. I will speak with JJS about this.
#11327
Regarding speed issues: I must apologize, but I don't think I will be able to do something quick with this anyway. Rendering speed problem must be analyzed to see which operations cause slowdowns. That may be AGS drawing engine, but at the same time it may be a non-optimized script.
Right now I am just trying to focus on limited number of things, to be able to finish something...

PS. Sprite cash size only affects faster work with large animations, not the drawing itself.
PPS. Mehrdad, regarding new setup, I did not mean you must program that yourself, you may as well try people on programming forums, and AGS forum too; maybe someone will find a way to make a simple customizable setup program for AGS.
#11328
EIP and crash dump are unusable for me, because they could be used exclusively with original 3.2.1 code & debug files created by CJ (crash dump must match engine's timestamp).

"program pointer = 6" does not tell much either, it means that the engine went into updating events (processing on_event function).
"gtags" are ids of the last updated gui and gui control, although it is impossible to tell if these guis are currently updated, or were updated some time in the past.

I can check EXE under debugger of course. Does it reproduce all the time?
#11329
I think (judging on what I saw in the engine code) that the highlight colour is set to the gui's foreground color (if you set a custom gui for dialog options), but for some reason this works only for "QFG4-style" (which is fullscreen dialog, I suppose).

In all other cases a hard-coded color is used. (wtf)
#11330
1.
Spoiler
Sea
[close]
3.
Spoiler
Darkness
[close]
#11331
I am working to fix this now: http://www.adventuregamestudio.co.uk/forums/index.php?issue=424.0

Is this the same issue? I had problems to precisely reproduce this in 3.2.1, instead I am getting a fully-transparent "hole" in the surface where the drawn sprite should be.
I guess I should try setting transparency level > 0?
#11332
Quote from: Mehrdad on Fri 20/09/2013 07:07:32
Crimson , Can you make an editable winsetup too?

No, sorry.
I mean, I probably could (in theory), but it will be unrealistic for me to find time for this anytime soon (to do this properly).

If you need a unique-looking setup program, it is not really difficult to make for anyone, who can program GUI applications ( = almost anyone, who can program ). Also this does not require knowledge of AGS, at all. One should only know the configuration format and commands you can write there (which is pretty simple).

There was a discussion... (heh, there seem to be a discussion for everything):
http://www.adventuregamestudio.co.uk/forums/index.php?topic=48097.0
#11333
I wonder if Linux allows to create windows > desktop size. Or if there's a way to know if its graphic system permits this.
This matters if we add the preventive check before initializing graphics mode (which ports should care?).
#11334
Quote from: Ali on Thu 19/09/2013 20:38:20
Sorry, I may not have been clear. The test game is 1280x720. It works fine in windowed mode when my desktop resolution is 1920x1080 or 1600x900. But if the desktop resolution is 1280x720 or below, the game won't run in windowed mode: Problem: 'Failed to create Direct3D Device: 0x8876086C'

Ah, I see now.
I think that's because Windows does not let it create a window of that size (it should be slightly larger than 1280x720 to put borders and title bar). And the engine can't detect such problem yet.
With the build you're having you can scale game down by manually configuring it (this will be supported by WinSetup too, I was working on that recently).
Open acsetup.cfg in notepad (or whatever) and put this under "[misc]" section:
Code: text

[misc]
renderstyle=2
screenwidth=640
screenheight=360

(This is an example, you may use different screen size)

Quote from: Ali on Thu 19/09/2013 20:38:20
Mehrdad's right that the default dialogs (Save, Restore, Quit) don't display in the right place at 1280x720. But I don't have any problem getting a custom GUI to centre in the screen.
Yes, it looks like all built-in dialogs have hard-coded coordinates... I'll fix that.
#11335
Quote from: cat on Thu 19/09/2013 20:20:52
Where do I find the additional logfile that should be written with the lastest AGS version?
Should be in "my documents/ags/agsnative.log" or "user/documents/ags/agsnative.log" depending on Windows version.

But I think I found what's causing this.
#11336
It looks like I finally reproduced the crash on room load!

Steps:
1. Open a room with some existing objects for editing.
2. Create a new object.
3. Save room.
4. Open different room (or build a game).
5. Crash.
#11337
Alright, let's continue here: http://www.adventuregamestudio.co.uk/forums/index.php?topic=49014.0
All this is not related to 3.4.0 Alpha yet. ;)
#11338
Feedback made in other thread:
Quote from: Ali on Thu 19/09/2013 14:38:09
The biggest problem I encountered was the graphics failing to initialise when running in windowed mode with the resolution set to 1280x720 or less. Would I be right in thinking recent developments should make it possible to scale the window down to fit lower resolutions?
It should, and IIRC I tested 1280x720 games in windowed mode. To clarify, what is your game's resolution and how exactly are you changing display resolution?

Quote from: Ali on Thu 19/09/2013 14:38:09
Apart from that, the most notable problem was tearing in full screen. This was very, very distracting. I think VSync for D3D would be essential for decent looking high-res. Is that a realistic possibility? Weirdly, I didn't see any tearing in windowed mode (even at resolutions where the window virtually filled the screen).
Quote from: KNOX on Thu 19/09/2013 17:44:52
QuoteI think VSync for D3D would be essential for decent looking high-res. Is that a realistic possibility
If Im not mistaken the Draconian version had a lot D3D stuff fixed , vsync and character walking/scaling, right?

Yes, VSync seem to be implemented in Draconian. I started exploring Alan's code to see what may be taken to "official" build.

Quote from: Ali on Thu 19/09/2013 14:38:09
Apart from wanting to see this develop further, it would be useful to add an export option for walkable areas / regions and hotspots to make scaling up an existing game easier. I did this using CRM tools and Photoshop for scaling. But CRM tools doesn't work properly for higher resolutions and it takes a bit of fiddling.
Someone should do this, but not me, I am too busy to even think about that. (roll)

Quote from: Mehrdad on Thu 19/09/2013 15:33:44
on 1280x720:
I can't Quit game GUI center on screen.i seems doesn't fit.
Do you mean one of your guis don't fit, or you are calling standart QuitGame dialog?

I will look into this soon.
#11339
UPD: this was an experimental version. For more recent (and "more official") 3.4.0 version check this thread: http://www.adventuregamestudio.co.uk/forums/index.php?topic=51050.0
//---------------------------------------------------------------------------------



Since people keep asking about this , and I just happened to make a test build, here it is.
This is early work in progress. While I am generally optimistic about the feature itself, this build, in particular, is rather raw. That's why I do not publish source code. I will be rewriting it later anyway. In the end, I hope, custom resolution will make into one of the future "official" builds.

Version of 23 June 2014, updated to 3.3.0 update1.
http://www.mediafire.com/download/a1j4yu57gi46w2r/CustomRes_3_3_0_update1.7z
No-MP3 version of the engine:
http://www.mediafire.com/download/ntbvu97zaef0utv/CustomRes_3_3_0_update1_nomp3.7z
The complete source code contained in my personal branch here:
https://github.com/ivan-mogilko/ags-refactoring/tree/dirty_custom_resolutions


Preliminary version based on 3.3.1 alpha of 28 June 2014
(Warning: may be unstable)
(Includes Vertical Sync option for D3D9 driver in winsetup)
http://www.mediafire.com/download/i7bfqk5196azqhb/CustomRes_3_3_1_alpha1.7z
No-MP3 version of the engine:
http://www.mediafire.com/download/cac7brkaxz4f8dq/CustomRes_3_3_1_alpha1_nomp3.7z
The complete source code contained in my personal branch here:
https://github.com/ivan-mogilko/ags-refactoring/tree/dirty_custom_resolutions_331



Previous versions (some of them buggy):
Spoiler

Version of 6 February 2014, updated to 3.3.0 RC and added new winsetup:
http://www.mediafire.com/download/d4vz54sb4t33tma/CustomRes_3_3_0_RC.7z
No-MP3 version of the engine:
http://www.mediafire.com/download/aqda3dyndf8klht/CustomRes_3_3_0_RC_nomp3.7z

//---------------------------------------------------------------------------------------------

Version of 27 December 2013, which fixes sprite & font scaling:
http://www.mediafire.com/download/31qq2883hg6i5c5/AGS_CustomRes_Beta10_fix_27dec2013.7z
Also, source code in the form of patches (apply on top of "feature_display_resolution branch in ags repository):
http://www.mediafire.com/download/pdmzddcczl2afai/patch_temp_customres_beta10.7z

//---------------------------------------------------------------------------------------------

Version of 20th November 2013 (based on 3.3.0 beta 10, allows any custom game resolution):
http://www.mediafire.com/download/6yk5jmo1xlurfah/CustomRes_Beta10.7z
See info here: http://www.adventuregamestudio.co.uk/forums/index.php?topic=49014.msg636473535#msg636473535

//---------------------------------------------------------------------------------------------

Version of 15th September 2013 (based on 3.3.0 beta 7, adds 1280x720 resolution):
http://www.mediafire.com/download/z52tkkuynk8z3sb/AGS_3_3_0_customres_test.zip
Adds only one new 1280x720 resolution.
Compatibility: this build can load game projects from 3.3.0 beta 7 and lower (e.g. 3.2.1).
1280x720 projects created with this build CANNOT be opened in 3.3.0 beta. Projects of other resolutions - may be.
WARNING! not thoroughly tested. Code-wise it potentially supports any resolution, but I did not have time to make a proper setup yet, so you can only set 1280x720 in the project settings. Also WinSetup displays incorrect information on resolution (this should not have any impact on gameplay).
[close]
#11340
General Discussion / Re: Graduation!
Thu 19/09/2013 17:44:57
Is this Warthogs? :=
SMF spam blocked by CleanTalk