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.


Topics - yoplalala

Pages: 1 2 3 ... 6
1
Extensions / Mouse Gamepad [0.2]
« on: April 06, 2021, 09:52:27 am »
Mouse Gamepad

Desktop

Enable to move the mouse cursor  with the gamepad.

Prerequisites

Don't forget to set the gamepad to the controls

http://www.stencyl.com/help/view/gamepads/


Stencyl Blocks



Enable the mouse gamepad for the scene or actor.



Set the speed of the Gamepad mouse. Default is 1.



You have to set all the options to different controls
For example "Joystick down" to control "down" .


Now on Gitlab :  https://gitlab.com/haxe-stencyl/stencyl-mousegamepad

It hasn't been tested for a long time.

2
Extensions / iOS Ambient Audio Extension
« on: April 01, 2021, 01:13:15 pm »
OpenFL iOS Audio Extension

This is the original extension https://github.com/grapefrukt/extension-ios-audio

I have just adapted  it to Stencyl.



Enables setting the iOS audio session as "ambient" to allow playback of external audio while playing a game. It also exposes a way to know if external music is playing or not.

# Stencyl specific usage

Enable the extension and then the app will enable to allow playback of external audio at the start of the Game.

Stencyl Blocks





You can enable or disable ambient music.


You can check if external music is playing ?



On Gitlab https://gitlab.com/haxe-stencyl/stencyl-extension_os_audio_ambient

PS: I haven't tested this extension for a long time

3
TOML Parser Extension



You can read about TOML here https://github.com/toml-lang/toml
or here https://toml.io/en/

Code: [Select]
# This is a TOML document.

title = "TOML Example"

[database]
server = "192.168.1.1"
ports = [ 8000, 8001, 8002 ]
connection_max = 5000
enabled = true

[servers]

  # Indentation (tabs and/or spaces) is allowed but not required
  [servers.alpha]
  ip = "10.0.0.1"
  dc = "eqdc10"

  [servers.beta]
  ip = "10.0.0.2"
  dc = "eqdc10"

[clients]
data = [ ["gamma", "delta"], [1, 2] ]

# Line breaks are OK when inside arrays
hosts = [
  "alpha",
  "omega"
]


Stencyl Blocks





will transform the previous toml text to a map.

Code: [Select]
{title => TOML Example, database => {server => 192.168.1.1, ports => [8000,8001,8002], connection_max => 5000, enabled => true}, servers => {alpha => {ip => 10.0.0.1, dc => eqdc10}, beta => {ip => 10.0.0.2, dc => eqdc10}}, clients => {data => [[gamma,delta],[1,2]], hosts => [alpha,omega]}}



Difference with official Specs



- Dates do not work

- In arrays, trailing commas don't work

  a = ["e", 4] OK

  a = ["e", 4,] NOT YET

- In arrays, only one double quotes list work

  a = ["aa","ee"] OK

  a = ['aa',"""eee""", '''eee'''] NOT YET


TODO Soon

- to be able to write toml back to a string


Improvements I want to make  but not soon

- accept ";" comments for total compatibility with .ini files
- give warnings when it doesn't obey to strict TOML guidelines
- be able to write comments dynamically to a toml file.


Improvements I want to make  but not soon





Now on gitlab :  https://gitlab.com/haxe-stencyl/toml_parser

4
Extensions / [IMPROVED] Leaderboard in Google Spreadsheet
« on: September 22, 2020, 04:30:12 pm »
Based on the idea of

[HTML5] Leaderboard in Google Spreadsheet
By Gurigraphics

http://community.stencyl.com/index.php/topic,51126.0.html

Sponsored by GameDev408

What's different ?
- It also works on desktop ( and maybe IOS and ANDROID)
- It supports more than the top 10 scores
- It supports multiple sheets. ( example a Weekly, Monthly and Alltime sheet)

Tips and Tricks

- Limit the number of rows in the spreadsheet

- Also have weekly, monthly  leaderboard


In the "Script Editor",

Go to "Edition" (Tool ?) -- Triggers from this project
Click on "Add a trigger" on the bottom left
Choose for the function
" RunEveryWeek'
Choose the source of the event
"hourly event"
then choose the weekly interval, etc .

TO BE CONTINUED ...

