Stencyl 3.4.0 is now out. Get it now!

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

Pages: 1 2 3 ... 72
Ask a Question / Re: Distort an image by its corners
« on: Today at 03:13:26 am »
SadiQ is referring to this (copy paste this in an code block (Flow -> Advanced  -> Code: )
Code: [Select]
var vertices:Array<Int> = new Array<Int>();
var indices:Array<Int>  = new Array<Int>();
var uvt:Array<Float> = new Array<Float>();
var image:BitmapData;
var bitmap:flash.display.Shape;

// provide an image
//var bitmapData:BitmapData=cast(getGameAttribute("Image"), BitmapData);
// or make a color one yourself
var bitmapData:BitmapData=new BitmapData(1024,1024);
bitmapData.fillRect(new flash.geom.Rectangle(12,12,1000,1000),0x99999900);
bitmap = new flash.display.Shape();


vertices = [0,0, width,0, 0,height,width,height] ;
indices = [0, 1, 2, 1, 3, 2];
uvt = [0,0,1,  1,0,1,  0,1,1,   1,1,1];


var struct = { a:0, b:width};

Actuate.tween(struct, 2, { a:width/2, b:width/2 } ).onUpdate(function() {

   // we push pixels to top

    if(uvt[5] > 0){
     uvt = [0,0,0,  0,0,0,  0,0,0,   0,0,0];

// struct is tweened from 0,width to width/2,width/2 in 2 seconds

   vertices[0] = struct.a;

     vertices[2] = struct.b;;;, openfl.Vector.ofArray(indices), openfl.Vector.ofArray(uvt));;

}); // Tween
// When you want to use the image later
//engine.setGameAttribute("Image", bitmap);

Extensions / Re: HTML5 Mobile Extension
« on: Yesterday at 10:35:37 pm »

Well the example you gave doesn't use the webview as far as I can see it.
To embed a web page in your app, add the webview tag to your app's embedder page (this is the app page that will display the guest content). In its simplest form, the webview tag includes the src of the web page and css styles that control the appearance of the webview container:

<webview id="foo" src="" style="width:640px; height:480px"></webview>

I've tried that webview container but it doesn't work. I might be doing something wrong because I never used it before.

Existing Extensions can't be used as they use different software languages.

Extensions / Re: HTML5 Mobile Extension
« on: Yesterday at 10:13:07 am »
You need to give me an actual example. I've tried some webview things and they didn't work. If it doesn't work we can't create an extension for it.

Extensions / Re: HTML5 Mobile Extension
« on: Yesterday at 05:50:39 am »
Can you provide an example that works with webview on HTML5 on Chrome?!
When I have the javascript/HTML code I might be able to make a block for it.

Journals / Re: Merrak's Isometric Adventures -- Physics!
« on: December 04, 2017, 08:23:54 pm »
Wow a big update!
That is looking awesome.

Once I sat down to think of features, I realized just how much time a proper editor will save, so I think it will be a good investment of time.

Yeah, I totally agree. The time spend will be worth the while. And to be honest creating an editor you use the same stuff and you get an idea of how good or bad it is implemented.

Journals / Re: 3D Library Adventure
« on: December 04, 2017, 08:12:00 pm »
Time for a new update on the Journal.
Live got in yesterday which prevented me to complete the Ludum Dare entry. I will work on it some more as I wanted to explore the
Tile aspects of the 3D.

For the past two weeks I’ve been working on turning a 2D game into a 3D game.

I think it would help migrating from 2D programming into 3D if it could be done with less blocks than I previously started out with.

So, I’m breaking things down into smaller demos that users might be able to pick from and copy / export the behavior.

What I found when working on converting a 2D game to a 3D game was that I had to repeat a lot of blocks.

So I present to you the following prototype:

You would be able to use this block together with regular Stencyl blocks.

For instance:

What this does is to create a 3D object with the arguments supplied and binds it to the Stencyl Actor.
So when the Stencyl actor is moving it will move along with it. The benefits are that more regular Stencyl ways can be preserved
as well as we can use the Box2D engine for physics.

This is a Demo for a 2D game where four people can share a keyboard (or in my case would use 4x blue tooth keyboards)
to move snakes around that can eat the apple.

2D version:

3D version:

The 3D version really has 4 Away3D blocks: Init engine, Remove object, create and bind, Remove engine

Next you can add more 3D features as you go along. You can play the final version I've made:

Play with WASD, Arrow Keys  and to navigate snake 2 and 3 : TFGH, IJKL

To switch views you can use the 'm' key

Next: Game with tiles

(With thanks to SadiQ for creating the 2D snake game)

Journals / Re: 3D Library Adventure
« on: December 03, 2017, 01:07:56 pm »
Just a preview of what I'm working on inspired by LD40. Tomorrow I hope to work on it a bit more and turn it into a little game. And update this Journal as well with some new things I've done with the Extension.
Mostly turning 2D into 3D stuff.

Shared Resources / Re: Multiplayer Extensions Resource List
« on: November 28, 2017, 03:17:15 am »
You can put the isConnect to the text_func == logout too.
Currently you need to alter some code to work on 3.5. I've not published a 3.5 version as things might change and I wait for the official 3.5 release. If you want to use the extension on 3.5 before launch you should inspect this Thread :

Change code    to   cast(, URLLoader).data

If you do that on all the multiplayer extensions it should work on 3.5

Shared Resources / Re: Multiplayer Extensions Resource List
« on: November 28, 2017, 02:23:01 am »
Hi RulezTeam,

As always I strongly recommend using the examples to indicate a problem since we both can test.

I set the [ set debug on ] on the board event (Free_Tic_Tac_Toe game)

When in-game the heartbeat is shown.
When using the back button to go to the login page the heartbeat messages don't appear until I click on the login button.

So my estimation is that you somewhere have the logic to keep getting the heartbeat. 
Again: use lots of debug trace calls to inspect the flow of your game to pin-point the problem.

Shared Resources / Re: Multiplayer Extensions Resource List
« on: November 28, 2017, 01:46:19 am »
Well then we need to inspect your code very, very closely.

Because if you added the isConnect=false; in the Logout function like this:
Code: [Select]
public static function Logout(Player_ID:Float, func:Dynamic){
                // Logout = Kick player out of room

Then this part should never be done:
Code: [Select]
  public static function hearts(){
                if(SecondCounter % HeartBeat == 0 && isConnect){

Maybe you can use print(trace) blocks to find out why the isConnect is not set to false.
You might be re-initialize things and/or don't use the Logout block where you think you did...

Journals / Re: SkateRide - Isometric Skateboarding Sim (demo coming soon)
« on: November 27, 2017, 09:30:42 pm »
This is amazing. Your first post and it shows incredible amount of work and knowledge!
Excellent work!

How did you do the zooming part?

Shared Resources / Re: Multiplayer Extensions Resource List
« on: November 27, 2017, 09:26:59 am »
Hi RulezTeam,

There is a Logout block for the turn.
But I noticed that the isConnect is not set to false.

So to make sure that the heartbeat stops beating add this line to the Logout code in Turn.hx:
Code: [Select]

Maybe that will solve your issue?!?

Ask a Question / Re: Getting and checking user input for a text adventure
« on: November 26, 2017, 09:19:31 pm »
Sorry that it doesn't do magically what you want. It will take more effort to make it do exactly what you want. Good luck with it

Ask a Question / Re: Getting and checking user input for a text adventure
« on: November 25, 2017, 12:07:07 pm »
Hey Galdon2004,

The upgrade behavior is not mine, but the 3_3 is.

The focus is not done automatically due to the 'sudden' appearance of the keyboard in such a matter.
But if you want it, you can definitely do so.

I've uploaded a specific version of the behavior for your focus related issue:  Tested with 3.5

Now the input focus is immediate.

The value can be obtained by using the get actor value block . The value is stored in 'Value'
If you want to clear the text use the set actor value block instead of the get actor value

Hope this helps.

Journals / Re: 3D Library Adventure
« on: November 20, 2017, 12:04:23 pm »
It takes me a lot of time learning this 3D stuff. It is fun, but not very productive.

Unfortunately there are no examples on most of the library functions. There are some showcase examples that I ported to Stencyl but things like camera movements, lighting, animations and ‘regular’ gaming mechanics are hard to find.
There seems to be a ton of methods/shader possibilities but many of them need specific ways to call / use them. Or, I still need to figure out what the underlying methodology is.

@Merrak: I still don’t have a satisfactionary fog method working; although Away3D seems to support several shadow methods.
Some lighting effects only work on Directional Lighting :(   One Fog method that looked fine works on Directional Lighting!
The flash-light effect (PointLight) that I’m using for the maze game doesn’t seem to support this.

@ChristianEs :

Most of the work I’m trying to do is to mix/match the 3D stuff with the 2D way of Stencyl

For instance the Maze Game works with tiles and actors. So the collision detection and positional display of the actors are the foundation of the game.
I’m trying to use the Away3D library to display the 2D stuff in a 3D view. So I played around with lots of camera rotation/placements.

Take for instance the Maze Grid:

Those are ‘just’ tiles from Stencyl. The target objects (BeachBalls) are actors on that grid and the player is also an actor. And even the spotlight (flash-light) is an actor that is moved when the player moves. Afterwards I hide the actors and tiles.

What I do is to create an actor and bind the 3D object to the actor using this block:

When the actor is moved the extension will make sure that the position of the 3D object will reflect the position of its actor.
I will need to do a lot of experiments with this, because I think only a limited number of game-mechanics will be able to support this method.

But for now using the actor properties combined with the 3D functions gives (in my opinion) a nice ‘stencyl-way’ of doing things:

Rotating Beach Ball:

Hopefully the learning experience for extension-users will not be as hard as what I need to go through to make the extension .. we will see

I’m currently making a demo game with most of the core blocks/functionality in separate scenes, with separate behaviors, so hopefully it will be easy to learn / use the different parts of the engine.

And to conclude: ‘I am a proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.’
But I can’t resist doing them!

Pages: 1 2 3 ... 72