Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

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.

Messages - HCDaniel

Pages: 1 ... 9 10 [11]
151
WME Lite / Re: Any Linux developers out there?
« on: June 01, 2013, 12:31:43 PM »
Thanks for the pointer. I found that there no viewport translation happens, which was strange. The real problem was from my point of view that the query for possible resolutions was #ifdef __IPHONEOS__ only, so I added a define for android. Voila - fullscreen graphics and proper coordinates :) So while there's probably still a lot of work to do, I'm glad that wme lite seems to start looking interesting on Android now.

152
WME Lite / Re: Any Linux developers out there?
« on: June 01, 2013, 10:11:10 AM »
Ok, so I can take a look at the various defines soon. A similar mechanism to ask the app to save its state exists in Android as well, so I think this could be implemented in a similar way.

Meanwhile I did some more tweaks so that true type font rendering works. The correct way to fix this will be to add proper search paths. The only remaining major issue is now the touch offset. The game screen is aligned to the left bottom of the display, but the y-offset of the touch event is somehow added twice, so that the cursor is located always below the point where the touch happened. Do you have any idea what might cause this?

153
WME Lite / Re: Any Linux developers out there?
« on: May 31, 2013, 08:18:54 PM »
For the moment I have hardcoded "/mnt/sdcard" so that I can at least test how wmelite works on Android. Graphics output and sound work, font display is currently broken (might be due to the pretty old libfreetype that I am currently including) and touch input has a strange offset (it currently shows the mouse pointer some 50 pixels below where I touch), so I can walk around in the demo but not use anything or talk to the person.

In order to fill out the platform-dependent sections, are the two places you mentioned all that I should check? Or should I just grep the sources for all #ifdefs?

154
WME Lite / Re: Any Linux developers out there?
« on: May 29, 2013, 06:09:38 PM »
In Android, main() is not the starting point of an app. If you want to run native code, this has to be done via the Java-Native-Interface. So even in the case of WME which itself does not contain any Java, a small Java skeleton app is provided by SDL2 in order to let it run.

Furthermore I assume that any way to fetch the packages with the game data will be done in the Java domain, before WME is started (unless they are <50MB and they can be bundled with the app). In case of fetching via Google Play, there are libraries distributed by Google for that purpose.

In either way, the Java part of the app knows the path to the game packages, and could supply it to WME. I thought that the easiest (and maybe most platform independent) way is to add a cmdline switch for that. It could be useful for Windows and Linux where you have a command line (maybe Mac OS as well), and on Android it is supplied by the Java skeleton app.

Agreed, anything that is possible in Java is also possible to do in C, but it is more difficult to achieve and certainly not platform-independent.

I hope this clarifies a bit.

155
WME Lite / Re: Any Linux developers out there?
« on: May 29, 2013, 04:27:03 PM »
Ok, so for the moment I hardcoded "/mnt/sdcard/" so that I could at least run the demo project.

Android has several ways to supply resources, but once you hit the 50MB limit you can no longer ship it as one package (at least when installing via the play store). For that, Google has introduced "expansion files" which will be downloaded when you install the app.

Long story short, in the end your Java app wrapper knows where your files are supposed to be, so you need to get that information to WME. How about adding this to the arguments of main() in some way?

156
WME Lite / Re: Any Linux developers out there?
« on: May 29, 2013, 10:25:21 AM »
Hi Mnemonic,

how does WME lite search for the game packages? In Android, I cannot simply add them to the "current" directory, so I would have to specify a dedicated path. I would want to supply this as an argument to WME's main(), so how can I do that?

157
WME Lite / Re: Any Linux developers out there?
« on: May 27, 2013, 06:13:51 PM »
Hi Mnemonic,

thanks for the hints. With exceptions enabled, the STL target and the boost-for-android headers I can now compile all source files for Android. Now I need to find appropriate references (and time) to generate libfreetype and libfreeimage for Android. Then I can see whether it'll link :) And finally I will have to check how to glue SDL to WME of course, on Android there's no main().

158
WME Lite / Re: Any Linux developers out there?
« on: May 26, 2013, 09:52:00 PM »
Android is more difficult. SDL exists (and compiles), BASS exists. What's missing are freetype, freeimage and boost libs, which have to be provided for that platform.

I tried to compile as much as possible of WME lite for Android (without linking), just by providing the necessary include files. The freetype and freeimage headers are ok, but the boost headers don't work. I'll check the error message in detail soon. EDIT: Looks like Android does not understand "std::runtime_error"?