5
Extensions / Flite Extension Journal
« on: March 10, 2020, 02:56:50 am »
Flite Extension

( It is not yet finished nor uploaded)

( I kind of use it as a journal )

What is Flite ?

Flite is an open source small fast run-time text to speech engine.

You can test it here on android on google play https://play.google.com/store/apps/details?id=net.shallowmallow.speech.tts.flite  and hopefully soon on f-droid.

Could it be be useful for a normal Stencyl Game ?

Hum, I don't know.

It could be cool to have 4 or 5 voices and use them for different characters in a game for example.

But the problem is that most English voices are quite big > 20 Mo .  ( Even though I could I have  some at less )

So why a Stencyl extension ?

Part of bigger project

It's a part of a bigger project. I actually want to do Flite Api  in haxe . This for multiple reasons.

  • I could then do GUI for flite in plenty of platforms and make Flite more accessible.
  • When I write code for Flite ,  I could write in Haxe and not "pollute" the original Flite code
  • I'm actually maintaining an android app.  And it has C++ and I don't like it. In the future , I'll try to use this api for the android app.
[/size]
Part of a much bigger project

Which why I'm not so much on this forum lately ....

Basically I want to make plenty of voices for some "forgotten languages".

Interesting technically

It's the first I'm doing a pure C extension  / not android/ not IOS.

For now, it works basically , on android and linux.

I plan it to make it work on HTML5 with emscripten too .

If I'm able to do it. I'll be able to do more extensions of other interesting programs. :)


6
Ask a Question / is there a way of using Haxe 3.6 instead of haxe 4 ?
« on: February 12, 2020, 03:42:16 am »
I want to see if I still have a bug.

Basically this one https://community.openfl.org/t/german-umlauts-in-ios-missing/12254/6

7
Ask a Question / [Advanced] Screen rotation orientation IOS
« on: October 04, 2019, 04:47:27 pm »
General Problem
I'm trying to adapt https://github.com/HaxeExtension/extension-orientation
But as you can see the first image, the scene rotates but it goes at the upper left.
What can I do to move  it in the good place ?

My personnal problem  :
I have a sdk that forces me to use portrait in the plist.
Which means the landscape games appears as portrait. ( first image)
But when I try to rotate it back to landscape, as you can see in the second image, it rotates but appears small and not in the good place.


If someone has an idea ....c

8
Extensions / [Resolved] Problem making a tool extension
« on: July 26, 2019, 08:33:05 am »
When I compile on ubuntu 18.04  the sample game extension https://github.com/Stencyl/toolset-extension-sample


I modify  build-helper.properties  to my values
I have this error

Code: [Select]
Buildfile: /home/c/stencylworks/extensions/toolset-extension-sample-master/build.xml

dist:

helper.compile:
   [delete] Deleting directory /home/c/stencylworks/extensions/toolset-extension-sample-master/build
    [mkdir] Created dir: /home/c/stencylworks/extensions/toolset-extension-sample-master/build
     [echo] Compiling sources -> ./src
     [echo] Using classpath -> /home/consonne/Work/Stencyl/Stencyl-41/sw.jar
    [javac] /home/c/stencylworks/extensions/toolset-extension-sample-master/build-helper.xml:76: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 3 source files to /home/consonne/stencylworks/extensions/toolset-extension-sample-master/build
    [javac] /home/c/stencylworks/extensions/toolset-extension-sample-master/src/com/mysite/example/SampleGameExtension.java:12: error: SampleGameExtension is not abstract and does not override abstract method updateFromVersion(int,WorkerPriorityQueue) in GameExtension
    [javac] public class SampleGameExtension extends GameExtension
    [javac]        ^
    [javac] /home/c/stencylworks/extensions/toolset-extension-sample-master/src/com/mysite/example/SampleGameExtension.java:112: error: method does not override or implement a method from a supertype
    [javac] @Override
    [javac] ^
    [javac] 2 errors

BUILD FAILED

9
Ask a Question / Fullscreen on HTML5
« on: January 02, 2019, 07:59:49 am »
Do somebody know how to use fullscreen on html5 ?

10
Chit-Chat / Ubuntu firefox stencyl website
« on: December 27, 2018, 02:00:23 am »
Dont know where to put this info, but if you're like me and couldn't access stencyl website because you couldn't type your password.
There's a solution https://ubuntuforums.org/showthread.php?t=2394714

