arpie

Forum Replies Created

Viewing 15 posts - 46 through 60 (of 76 total)
  • Author
    Posts
  • in reply to: VIdeo playback #5727

    arpie
    Participant

    I don’t see an issue with a very limited set of codecs (even just one) being supported, as long as those few codecs are available on all platforms.  Any videos I want to include in a game I can easily convert to a format that is supported.  I don’t see any mileage in you spending time trying to support a hundred different codecs when just one that works everywhere would be perfectly acceptable (and probably a lot easier to support and make 100% bug-free).  We are (mostly) writing games, not multimedia apps.  One rock-solid supported codec is way better than multiple flakey ones.

    Do people have a preferred format?  Is there any one format that is entirely free of patent issues?  I would have thought Ogg Theora would fit the bill, wouldn’t it?  Or have I read that there is a potential patent issue lurking round the corner? [edit : looks like no – http://en.swpat.org/wiki/Theora ]

    in reply to: VIdeo playback #5720

    arpie
    Participant

    I am far from expert with multimedia frameworks but you may want to look into gstreamer as a possible alternative.  It is a higher-level module-based system which will be more complex to integrate, but more powerful and flexible in the longrun (it can use ffmpeg as a backend).  It is (afaik) written in C (using GObjects for OO), so should be easy to port?

    Documentation is here :

    https://gstreamer.freedesktop.org/documentation/frequently-asked-questions/index.html

    I have googled for gstreamer with SDL and not found any useful leads, although people do seem to be doing it.

    Equally, ffmpeg is also very highly regarded at least in the Linux world.  I would have no objection to either.

    As for VLC, I have always found its playback quality to be not great (funny interlacing effects on some videos), however I believe their decoders are considered to be amongst the fastest out there.

    Just out of interest, I have just checked which apps here in the Linux world use which libraries.  ffmpeg and gstreamer are both required by a lot of packages.  Of note, though, ffmpeg is the video library of choice for firefox, chromium (that’s chrome stripped of any licencing issues), mplayer and blender.  GStreamer is used by handbrake (handbrake.fr), Totem (Gnome’s standard video player) and Shotwell.  Based on that comparison, I’d say ffmpeg is probably a good way to go.

    in reply to: Ted2Go keyboard shortcuts not working #5648

    arpie
    Participant

    @immutableoctet thanks for the heads-up. How did you spot that commit so fast? I can’t see a way to get github to notify me of commits so either you were watching the repo like a hawk or you have Mark’s mobile number…?

    @nerobot if we do find any bugs in ted2go (I’m sure there aren’t any!) or have feature requests, where should we post them?

    in reply to: Ted2Go keyboard shortcuts not working #5641

    arpie
    Participant

    Okay, I’ve rebuilt from scratch and get the same issue… but it does seem to be related to nerobot’s numlock issue.

    With numlock on (this is the default setting for me) :
    – the only function key that has any effect is F11, which opens a ‘parseinfo’ popup.
    – Ctrl-Z, Ctrl-X, Ctrl-C and Ctrl-V work for undo, cut, copy and paste.
    – Ctrl-A works for select all.
    – Ctrl-O, Ctrl-S, Ctrl-N have no effect. All other key combinations I tried have no effect (I didn’t test them all).

    With numlock off, all keys appear to function as expected.

    In all other software, these keyboard shortcuts and function keys are unaffected by the numlock state. And as far as I understand, this is the way it should be. Numlock should only affect numpad keys, shouldn’t it?

    I didn’t have this problem before pulling the latest git commits a few days ago. Previous versions of Ted2Go/Monkey worked as expected with numlock on (I never turn it off so can’t say if there was the opposite issue before). What has changed?

    I’m on a laptop (is that relevant?). I will try to replicate it on my desktop tomorrow (exactly the same OS etc).

    Is there any useful testing I can do to help solve this? Not that it needs an urgent fix; I can live with having to toggle numlock, now that I know!

    in reply to: Ted2Go keyboard shortcuts not working #5633

    arpie
    Participant

    Well, if you two don’t know, what chance have the rest of us!  I’ll try rebuilding everything in a clean folder this evening.  Hopefully that will fix it.

    in reply to: "Class Thing[T] Extends T" won't compile #5628

    arpie
    Participant

    Sorry, @Mark, I’m removing the super from my last comment, thus demoting you to ‘star’ until you get round to making this work when the Classes in question are in different source files (see below).  Tested with a namespace declaration, too, with the same results.  On the other hand, if you were to implement a dedicated Mixin/Traits syntax then I would have to promote you to ‘demigod’!

    File test.monkey2 :

    File testmixin.monkey2 :

    Compilation error :

    Mx2cc version 1.1.02

    ***** Building app ‘/home/arpie/Projects/BiaB/MazeM2/test.monkey2’ *****

    Parsing…
    Semanting…
    Translating…
    Compiling…
    Build error: System command ‘g++ -I”/home/arpie/Coding/Monkey/Monkey2/modules/” -I”/home/arpie/Coding/Monkey/Monkey2/modules/monkey/native” -I”/home/arpie/Projects/BiaB/MazeM2/” -std=c++11 -c -o “/home/arpie/Projects/BiaB/MazeM2/test.buildv1.1.02/linux_debug/build/_1src_2test_0testmixin.cpp.o” “/home/arpie/Projects/BiaB/MazeM2/test.buildv1.1.02/linux_debug/src/test_testmixin.cpp”‘ failed.

    g++ -I”/home/arpie/Coding/Monkey/Monkey2/modules/” -I”/home/arpie/Coding/Monkey/Monkey2/modules/monkey/native” -I”/home/arpie/Projects/BiaB/MazeM2/” -std=c++11 -c -o “/home/arpie/Projects/BiaB/MazeM2/test.buildv1.1.02/linux_debug/build/_1src_2test_0testmixin.cpp.o” “/home/arpie/Projects/BiaB/MazeM2/test.buildv1.1.02/linux_debug/src/test_testmixin.cpp”

    In file included from /home/arpie/Projects/BiaB/MazeM2/test.buildv1.1.02/linux_debug/src/../include/test_testmixin.h:12:0,
    from /home/arpie/Projects/BiaB/MazeM2/test.buildv1.1.02/linux_debug/src/test_testmixin.cpp:2:
    /home/arpie/Projects/BiaB/MazeM2/test.buildv1.1.02/linux_debug/src/../include/test_test.h:40:37: error: invalid use of incomplete type ‘struct t_default_TestMixin_1Tt_default_Thing_2’
    struct t_default_ThingList : public t_default_TestMixin_1Tt_default_Thing_2{
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In file included from /home/arpie/Projects/BiaB/MazeM2/test.buildv1.1.02/linux_debug/src/test_testmixin.cpp:2:0:
    /home/arpie/Projects/BiaB/MazeM2/test.buildv1.1.02/linux_debug/src/../include/test_testmixin.h:7:8: note: forward declaration of ‘struct t_default_TestMixin_1Tt_default_Thing_2’
    struct t_default_TestMixin_1Tt_default_Thing_2;
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ***** Fatal mx2cc error *****

    Internal mx2cc build error

    in reply to: "Class Thing[T] Extends T" won't compile #5589

    arpie
    Participant

    Woohoo! Mark, you are a superstar.

    in reply to: "Class Thing[T] Extends T" won't compile #5536

    arpie
    Participant

    It looks like that solution for you is using

    Class Container<I> Where I Implements IWidget

    So you can add any widget into container (they all implement IWidget), and you also can add frames into container (it implements IWidget too).

    That’s not really the same thing. In a way it’s the opposite of what I am trying to achieve. I want the Container class to be as generic and reusable as possible. What I am trying to avoid is having to re-implement the Container interface in the Frame class. I want to inherit the implementations (not just the interfaces) of Widget and Container into one Frame class. I don’t want a Container into which I can put Frames and Widgets. I want a Frame that IS a container (into which I can put Frames, Widgets, etc…)

    Of course, I could achieve what I want by avoiding the Container class completely – just implement the IContainer interface in the Frame class but…

    I also want to be able to reuse the Container class/mixin elsewhere, for example, for a Phrase composite that can contain Word components (or other Phrases). Or a Task class that can be extended into a Project container, allowing a heirarchy of Projects, Subprojects and Tasks….. all using the same Container Mixin to implement a generic heirarchy of objects.

    Your suggestions help to enforce the relationship between the interfaces but they don’t avoid the problem of having to rewrite the implementations of those interfaces in many places. I hate having to rewrite the same code twice!

    The ideal solution to all this would be for Mark to implement Mixins (or Traits, or whatever you want to call them).

    in reply to: "Class Thing[T] Extends T" won't compile #5528

    arpie
    Participant

    Where is Where documented?

    I don’t use T directly inside Container, no, but used as I have, it allows me to turn any class into a Container without having to rewrite the Container methods.  It allows me to use Container as a mixin with any other class.  The key point is that in my example Frame extends both Container and Widget – it inherits all methods from both classes.  I guess you could call it multiple inheritance but that has a bad reputation so it’s a term I prefer to avoid.

    in reply to: "Class Thing[T] Extends T" won't compile #5511

    arpie
    Participant

    Here is a Monkey1 implementation of the ‘composte‘ pattern (commonly used for GUI widgets, amongst other things).  The classes here have a bare minimum of functionality – the Container class needs Remove(), Sort(), etc… and the Widget() probably wants some coordinates, size, etc. but that’s not the point.  What I am trying to demonstrate is that the Container Class is basically a mixin and can turn any class into a container for itself (it turns a component into a composite).  I could have missed out the Interface but I think it adds to the usefulness of the concept by not forcing components to inherit from the Widget class.

    I haven’t yet used this in any real apps so I may have missed some fundamental issue that renders it useless… let me know if you spot something!

    in reply to: "Class Thing[T] Extends T" won't compile #5509

    arpie
    Participant

    I’ll try to put together a trivial example.  While you’re waiting, could I ask you to explain what you mean in your last sentence? As far as I can see, ‘Where’ isn’t a keyword in Monkey1 or 2.  What do you mean by refine T?

    in reply to: Structs, Classes and Cache Efficiency #5453

    arpie
    Participant

    Finally, here are some results on a 2-year-old lenovo yoga B8000 android tablet. Not sure why the last line is missing.

    in reply to: Structs, Classes and Cache Efficiency #5450

    arpie
    Participant

    And on my Sony Xperia D5803 running Android 6.0.1 the results aren’t too shabby either :

    in reply to: Structs can't be passed as reference. #5399

    arpie
    Participant

    Mark, would you mind quickly clarifying why this would be very unsafe?  Is it for the usual reasons that pointers are unsafe or is there something more dangerous about Varptr and Ptr in Monkey?

    in reply to: Android OpenAL library missing symbol 'strtof' #4462

    arpie
    Participant

    Woah, somone’s actually *using* the android target?!?

    Isn’t that why you made it?  Am I the only one?

    New build of openal.so is up now.  …does it work?

    I thought no, then I tried again and it looks like yes.  Android Studio is the most unintuitive piece of cr#p software I’ve ever seen and it seems to intentionally screw up its own automaticly generated Gradle configuration files just for fun, in a different way every time I run it.

    But basically, I think it is working.

    Have I understood correctly that it was only openal.so that needed the targetSdkVersion etc. set to 19 and I can use a later version number (currently 24) to build my project?  That is what I think I’ve done with lightsparks and it is now happily running on my Android 4.4.2 tablet.

    In case it is of any interest, I also tried rebuilding all modules using CrystaX NDK.  It adds an extra library to the project (libcrystax.so), and also works perfectly on all my devices.  It claims a number of advantages over the Google NDK : it allows Boost libraries to be used, provides better locale support and wide character support, and apparently irons out all differences between different Android versions… see https://www.crystax.net/en/android/ndk for a more indepth comparison (it will probably be more meaningful to you than to me!).  The .so file weighs in at only 574k here, which seems pretty lightweight to me considering all its advantages. (Just to be clear; I have no affiliation of any sort with the CrystaX project and had never heard of it until a few days ago)

    Anyway, thanks for your help again.  Sorry this reply was slow coming.

Viewing 15 posts - 46 through 60 (of 76 total)