ShabbyCat's Forum Posts

  • Ok Thanks!

  • Hi Guys,

    I found refrenced to dt (delta time). But I can't work out how to use it.

    I'd like to calculate how much time has elapsed between a sprite being created and the left click of a mouse.

  • Many of you have probably seen games like terraria for example where the terrain seems to be made up of tiles that you can dig out.

    I was wondering what the theory behind the creation is?

    Are the tiles little sprites that you spread all over the screen?

    I'm gathering you wouldn't paint them by hand and that you would generate them some how? I guess this would involve setting an upper limit (so you have a horizon) and then getthing it to fill in the test with sprites and adding a random function somewhere to pick different types of sprites.

    Is that sounding like a sane path to take?

    Any options or examples welcome.

  • Nice guide, good work!

    I experimented with phonegap a while ago and I ran into a few gotcha's that I posted here:

    scirra.com/forum/experiment-running-a-game-on-an-android_topic43897.html

    4 hickups I had along the way:

    1. Android SDK didn't detect my Java SDK install, if that happends just click "back" and "next" again on the installer (known issue with java installer).

    2. The android SDK installed in c:\program files(x86)\android-sdk by default for me. When you are entering the path of your Android SDK in Eclipse you need to use C:\PROGRA~2\Android\android-sdk cause it didn't like the spaces.

    3. When I re-ran the app on the Android emulator I just got my original HelloWorld example again. Not sure what went wrong but I deleted the Virtual Device in the AVD Manager and created a new one.

    4. By the way the Android emulator can take ages to boot up 2-3mins, I thought it was broken the first time but it was just slow.

  • That's great thanks, it doesn't make 100% sense for the moment but I'm sure if I keep staring at it and look up some of those functions that it will,

    Thanks again.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hi Guys,

    Time for another noob question, I want to be able to convert from decimal to hex and vice versa. Is there a math function in Construct 2 that can do it or should I just populate a large look up table?

  • I think the speed will vary from each implementation of webkit, the best would be to use c++, the python/GTK version plays Space Blaster with no lag but I couldn't get sound working.

    I used Sunspider to do some bench marking as it also does 3d tests.

                Comparison        Webkit C#(OpenWebkitSharp)    Chrome(13)

    3d:        2.45x as fast     102.8ms +/- 12.4%          42.0ms +/- 8.1%

    cube:       2.54x as fast      32.8ms +/- 34.4%          12.9ms +/- 22.8%     

    morph:      2.49x as fast      33.3ms +/- 40.3%          13.4ms +/- 8.4%    

    raytrace:   2.34x as fast      36.7ms +/- 39.2%          15.7ms +/- 7.4%     

    As you can see Chrome is consistently twice as fast.

    But as far as 3d acceleration goes, I'm doing this on a laptop running XP with a 3D card but not sure if it's being used. But for what I have read webkit does do 3D acceleration.

  • Hard to say, Space blaster is laggy but a lot of other games I tried were fine. I think there's better versions of webkit I could be using as well, but early indications are promising.

  • I've put together a C# wrapper, details can be found at this post

  • Hi Guy's,

    The PoC I did in python ( Previous post ) but it wasn't very practical. My next attempt was to write a C2 wrapper in C# using webkit (via OpenWebkitSharp)that would let your C2 projects look and behave a bit more like exe's.

    Essentially it's like having a webbrowser with no distracting controls on it to display your files on the desktop, in a way that makes it look like an ordinary application.

    <img src="http://dl.dropbox.com/u/41800350/desktop_sblaster.JPG" border="0">

    I tried using the inbuilt browser object in C# but it gave an error saying my browser could not render HTML5, I think it's cause I don't have IE 9 yet, so I'll need to do more testing.

    To get it going you just need to unpack the zip and edit the settings.ini file (even if you are just testing the copy of Space Blaster included).

    I've bundled it all up along with the source code and the HTML5 of Space Blaster as C2WebkitWrapper.zip (40 mb). All my test games worked OK but they arn't as intensive as something like Space Blaster so it was a good test. On my laptop I do get some lag here and their playing Space Blaster, but all in all the controls and sound are good. I've included a copy of space blaster in the package so you can see how it hangs together.

    I've also included a Settings.ini configuration file. This let's you customize a few aspects of the Wrapper (I have to think of a better name). Like:

    Name - Let's you customize what's written in the title bar.

    Url - This is the location of you C2 exported game files, this can be on the local disk or on the internet. Local locations start with file:// instead of http://

    Screen size: Adjusts the size of the exe's screen to suit your game.

    Thoughts:

    There's embedded versions of Mozilla's Gecko which I could try.

    Also OpenWebkitSharp can use nightly releases of webkit that would probably run a lot quicker than the default Cairo 0.5. Also there's Awesomium (awesomium.com) that let's you embed chrome but it has a licence and it might get messy.

    If I do get the embeded IE working it's not a great solution as you would have to ensure people are running something like IE 9, I'll post the results of that one as it's pretty easy to do.

    In my mind the best mix would be something like webkit, C++ and GTK.

    You could then compile for windows and Linux.

  • First of all I'd like to point out that I don't know what I am doing.

    This is really just a PoC (proof of concept).

    I didn't try compiling the python to exe.

    I was playing around with Python and Webkit and was ablt to render a Construct2 game as a program independent of the browser, so it looks more like a regular program.

    Here's a pic:

    <img src="http://dl.dropbox.com/u/11384284/desktop.JPG" border="0" />

    I left the "Made with Construct" bit to show what was happening.

    I used a python wrapper for webkit but your could use C++ or C#.

    On a side note another way (haven't tried it yet) is just to code up a form (program screen) with an embeded browser using C# or VB.Net, which opens index.html in the same folder. You could even put an decryption routine in the program so your html files can stay encrypted on disk.

    If anyone is interested here's the python code from the PoC (you also need python, pyGTK and pyWebkitGTK installed). Should work on windows or linux.

    import gtk

    import webkit

    win = gtk.Window()

    bro = webkit.WebView()

    bro.open("C:\Documents and Settings\Frankie\Desktop\8bit Mage\index.html")

    win.add(bro)

    win.show_all()

    gtk.main()

  • Woohoo I got 700, it's fun, I like it

  • Has anyone gotten sound working correctly via this method on Android?

  • I love it, good work

    Hotspots and audio for me.