you have to install this package
https://bugzilla.mozilla.org/attachment.cgi?id=8974077
close and reopen firefox and tada ! You can enter your password at last !

11
Guides & How-To's / How to enter accented characters
« on: November 05, 2018, 10:53:08 am »
PROBLEM :

When you  you use

and you type characters like "é" , the character code is empty

SOLUTION

Sadly you cannot  find the character from the keyboard event. You are force to use a text field.
in the arbitrary code
Code: [Select]
var inputField= new openfl.text.TextField();
in the created Event
add a code bloc
Code: [Select]
Engine.stage.addChild(inputField);
inputField.type = openfl.text.TextFieldType.INPUT;
Engine.stage.focus = inputField;

In a when any key pressed event

Explanation:
Press key is my own block.
You have to use a do after 0 seconds, sounds stupid , but it is needed.
(Otherwise your textfield.text will be the last key pressed.   When any key pressed see the pressed key before the textfield does.

on focus event: when the game gains focus
Code: [Select]
Engine.stage.focus = inputField;
when click event
Code: [Select]
Engine.stage.focus = inputField;

12
Extensions / HaxeUI [0.0.1]
« on: October 30, 2018, 09:47:39 am »
HAXEUI Alpha Only For Stencyl 3.5

Haxeui is still in alpha so this extension is even more in alpha ^^. I still haven't made all the necessary blocks .
This extension have plenty of potential, some of which I haven't explorer at all ( creating new styles, etc ...)
I have tried plenty of things , but there are so many to tests . Don't hesitate to post how you use so we can learn from you.
and the bugs you find ( I won't be able most of them) but then we can have a list of components that work everywhere.


Integration With Stencyl

For now, you can only add components to the screen. ( Theoritically, you can add :them to actors,  but mouse events won't work so it's useless.  Hopefully I'll find some workaournd) which will be over everything

  • Components will automatically clean when the changes scenes
  • When you change screen size , components will automatically adapt
Using some xml
I totally recommend to use as much as possible xml for the layout. like this is the extension change, or haxe-ui changes , it will stay compatible ( remember haxe-ui  is still in alpha too)

Don't hesitate to use http://www.haxeui.org/builder or http://www.haxeui.org/demos/explorer/ to better understand. You will notice he 'll subdivise  in in a xml file for the layout, a css file for the style and hscript file for the code.

Some example or working xml, where everything is mixed
Code: [Select]
<vbox id="main" width="100%" height="100%" style="padding:10px;">
    <style>
        #scroll1 .scrollview-contents {
            width: 100%;
        }

        #scroll2 .scrollview-contents {
            height: 100%;
        }
    </style>
    <hbox width="100%" height="100%">
        <vbox width="70%" height="100%">
            <scrollview id="scroll1" width="100%" height="50%">
                <button text="Button 1" id="button1" width="100%" />
                <button text="Button 2" width="100%" onClick="trace('hello world')"/>
                <button text="Button 3" width="100%" />
                <button text="Button 4" width="100%" />
                <button text="Button 5" width="100%" />
                <button text="Button 6" width="100%" />
                <button text="Button 7" width="100%" />
                <button text="Button 8" width="100%" />
                <button text="Button 9" width="100%" />
                <button text="Button 10" width="100%" />
            </scrollview>
            <tabview  width="100%" height="50%">
                <vbox text="Positive Bullets" width="100%" height="100%">
                    <button text="very good height and distance" width="100%" toggle="true" />
                    <button text="good take off and landing" width="100%" toggle="true" />
                    <button text="effortless throughout (including rhythm in a combination or sequence)" width="100%" toggle="true"/>
                    <button text="steps into a jump, unexpected or creative entry" width="100%" toggle="true"/> 
                    <button text="very good body position from take -off to landing" width="100%" toggle="true"/> 
                    <button text="element matches the music" width="100%" toggle="true"/>                                   
                </vbox>
                <vbox text="Negative Bullets" width="100%">
                    <button text="very good height and distance" width="100%" toggle="true" />
                    <button text="good take off and landing" width="100%" toggle="true" />
                    <label text="very good height and distance" width="100%" native="true" />
                </vbox>
            </tabview>
        </vbox>
        <listview id="scroll2" width="30%" height="100%" native="true" >
            <data>
                <item value="3A"/>
                <item value="4F"/>
                <item value="CCSp3"/>
<item value="3Lz+3t"/>
            </data>
        </listview>
       
    </hbox>
</vbox>







Blocks

Creating Components

The attributes must be some dynamic attributes.

Make Component From Xml
Important you must type the whole string. You cannot put the string in an attribute. It is used as compile time.

Make Component From String

Making Components Dynamically



Showing Components

Adding to screen
You can add components/ containers to the screen.  It is better to add components to containers and containers to screen.


Adding to other components containers



Example
( In fact containers are also components)


Find Child/Ancestor Component
Useful to find a child/Ancestor by id  ( don't forget to use place ids always useful)

Example
You have imported an xml. And now you want to modify some attributes

Here, when you click on the button, it will trace the message.

Useful Links
haxeui api = http://haxeui.org/api/haxe/ui/components/Button.html

Dependencies
- hscript  https://github.com/HaxeFoundation/hscript
- haxeui-core  https://github.com/haxeui/haxeui-core

Tips and tricks
- try to use xml, it is better for predicting the result and not to forget anything
- use width and heght in percentage, as otherwise it will be pixels and behave the same with everythy screen

TODO
[ ] having the choice between adding a component forever or just to the scene
[ ] being able to add components to actors
[ ] making some options between components that scale to the screen size and some that stay the same ?

BUGS AND PROBLEMS FOUND
- In Flash, works well but there's an error with permissions
- Vertical sliders dont work well ( the filling is inversed).

13
Ask a Question / ios audio extension
« on: October 27, 2018, 12:03:42 pm »
Sponsorised by Colin Lane.

Here is an extension I made for Colin. It stops Stencyl from blocking audio on ios.
There's a block to check if some outside music is playing, but I heard it didn't work.


You just need to activate the extension, you don't need to use blocks to make it work.

14
Extensions / Minifier Extension [1.1]
« on: October 13, 2018, 06:51:11 am »

Minifier DCE Extension

This extension is a convenience extension for Stencyl users, it just adds specific flags, which enables DCE, Dead Code Elimination.

It removes unused code, which saves place.

Doesn't work well for html5.

Tested on Stencyl 10500

Example

|                                        |                                         | Without DCE | With DCE   |
| ----------------          | ----------------             | -----------          | ----------        |
| Blank Game            | Flash                             | 807k                  | 506k               |
| Blank Game            | Linux                             | 28.5 Mo           | 16,7 Mo        |
| Real Life Game 1 | Linux                             | 43 Mo               | 33 Mo             |
| Real Life Game 2 | Android                       | 59.482 KB     | 57.689 KB    |
| Real Life Game 2 | Windows( zipped) | 132.646 KB  | 131.270 KB |
| Real Life Game 2 | Mac                                | 37.3 Mo          | 32 Mo             |
| Real Life Game 2 | iOS Simulator          | 21Mo               | 16 Mo             |


Where can I know more about DCE ?

https://haxe.org/manual/cr-dce.html


It doesn't compile after activating the extension ...
It has removed too much code.

If it because of your own code, you can put  after the imports

@:keep

You can add also haxe flags

```
--macro keep('type dot path')
```

If it is a normal Stencyl game without extensions, don't hesitate to contact me, I'll adapt the extension for you.


And what about html5 ?


You can upload the file  of your game, for example BlankGame.js to

https://jscompress.com/



For a 3mb blank game, you can have 46.43% compression, saving 1354.9 kb  .






Now on gitlab

https://gitlab.com/haxe-stencyl/stencyl-minifier

15
Extensions / [Unity Ads] Need help testing new extension on IOS
« on: September 16, 2018, 02:41:06 am »
I'm rewriting the old unity app extensions.

I have a IOS simulator, but on there unityads and prints don't work, so I have no idea , it works or not.


Here is the extension :


What I need to know :
- do the video appear when you show the unity ads ?
- what happens when you sho the rewarded unity ads ?
When you click on the different buttons ?

And of course the error messages if there are any ;)
 

PS: if you don't have a unity account

you can put this ios app id:   1548948
and show the placement id :    video


Pages: 1 2 3 ... 6