Furthermore, Android native C++ code does not like (or not support at all, I'm not sure) C++ exceptions (maybe because it's too difficult to pass them to Java in case the exception is not caught in native code). So the compilation of SXString.cpp fails. I haven't checked the code whether it is possible to live without the use of exceptions in WME lite, if just for the Android platform.

Mnemonic, what's your opinion about C++ exceptions, and do you think you can get rid of the boost library anytime soon?

159
WME Lite / Re: Any Linux developers out there?
« on: May 26, 2013, 05:01:42 PM »
Hi Mnemonic,

I tried it the quick and dirty way, WME lite compiles for Linux (tested on Ubuntu 12.04 32 bit).

The compiler emits a lot of warnings. The one warning about "typedef ignored" I cannot silence without a source code change, so can you please apply commit 27cf77c from the forked version if it does not break the other builds?

Then there are a lot of warnings about using string literals which are passed to functions that do not define the character sequence as "const" - these I can switch off easily. I don't think you want to go through the painful process of fixing that ;)

Some more warnings appear that NULL is assigned to a non-pointer type - I switched them off as well. These would probably be easier to fix (and there's only a couple of them), but I don't know whether it is worth the effort.

The rest of warnings is here:
Code: [Select]
./BGame.cpp:4758:7: Warnung: mehrere Token am Ende der Direktive #else [standardmäßig aktiviert]
./BGame.cpp: In Elementfunktion »virtual HRESULT CBGame::ScCallMethod(CScScript*, CScStack*, CScStack*, char*)«:
./BGame.cpp:2088:32: Warnung: Format »%x« erwartet Argumenttyp »unsigned int«, aber Argument 3 hat Typ »crc {aka long unsigned int}« [-Wformat]
just FYI. Nothing serious I would say.

I tested the sample game, I could play it but it segfaulted on exit. I'll see whether that is in WME or one of the libraries.

160
WME Lite / Re: Any Linux developers out there?
« on: May 25, 2013, 11:57:37 AM »
Hi Mnemonic,

I can give this a try when I'm finished pushing all my WME1 changes to you. I'm not too good at creating Makefiles or "./configure" scripts, but usually I get stuff to compile sooner or later :) So if nobody else steps up who has more experience in creating a proper Linux source package and handling dependencies in the right way, I can take a look.

161
Just checked out the sources and compiled the WME executable  :)

Just for curiosity, what was the motivation behind the license change to MIT license?

Are you interested in patches for WME1?

162
Hi Mnemonic,

is it possible for you to release the sources for the wme executable? The reason I ask is that I would like to test the 1.10.1 release, but I use a patched version of the latest stable release and thus would need the sources of the 1.10.1 in order to test it.

163
I experimented a bit and found that changing the code in

void CAdActor::TurnTo(TDirection dir)

to this:

   // already there?
   if(abs(delta) < 2)
   {
      m_Dir = dir;
      m_TargetDir = dir;
      m_State = m_NextState;
      m_NextState = STATE_READY;
      m_TempSprite2 = NULL;
      return;
   }

solved the problem for me. Although I have no idea what "m_TempSprite2" actually does ;)

Any chance that this will be incorporated into the next WME release?

164
Hi,

I think I have found a bug in WME. I can reproduce this with the scene tutorial, step 8, by replacing the original code from desk.script in the following way:

on "LeftClick"
{
  // just walk to the desk
  // actor.GoTo(544, 638);
  actor.GoTo(397, 650);
  // actor.TurnTo(DI_UPRIGHT);
  actor.TurnTo(DI_UP);
}

Now the position of the actor is the same when the chair and the desk are being examined, and the direction the actor has to turn to is similar.

In that case, the actor does not turn from e.g. the chair to the desk (and vice versa) when one item is examined and while the actor is talking, the second item is examined (the actor will turn AFTER the text has been spoken). You have to be rather quick, but this probably depends on the length of the text to talk.

I took a look at the sources and maybe the problem boils down to the code in

void CAdActor::TurnTo(TDirection dir)

where the variable "m_TargetDir" is not set when "abs(delta) < 2" (which is probably not correct as there will be a mismatch between "m_AfterWalkDir" and "m_TargetDir"). But this is just a guess.

Can you reproduce this?

Pages: 1 ... 9 10 [11]

Page created in 0.216 seconds with 23 queries.