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 - monkey0506

#21
I'm working on getting the game data file to build from the editor's managed code instead of from the native assembly, as part of supporting targeting multiple platforms from the editor (instead of just Windows). As I've gotten into the bulk of the code over the last couple days, and particularly the last several hours, I've come across several constant values that may appear in multiple places. Some of these are being moved to managed code, while others might remain in the native code.

What is the best way to make sure that the code duplication is kept to a minimum in these cases? In particular I'm concerned that a constant may be updated in one place but not another. For now I've been duplicating them in as narrow a scope as possible (until I can finish rewriting/porting the code and make sure it's at least functional), but it would be great to have a sense of direction in this.
#22
I'm having a bit of a problem tracking down why my code to build the game's data file from C# is failing to produce a valid EXE. I've combed over the native C++ implementation and compared it to my C# implementation dozens of times, and I'm not seeing where the problem lies. What I have been able to determine is that the native code is (apparently) writing data to the EXE file well ahead of my current implementation, which is getting things massively out of order, and causing some data to not be copied at all. This may be a bit of a code dump, but any help sorting this out is appreciated.

When creating the EXE, the Editor calls upon the native code to build the data file.

Editor/AGS.Editor/NativeProxy.cs:388-391
Code: csharp
        public void CreateGameEXE(string[] fileList, Game game, string baseFileName)
        {
            _native.CreateDataFile(fileList, game.Settings.SplitResources * 1000000, baseFileName, true);
        }


Editor/AGS.Native/ScriptCompiler.cpp:116-139
Code: cpp
		void NativeMethods::CreateDataFile(cli::array<String^> ^fileList, long splitSize, String ^baseFileName, bool isGameEXE)
		{
			char **fileNames = (char**)malloc(sizeof(char*) * fileList->Length);
			for (int i = 0; i < fileList->Length; i++)
			{
				fileNames[i] = (char*)malloc(fileList[i]->Length + 1);
				ConvertFileNameToCharArray(fileList[i], fileNames[i]);
			}
			char baseFileNameChars[MAX_PATH];
			ConvertFileNameToCharArray(baseFileName, baseFileNameChars);

			const char *errorMsg = make_data_file(fileList->Length, fileNames, splitSize, baseFileNameChars, isGameEXE);

			for (int i = 0; i < fileList->Length; i++)
			{
				free(fileNames[i]);
			}
			free(fileNames);

			if (errorMsg != NULL)
			{
				throw gcnew AGSEditorException(gcnew String(errorMsg));
			}
		}


In particular, I noticed that all this is doing is forwarding the parameters to the unmanaged method, make_data_file (rather long, over 100 lines).

Editor/AGS.Native/agsnative.cpp:2448-2619
Spoiler
Code: cpp
const char* make_data_file(int numFiles, char * const*fileNames, long splitSize, const char *baseFileName, bool makeFileNameAssumptionsForEXE)
{
  int a,b;
  Stream*wout;
  char tomake[MAX_PATH];
  ourlib.num_data_files = 0;
  ourlib.num_files = numFiles;
  Common::AssetManager::SetSearchPriority(Common::kAssetPriorityDir);

  int currentDataFile = 0;
  long sizeSoFar = 0;
  bool doSplitting = false;

  for (a = 0; a < numFiles; a++)
  {
	  if (splitSize > 0)
	  {
		  if (stricmp(fileNames[a], sprsetname) == 0) 
		  {
			  // the sprite file's appearance signifies it's time to start splitting
			  doSplitting = true;
			  currentDataFile++;
			  sizeSoFar = 0;
		  }
		  else if ((sizeSoFar > splitSize) && (doSplitting) && 
			  (currentDataFile < MAXMULTIFILES - 1))
		  {
			  currentDataFile++;
			  sizeSoFar = 0;
		  }
	  }
	  long thisFileSize = 0;
	  Stream *tf = Common::File::OpenFileRead(fileNames[a]);
	  thisFileSize = tf->GetLength();
	  delete tf;
	  
	  sizeSoFar += thisFileSize;

    const char *fileNameSrc = fileNames[a];

  	if (strrchr(fileNames[a], '\\') != NULL)
		  fileNameSrc = strrchr(fileNames[a], '\\') + 1;
	  else if (strrchr(fileNames[a], '/') != NULL)
		  fileNameSrc = strrchr(fileNames[a], '/') + 1;

    if (strlen(fileNameSrc) >= MAX_FILENAME_LENGTH)
    {
      char buffer[500];
      sprintf(buffer, "Filename too long: %s", fileNames[a]);
      ThrowManagedException(buffer);
    }
		strcpy(ourlib.filenames[a], fileNameSrc);

	  ourlib.file_datafile[a] = currentDataFile;
	  ourlib.length[a] = thisFileSize;
  }

  ourlib.num_data_files = currentDataFile + 1;

  long startOffset = 0;
  long mainHeaderOffset = 0;
  char outputFileName[MAX_PATH];
  char firstDataFileFullPath[MAX_PATH];

  if (makeFileNameAssumptionsForEXE)
  {
	  _mkdir("Compiled");
  }

  // First, set up the ourlib.data_filenames array with all the filenames
  // so that write_clib_header will write the correct amount of data
  for (a = 0; a < ourlib.num_data_files; a++) 
  {
	  if (makeFileNameAssumptionsForEXE) 
	  {
		  sprintf(ourlib.data_filenames[a], "%s.%03d", baseFileName, a);
		  if (a == 0)
		  {
			  strcpy(&ourlib.data_filenames[a][strlen(ourlib.data_filenames[a]) - 3], "exe");
		  }
	  }
	  else 
	  {
    	if (strrchr(baseFileName, '\\') != NULL)
		    strcpy(ourlib.data_filenames[a], strrchr(baseFileName, '\\') + 1);
	    else if (strrchr(baseFileName, '/') != NULL)
		    strcpy(ourlib.data_filenames[a], strrchr(baseFileName, '/') + 1);
	    else
		    strcpy(ourlib.data_filenames[a], baseFileName);
	  }
  }

  // adjust the file paths if necessary, so that write_clib_header will
  // write the correct amount of data
  for (b = 0; b < ourlib.num_files; b++) 
  {
	Stream *iii = find_file_in_path(tomake, ourlib.filenames[b]);
	if (iii != NULL)
	{
		delete iii;

		if (!makeFileNameAssumptionsForEXE)
		  strcpy(ourlib.filenames[b], tomake);
	}
  }

  // now, create the actual files
  for (a = 0; a < ourlib.num_data_files; a++) 
  {
	  if (makeFileNameAssumptionsForEXE) 
	  {
		  sprintf(outputFileName, "Compiled\\%s", ourlib.data_filenames[a]);
	  }
	  else 
	  {
		  strcpy(outputFileName, baseFileName);
      }
      if (a == 0) strcpy(firstDataFileFullPath, outputFileName);

	  wout = Common::File::OpenFile(outputFileName,
          (a == 0) ? Common::kFile_Create : Common::kFile_CreateAlways, Common::kFile_Write);
	  if (wout == NULL) 
	  {
		  return "ERROR: unable to open file for writing";
	  }

	  startOffset = wout->GetLength();
    wout->Write("CLIB\x1a",5);
    wout->WriteByte(21);  // version
    wout->WriteByte(a);   // file number

    if (a == 0) 
	{
      mainHeaderOffset = wout->GetPosition();
      write_clib_header(wout);
    }

    for (b=0;b<ourlib.num_files;b++) {
      if (ourlib.file_datafile[b] == a) {
        ourlib.offset[b] = wout->GetPosition() - startOffset;

		Stream *iii = find_file_in_path(NULL, ourlib.filenames[b]);
        if (iii == NULL) {
          delete wout;
          unlink(outputFileName);

		  char buffer[500];
		  sprintf(buffer, "Unable to find file '%s' for compilation. Do not remove files during the compilation process.", ourlib.filenames[b]);
		  ThrowManagedException(buffer);
        }

        if (copy_file_across(iii,wout,ourlib.length[b]) < 1) {
          delete iii;
          return "Error writing file: possibly disk full";
        }
        delete iii;
      }
    }
	if (startOffset > 0)
	{
		wout->WriteInt32(startOffset);
		wout->Write(clibendsig, 12);
	}
    delete wout;
  }

  wout = Common::File::OpenFile(firstDataFileFullPath, Common::kFile_Open, Common::kFile_ReadWrite);
  wout->Seek(Common::kSeekBegin, mainHeaderOffset);
  write_clib_header(wout);
  delete wout;
  return NULL;
}
[close]

As far as I can tell, this doesn't even open the EXE file for writing until it is near the end of the function.

Editor/AGS.Native/agsnative.cpp:2554-2583
Code: cpp
  // now, create the actual files
  for (a = 0; a < ourlib.num_data_files; a++) 
  {
	  if (makeFileNameAssumptionsForEXE) 
	  {
		  sprintf(outputFileName, "Compiled\\%s", ourlib.data_filenames[a]);
	  }
	  else 
	  {
		  strcpy(outputFileName, baseFileName);
      }
      if (a == 0) strcpy(firstDataFileFullPath, outputFileName);

	  wout = Common::File::OpenFile(outputFileName,
          (a == 0) ? Common::kFile_Create : Common::kFile_CreateAlways, Common::kFile_Write);
	  if (wout == NULL) 
	  {
		  return "ERROR: unable to open file for writing";
	  }

	  startOffset = wout->GetLength();
    wout->Write("CLIB\x1a",5);
    wout->WriteByte(21);  // version
    wout->WriteByte(a);   // file number

    if (a == 0) 
	{
      mainHeaderOffset = wout->GetPosition();
      write_clib_header(wout);
    }
    // ...


Here we see that as soon as the file is opened, it is recording the file's length (line 21 in the above snippet, line 2574 in the file), writing a bit of data (the next three lines), and then if it is the EXE, recording the file's current position. If the file were being newly created then this wouldn't make sense, but as seen on line 15 of the snippet (2568) the EXE is being opened if it already exists. From my tests, it seems that the EXE is being created elsewhere first and having some 2178048 bytes of data written into it (as per the Length and Position of the Stream) before make_data_file is being called.

However, if I replace the call in NativeProxy.cs with a call to my C# implementation of make_data_file, the EXE is not being created first.

My question, if anyone can be bothered to read through all of this, is at what point is the EXE being created and written to when using the native implementation that isn't being invoked with my C# implementation? I'm at a total loss as to where this file is being created (and even when the necessary code is being invoked).

My C# implementation is up in my personal fork, if anyone wants to look through it.
#23
I've been looking to rebuild the native libraries (alfont_mt.lib, alleg_s_crt.lib, ddraw.lib, etc.). I'm just curious, does anyone have an exhaustive list of what is needed to rebuild the libraries?
#24
We're conducting a demographics survey in my intro to video game design course. I'd greatly appreciate if you could take this survey for me:

https://www.surveymonkey.com/s/VZWJW3B

Thanks!
#25
Engine Development / Built-in plugins/stubs?
Tue 26/08/2014 15:44:38
It was recently suggested that I create a plugin stub for the AGSteam plugin, so games which use it can be run on non-Steam platforms. This is particularly relevant if trying to run a Steam game on a platform which doesn't support Steam.

My question is this -- There are already some plugins which are built into the engine source code, but I'm worried that we might bog things down if we start including and/or stubbing every "useful" plugin (AGSteam would have to be stubbed due to Valve's licensing). What is the general consensus on this? I already have a stub written, I just need to more thoroughly test that the full plugin can usefully tap into the stubbed features. Would it make sense for me to build it into the engine, or should I just provide it separately for those who need it?
#26
Double-post for an unrelated issue.

A thought just occurred to me here, but what should be the expected behavior if the user tries to create new instances of the built-in types? For example, the following code is now perfectly valid:

Code: ags
GUI *new_gui = new GUI;
Character *new_character = new Character;
Object *new_object = new Object;


Of course, while these are valid script objects, they're totally unusable. They all have invalid IDs, and other invalid read-only attributes. Attempting to display new_gui, for example, aborts with an error that an invalid GUI was specified. This makes sense of course, but should it really be deferred to a run-time crash to handle this?

Making matters even worse is the auto-pointer nature of the String class:

Code: ags
String s = new String;


May look perfectly fine, and it even compiles now! But when the run-time encounters this line, it crashes with an error message that a user object of 0 bytes was requested. This isn't very friendly.

We could just denote in the manual that the new keyword is not meant for any basic or built-in types, but nobody reads the manual anyway, so we'd end up with dozens of tech help threads due to run-time crashing.

It may actually prove useful to allow the dynamic creation of some of these built-in types, say, a temporary dummy character only needed in one room. However, this would require additional steps to ensure that these objects are created in a meaningful and useful state. Conversely, we may also need to have a way to disallow dynamic instanciation of certain types (for example, extra Game or Mouse objects wouldn't make sense).
#27
I'm working on getting a full-functioning module version of the Snow/Rain plugin, but I appear to have come across a problem. At the moment (bear in mind this is WIP!!) all of the particles should be falling straight down. Which is working great, so long as I don't try and draw them with any transparency on the DrawingSurface. If there is any transparency at all, from 1 to 100, the particle is never drawn.

I am using the D3D9 graphics driver, I have the GUI and sprite alpha rendering styles set to proper alpha blending, and I am doing essentially this:

Code: ags
DynamicSprite *guiSprite; // used as GUI background image

void Render()
{
  if (guiSprite == null)
  {
    guiSprite = DynamicSprite.Create(myGUI.Width, myGUI.Height, true);
    myGUI.BackgroundGraphic = guiSprite.Graphic;
  }
  DrawingSurface *surface = guiSprite.GetDrawingSurface();
  surface.Clear();
  int i = 0;
  while (i < particleCount)
  {
    // calculate particle position, etc.
    surface.DrawImage(x, y, img, Random(maxTrans - minTrans) + minTrans); // DOES NOT WORK
    // surface.DrawImage(x, y, img); // WORKS PERFECTLY
    i++;
  }
  surface.Release();
}

function repeatedly_execute_always()
{
  // check if snowing/raining, other sanity checks, etc.
  Render();
}


Any ideas why the semi-transparent particles are disappearing entirely?

P.S. The particle sprite in question is 32-bit, no alpha.
#28
General Discussion / Samsung, stawhp.
Fri 09/05/2014 01:44:18
So I'm currently working retail while I go to school, and so the latest releases from Samsung are a hot topic for our store. The problem is, they're terrible. The latest devices in their lineup bring almost nothing new or worthwhile to the game. In fact, their newest tablet is actually worse than its predecessor. While the Galaxy S5 is a good phone, and I'm sure the Galaxy Tab 4 is a decent tablet in its own right, I don't understand Samsung's motivation in not pushing their devices forward.

Especially given that Samsung has risen up as the main competitor against Apple's iDevices, I would expect better of them than this. :-\
#29
This is something that's been needed for a while now, and though it took a fair amount of ground-work, the process for building for Linux is actually quite simple.

You can select the target platform(s) under the General Settings pane (currently only Windows and Linux, "DataFile" option cannot be turned off).

NOTE: If your project uses any plugins, the editor will search EDITOR/linux/lib32 and EDITOR/linux/lib64 for the appropriate shared library file. This always matches the pattern "lib" + plugin_name + ".so". The appropriate variant for "agsteam.dll" is "libagsteam.so". If a required plugin is not found you will be prompted whether you wish to continue with Linux compilation.

NOTE: Currently the Linux folder is not emptied by the editor, so your files may get out of date if you choose not to build for Linux.

Download
Source

Edit: 2 November 2014, I have now uploaded a full build of the AGS Editor (including latest commits from develop-3.4.0 branch, this is post-3.4.0.1 but pre-3.4.0.2) with the option of building for Linux. The editor now builds the game data files separately from the Windows EXE, so this is also the first version to not rely on publishing the Windows EXE for Linux versions. NOTE: The ags32 Linux engine currently included in this build is NOT up-to-date (I believe it is from an earlier 3.3.1 build). I will make sure that updated Linux engine files for both 32- and 64-bit are included in future versions. Also note that the Windows compiled files are now placed in Compiled/Windows.

Edit: (3 May 2014) I uploaded a new version which places the Linux files into a subdirectory of the editor directory. This also includes a bugfix -- the original version was producing Linux scripts with Windows-style line endings, which has been corrected.
#30
As far as I can tell, I have to be Taiwanese, or have a Taiwanese address in order to buy a .tw domain name.  I don't know if there are any rules about this, but are there any trustworthy Taiwanese who would help me acquire one of those fancy domains for an upcoming project of mine? (I'll pay for the domain, of course!)
#31
There's no way this could possibly be a hoax, amirite?

http://huvrtech.com/
#32
The Rumpus Room / Because.
Thu 13/02/2014 05:00:45
You can try, but started this group, we understand these things, you see, they do not understand, not just quantity.
#33
I recently helped upgrade The Cat Lady on Steam to v1.4 which contains some bug fixes, a couple translation fixes, and some additional fonts/fixes. No additional scripts, characters, objects, variables, or any other global entities were added (aside from the new fonts). Is there really a reason that this should cause the older save games to become completely invalidated?

It seems to me that the engine may be setting far more restrictions on save games than necessary, perhaps due to saving unnecessary data that doesn't need to be written to the save file anyway. I haven't really had time to fully explore this, just my preliminary thinking.

Is there any way that save game compatibility in these cases could be improved? Players tend to dislike their save files being invalidated by game updates.
#34
Far superior to the foolish "Movember" crap, No Shower November is a serious fundraising campaign dedicated to promoting bad hygiene awareness. Every single day 500 or more people are killed in shower-related accidents. Please help bring an end to this serious problem. Stop taking showers! It could save your life!
#35
I don't know what I'm doing wrong, but I can't seem to reproduce this for the life of me. >:( Unfortunately, it seems everyone else is running into this issue:

QuoteOne more issue I have noticed with the Android port is that it tends to exit sometimes after the game has been running for 5 - 10 minutes. No error messages are given, it just exits cleanly.  It's also possible for it to get stuck (e.g. screen frozen/music glitching repeatedly) after the same length of time. I'm not sure why this is.

QuoteI've been having some beta testers play through our game on Android using the latest AGS build from JJS's daily page. All of the testers have experienced these dropouts often, even the ones running the game on faster devices with Jellybean.

Logcat output from crash:
Spoiler
QuoteHP Touchpad running Cyanogen 9, android 4.0.4 (9" tablet)
Random crash of AGS application when quickly clicking on several icons. It's a clean exit


F/libc    ( 8520): Fatal signal 11 (SIGSEGV) at 0x00004548 (code=1)
I/DEBUG   (30199): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   (30199): Build fingerprint: 'hp/hp_tenderloin/tenderloin:4.0.4/IMM76I/330937:user/release-keys'
I/DEBUG   (30199): pid: 8520, tid: 8588  >>> com.bigbluecup.android.launcher <<<
I/DEBUG   (30199): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00004548
I/DEBUG   (30199):  r0 00400000  r1 0022a400  r2 000022a4  r3 00000000
I/DEBUG   (30199):  r4 477d63ac  r5 0027c2e0  r6 0000015c  r7 00400000
I/DEBUG   (30199):  r8 477e7390  r9 00000000  10 00000100  fp 00000000
I/DEBUG   (30199):  ip 00004548  sp 46e7ee48  lr 47588728  pc 4758862c  cpsr 200f0010
I/DEBUG   (30199):  d0  0000000000000000  d1  0000000000000000
I/DEBUG   (30199):  d2  0000000000000000  d3  0000000000000000
I/DEBUG   (30199):  d4  002b005300200032  d5  000a00650027006a
I/DEBUG   (30199):  d6  ffeb0061fff60063  d7  ffd2004affda0053
I/DEBUG   (30199):  d8  0000000000000000  d9  0000000000000000
I/DEBUG   (30199):  d10 0000000000000000  d11 0000000000000000
I/DEBUG   (30199):  d12 0000000000000000  d13 0000000000000000
I/DEBUG   (30199):  d14 0000000000000000  d15 0000000000000000
I/DEBUG   (30199):  d16 0000000700001000  d17 ff92fffeffa00011
I/DEBUG   (30199):  d18 ff7bffd9ff85ffeb  d19 ff63ffb9ff6effc6
I/DEBUG   (30199):  d20 ff56ffacff5fffb4  d21 ff3bff94ff44ff9d
I/DEBUG   (30199):  d22 ff52ff9fff47ff9a  d23 ff69ffadff58ffa0
I/DEBUG   (30199):  d24 0000000000000000  d25 0000f8f200009df5
I/DEBUG   (30199):  d26 0002b4c5001220a4  d27 0001f8f300029df7
I/DEBUG   (30199):  d28 0000000000000000  d29 090a0b0c0d0e0f10
I/DEBUG   (30199):  d30 0000000900000009  d31 0000000900000009
I/DEBUG   (30199):  scr 60000012
I/DEBUG   (30199):
I/DEBUG   (30199):          #00  pc 4758862c  /data/data/com.bigbluecup.android.launcher/lib/libagsengine.so
I/DEBUG   (30199):          #01  lr 47588728  /data/data/com.bigbluecup.android.launcher/lib/libagsengine.so
I/DEBUG   (30199):
I/DEBUG   (30199): code around pc:
I/DEBUG   (30199): 4758860c e58d7044 e3560000 0a000045 e5941010  Dp....V.E.......
I/DEBUG   (30199): 4758861c e594300c e1a02441 e1a0c082 e5940018  .0..A$..........
I/DEBUG   (30199): 4758862c e193c0bc e2407c01 e1a0c40c e1510007  .....|@.......Q.
I/DEBUG   (30199): 4758863c e24cc502 ba00011e e5982004 e2022005  ..L...... ... ..
I/DEBUG   (30199): 4758864c e3520001 0a000466 e5947020 e20130ff  ..R.f... p...0..
I/DEBUG   (30199):
I/DEBUG   (30199): code around lr:
I/DEBUG   (30199): 47588708 e5883004 e2466001 e316000f 1affffbd  .0...`F.........
I/DEBUG   (30199): 47588718 e1a00004 e1a01008 e1a02006 ebfffb4f  ......... ..O...
I/DEBUG   (30199): 47588728 e3560000 1affffb9 e59d7044 eafffe46  ..V.....Dp..F...
I/DEBUG   (30199): 47588738 e59d9044 e59d8028 e3a03000 e59d7048  D...(....0..Hp..
I/DEBUG   (30199): 47588748 e7893008 eafffe40 e594201c e06c3003  .0..@.... ...0l.
I/DEBUG   (30199):
I/DEBUG   (30199): memory map around addr 00004548:
I/DEBUG   (30199): (no map below)
I/DEBUG   (30199): (no map for address)
I/DEBUG   (30199): 00008000-0000a000 /system/bin/app_process
I/DEBUG   (30199):
I/DEBUG   (30199): stack:
I/DEBUG   (30199):     46e7ee08  00000000 
I/DEBUG   (30199):     46e7ee0c  00000000 
I/DEBUG   (30199):     46e7ee10  00000000 
I/DEBUG   (30199):     46e7ee14  00000000 
I/DEBUG   (30199):     46e7ee18  2b345fa8  /system/lib/libdvm.so
I/DEBUG   (30199):     46e7ee1c  00000000 
I/DEBUG   (30199):     46e7ee20  46e82fb0 
I/DEBUG   (30199):     46e7ee24  00000000 
I/DEBUG   (30199):     46e7ee28  00000000 
I/DEBUG   (30199):     46e7ee2c  00000000 
I/DEBUG   (30199):     46e7ee30  00000000 
I/DEBUG   (30199):     46e7ee34  00000000 
I/DEBUG   (30199):     46e7ee38  477d63ac 
I/DEBUG   (30199):     46e7ee3c  0027c2c0  [heap]
I/DEBUG   (30199):     46e7ee40  df0027ad 
I/DEBUG   (30199):     46e7ee44  00000000 
I/DEBUG   (30199):     46e7ee48  416cbdb0  /dev/ashmem/dalvik-LinearAlloc (deleted)
I/DEBUG   (30199):     46e7ee4c  46e7eebc 
I/DEBUG   (30199):     46e7ee50  073e6000 
I/DEBUG   (30199):     46e7ee54  00000000 
I/DEBUG   (30199):     46e7ee58  072fe000 
I/DEBUG   (30199):     46e7ee5c  00000000 
I/DEBUG   (30199):     46e7ee60  00000000 
I/DEBUG   (30199):     46e7ee64  00000000 
I/DEBUG   (30199):     46e7ee68  00000000 
I/DEBUG   (30199):     46e7ee6c  00000000 
I/DEBUG   (30199):     46e7ee70  00000100 
I/DEBUG   (30199):     46e7ee74  073e44d6 
I/DEBUG   (30199):     46e7ee78  477ebc64 
I/DEBUG   (30199):     46e7ee7c  47700d7c  /data/data/com.bigbluecup.android.launcher/lib/libagsengine.so
I/DEBUG   (30199):     46e7ee80  477d636c 
I/DEBUG   (30199):     46e7ee84  0024e55c  [heap]
I/DEBUG   (30199):     46e7ee88  0024e308  [heap]
I/DEBUG   (30199):     46e7ee8c  00000001 
I/DEBUG   (30199):     46e7ee90  00000000 
I/DEBUG   (30199):     46e7ee94  0027adc0  [heap]
I/DEBUG   (30199):     46e7ee98  477d636c 
I/DEBUG   (30199):     46e7ee9c  477d636c 
I/DEBUG   (30199):     46e7eea0  477d6e84 
I/DEBUG   (30199):     46e7eea4  477d6380 
I/DEBUG   (30199):     46e7eea8  477e0c00 
I/DEBUG   (30199):     46e7eeac  ffffffff 
I/DEBUG   (30199):     46e7eeb0  47700d7c  /data/data/com.bigbluecup.android.launcher/lib/libagsengine.so
I/DEBUG   (30199):     46e7eeb4  477e2c00 
I/DEBUG   (30199):     46e7eeb8  477e0c00 
I/DEBUG   (30199):     46e7eebc  47700d7c  /data/data/com.bigbluecup.android.launcher/lib/libagsengine.so
I/DEBUG   (30199):     46e7eec0  fffffe48 
I/DEBUG   (30199):     46e7eec4  477e0c00 
I/DEBUG   (30199):     46e7eec8  475a9be4  /data/data/com.bigbluecup.android.launcher/lib/libagsengine.so
I/DEBUG   (30199):     46e7eecc  00100000  [heap]
I/DEBUG   (30199):     46e7eed0  00000000 
I/DEBUG   (30199):     46e7eed4  475a9c30  /data/data/com.bigbluecup.android.launcher/lib/libagsengine.so
I/DEBUG   (30199):     46e7eed8  46e7ef00 
I/DEBUG   (30199):     46e7eedc  475a9be4  /data/data/com.bigbluecup.android.launcher/lib/libagsengine.so
I/DEBUG   (30199):     46e7eee0  00000000 
I/DEBUG   (30199):     46e7eee4  00000078 
I/DEBUG   (30199):     46e7eee8  46d7f000 
I/DEBUG   (30199):     46e7eeec  2aac21d0  /system/lib/libc.so
I/DEBUG   (30199):     46e7eef0  46e7ef00 
I/DEBUG   (30199):     46e7eef4  0028d978  [heap]
I/DEBUG   (30199):     46e7eef8  2aae9318  /system/lib/libc.so
I/DEBUG   (30199):     46e7eefc  2aac1d00  /system/lib/libc.so
I/DEBUG   (30199):     46e7ef00  46e7ef00 
I/DEBUG   (30199):     46e7ef04  0028d978  [heap]
I/DEBUG   (30199):     46e7ef08  00000000 
I/DEBUG   (30199):     46e7ef0c  00000000 
I/DEBUG   (30199):     46e7ef10  00000000 
I/DEBUG   (30199):     46e7ef14  00000000 
I/DEBUG   (30199):     46e7ef18  0027dd70  [heap]
I/DEBUG   (30199):     46e7ef1c  00000000 
I/DEBUG   (30199):     46e7ef20  00000000 
I/DEBUG   (30199):     46e7ef24  00000000 
I/DEBUG   (30199):     46e7ef28  00000000 
I/DEBUG   (30199):     46e7ef2c  00000000 
I/DEBUG   (30199):     46e7ef30  00000000 
I/DEBUG   (30199):     46e7ef34  00000000 
I/DEBUG   (30199):     46e7ef38  00000000 
I/DEBUG   (30199):     46e7ef3c  00000000 
I/DEBUG   (30199):     46e7ef40  00000000 
I/DEBUG   (30199):     46e7ef44  00000000 
I/DEBUG   (30199):     46e7ef48  00000000 
I/DEBUG   (30199):     46e7ef4c  00000000 
W/AudioTrack( 8520): obtainBuffer() track 0x28d488 disabled, restarting
W/AudioTrack( 8520): obtainBuffer() track 0x28d488 disabled, restarting
I/BootReceiver(  240): Copying /data/tombstones/tombstone_01 to DropBox (SYSTEM_TOMBSTONE)
I/ActivityManager(  240): Process com.bigbluecup.android.launcher (pid 8520) has died.
W/ActivityManager(  240): Force removing ActivityRecord{2bb34700 com.bigbluecup.android.launcher/com.bigbluecup.android.AgsEngine}: app died, no saved state
I/WindowManager(  240): WIN DEATH: Window{2bd0b4d8 com.bigbluecup.android.launcher/com.bigbluecup.android.AgsEngine paused=false}
W/WindowManager(  240): Force-removing child win Window{2bde9420 SurfaceView paused=false} from container Window{2bd0b4d8 com.bigbluecup.android.launcher/com.bigbluecup.android.AgsEngine paused=false}
D/Zygote  (  158): Process 8520 terminated by signal (11)
D/dalvikvm(  240): GC_CONCURRENT freed 3276K, 42% free 14540K/24839K, paused 6ms+12ms
W/WindowManager(  240): Failed looking up window
W/WindowManager(  240): java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@2bd51378 does not exist
W/WindowManager(  240):     at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:7185)
W/WindowManager(  240):     at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:7176)
W/WindowManager(  240):     at com.android.server.wm.WindowState$DeathRecipient.binderDied(WindowState.java:1545)
W/WindowManager(  240):     at android.os.BinderProxy.sendDeathNotice(Binder.java:417)
W/WindowManager(  240):     at dalvik.system.NativeStart.run(Native Method)
I/WindowManager(  240): WIN DEATH: null
W/InputManagerService(  240): Got RemoteException sending setActive(false) notification to pid 8520 uid 10155
I/ALSAModule(23747): android::status_t android::s_close(android::alsa_handle_t*): SENDING out disable sequence
I/ALSAModule(23747): ALSA Module: closing down output device
[close]

These lines in particular from that logcat is definitely reinforcing my concerns that it may relate to the multithreaded audio:

QuoteW/AudioTrack( 8520): obtainBuffer() track 0x28d488 disabled, restarting
W/AudioTrack( 8520): obtainBuffer() track 0x28d488 disabled, restarting
I/ActivityManager(  240): Process com.bigbluecup.android.launcher (pid 8520) has died.

Another Logcat: (less complete info)
Spoiler
QuoteI/SurfaceFlinger(29688): id=1836 Removed com.bigbluecup.android.launcher/com.bigbluecup.android.AgsEngine idx=-2 Map Size=2
W/WindowManager(29721): Failed looking up window
W/WindowManager(29721): java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@40f848e8 does not exist
W/WindowManager(29721): at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:7174)
W/WindowManager(29721): at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:7165)
W/WindowManager(29721): at com.android.server.wm.WindowState$DeathRecipient.binderDied(WindowState.java:1412)
W/WindowManager(29721): at android.os.BinderProxy.sendDeathNotice(Binder.java:418)
W/WindowManager(29721): at com.android.server.SystemServer.init1(Native Method)
W/WindowManager(29721): at com.android.server.SystemServer.main(SystemServer.java:831)
W/WindowManager(29721): at java.lang.reflect.Method.invokeNative(Native Method)
W/WindowManager(29721): at java.lang.reflect.Method.invoke(Method.java:491)
W/WindowManager(29721): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)
W/WindowManager(29721): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
W/WindowManager(29721): at dalvik.system.NativeStart.main(Native Method)
I/WindowManager(29721): WIN DEATH: null
I/WindowManager(29721): WINDOW DIED Window{40ee86d8 com.bigbluecup.android.launcher/com.bigbluecup.android.AgsEngine paused=false}
I/ActivityManager(29721): Start proc com.android.launcher for activity com.android.launcher/com.android.launcher2.Launcher: pid=24063 uid=10072 gids={}
V/WindowManager(29721): rotationForOrientationLw(orient=-1, last=0); user=0  displayEnabled=true mHdmiPlugged=false mLidOpen=-1 mDockMode=0 (useSensorForOrientationLp(orientation)=true mAccelerometerDefault=1
V/WindowManager(29721): new rotation is set to 0
D/KeyguardViewMediator(29721): setHidden false
I/ActivityThread(24063): Pub com.android.launcher2.settings: com.android.launcher2.LauncherProvider
D/StatusBar.NetworkController(29784): refreshViews combinedSignalIconId=0x7f020142/(null) dataDirectionOverlayIconId=0x0 mAirplaneMode=false mDataActivity=0 mPhoneSignalIconId=0x7f020130 mDataDirectionIconId=0x0 mDataSignalIconId=0x7f020114 mDataTypeIconId=0x0 mWifiIconId=0x7f020142 mBluetoothTetherIconId=0x1080530
D/StatusBar.NetworkController(29784): changing data overlay icon id to 0
[close]

Quote...the game screen froze (like it usually does when it's about to drop out). But this time, it froze with the player's talking dialog portrait came on-screen, before he could say his speech line. At this point while his  dialog portrait was 'frozen', I could still move the mouse around the screen to see the names of hotspots change on the lower tooltip GUI. This indicated that the entire game wasn't frozen, but it seemed to be just waiting on the speech audio to buffer or otherwise do something before it would play. The speech audio never ended up actually playing. The game dropped out about 5 seconds later, while the dialog portrait was still on the screen waiting for the speech line to start (and while I was still seeing hotspot names appear on the tooltip GUI as I moved the mouse around). Not sure how helpful that is, but hopefully it sheds some more light on what the crashing issue could be related to.

As an aside, I should also mention that these types of freezes/dropouts are far less frequent on my Galaxy S1/Gingerbread. After playing the game for 8 hours or so, I only experienced about 3 such crashes. while on my S3/Jellybean, they tend to occur in intervals of 2 to 15 minutes on a regular basis.

From my stand-alone APK beta:
QuoteEverything seemed to be working well. No slowdown. Right up until the point where I tapped the "menu" hard button and then tapped on "Instructions". As I was scrolling through the instructions, the game exited cleanly without any error message (a bug I have experienced frequently with other AGS games in the JJS Android port).

Repeating the same actions a second time didn't cause the game to exit, so this supports my theory that it seems to be arbitrary and can happen at any time, on fast and slow Android devices alike.

That's about the sum of the info I've collected. I'm highly suspicious of the multithreaded audio (especially after a summary review of the longer logcat), but I can't make enough sense of it to know what I'm looking for, and I can't reproduce it on my HTC Evo 3D (Android 4.0.3, IIRC).

If anyone can make any sense of this, I would be immensely grateful (as would the players, I can assure you!). :-\
#36
Editor Development / AGS.Native linker errors.
Tue 15/10/2013 05:41:06
When attempting to build AGS.Native, I get a lot of linker errors.

I'm getting error LNK2038 because of an apparent mismatch on the runtime library setting ("value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease'"). If I try to change AGS.Native to /MT (static linking) then I get an error that /MT is incompatible with /clr. If I instead change Common.Lib and Compiler.Lib to /MD (dynamic linking) then this error goes away, but the rest of the linker errors remain (a bunch of unresolved external symbols from the object files).

Does anyone know why I'm getting these errors, and how to fix them? Presumably I shouldn't have to be changing the linker flags on these projects, but I'm trying to determine why the linker is failing in the first place.
#37
Do you know Secret Fawful? If not, I can tell you, you're missing out! Secret Fawful is one of the best friends you could ever hope to have. He's a really great, totally awesome sort of dude who will bend over backwards to help you in (or out of) a pinch.

I met Secret Fawful 4 years ago on the TellTale Games forums, which I frequented during the releases of the Tales of Monkey Island episodes. He and I started talking when I asked around for people who would be interested in making I Wonder What Happens In I Wonder What Happens In Tales of Monkey Island: Chapter 5: Rise of the Pirate God: The Game! a reality. He was one of the first to respond, and definitely one of the most eager.

We communicated a lot over MSN Messenger. I'm not really sure if people still even use that any more...it's all about Facebook and Skype nowadays I suppose. I tried on a few occasions to get him and Maxilyah (one of the voice actresses on the project) to become friends, but they never really hit it off. I haven't talked to her in a couple years myself. I wonder what ever happened to her...

Through the course of the past four years though, Secret Fawful and I have become quite close. I am an arrogant, prideful, hateful, ignorant, and completely insufferable person (as denoted by the fact that I can count my "irl" friends on one hand and not use my thumb), but Fawful got to know me, and he accepted me anyway. He's stood by my side through a lot over the past four years, and I've even confided secrets in him that I've told no one else. I guess he's lived up to the "Secret" part of his name.

I haven't been a good friend to Fawful. Not as good a friend as I should have been; not as good a friend as he was to me. I don't live with regrets, it's a decision I made some time ago, and I stick to it. I can't change the past. I'm not proud of the fact that I have hurt him though. It's something about myself that I am trying to change, to be less selfish toward him. I blame it on depression, I blame it on a million other things, but the fact of the matter is that you find time for the things and the people you care about. You make that time. I haven't given him the time that a friend of his caliber deserves. It's not too late though. There's always hope for change.

Secret Fawful is one of my best and dearest friends. I often make homoerotic sexual innuendo toward him in reference of that fact (and also in reference to the fact that we are both very secure in our heterosexuality, because nothing is manlier or straighter than saying you want to have sex with another man). If you don't know him, you should find a reason to become acquainted with him. You should shower him with your love and praise, because he has earned it.

As much as we piss each other off, our friendship has stood strong. Even at its worst, we never once thought to let go of that. Fawful's a good guy. Secret Fawful is the best.
#38
It's been a while since it was actually passed into law, but the deadlines are finally approaching for Obamacare to be implemented. For those who aren't aware, this is Obama's plan to force citizens who can't afford health insurance to purchase it anyway or face major tax penalties. I am one of the millions of unemployed Amerikaan citizens who is completely unable to purchase health insurance, so come March 2014 I will be severely in debt to the U.S. government. Well, unless I can find a job before then making roughly 5 to 6 times the current minimum wage and not get fired for illegitimate reasons. I don't even live beyond my means. My entire adult life I have lived well below the poverty line. Obama's plan for me to simply have more money to spend (presumably, by magic) so that I can afford additional expenses is of course something I'm terribly excited about.
#39
I originally posted this as a GitHub issue, but maybe this will spark some more attention.

Whenever the Android engine is running in the background (pressing the Home button, switching to another app or activity, etc.) it repeatedly logs errors, such as:

09-28 01:42:42.972: E/Adreno200-EGLSUB(29061): GetBackBuffer() dequeue native buffer failed: No such device
09-28 01:42:42.972: E/Adreno200-EGL(29061): <qeglDrvAPI_eglSwapBuffers:3339>: EGL_BAD_ALLOC
09-28 01:43:02.291: E/Adreno200-ES11(29061): <qglDrvAPI_glTexSubImage2D:2055>: GL_OUT_OF_MEMORY

The timestamps are irrelevant, these errors show up several times per second any time the engine is running in the background. I am trying to determine why these errors are being logged, and whether they are related to the engine silently crashing. At apparently random intervals the Android engine is silently closing, across multiple devices. I have been unable to determine any solid information about this due to its seemingly random nature.

Any insight on these errors and how they might relate would be greatly appreciated.
#40
Hey, as some of you have noticed, I'm working on the whole "publishing" issue for AGS games on Android, and I've hit somewhat of a snag in that the engine seems to run quite slowly in graphic-intensive games. Even on higher end devices which have very successfully published 3D games available, the engine is slowing to a crawl. I'm not really sure where to look, so what would be the best way of finding the root causes? I know the engine isn't highly optimized ATM, but I'm looking to see what could be done to just make these games run a bit smoother.

Any leads would be appreciated. Also, I'm quite new to Java, Eclipse, and Android development in general, so feel free to "dumb it down" a bit if you're referencing anything specific to those areas. I imagine the biggest issue will lay in the native C++ code, but again, I'm not really sure how to go about determining that.


Thanks!
SMF spam blocked by CleanTalk