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

Pages: 1 2 3 ... 46
1
Extensions / Re: Web Extension
« on: July 07, 2017, 04:06:35 pm »
Quote
Are there any plans to create a web extension just for desktop as well?
I'm not using Stencyl at the moment.

Desktop and Web you can use a HTML5 Game inside Electron.
https://electron.atom.io/
Discord, for example, is a Electron App

Or then NW.js
https://nwjs.io/

2
If you make a game you really like, surely others will like it.
But liking does not mean "thinking that liking."
Because people say one thing and do another.
What we really liking is what we more occupy time.

The harmony of your graphics and animations leaves no room for criticism.
If you solve the performance, you will be very close to a great game.
But you still have to face five other Boss: gameplay, level design, narrative, music and sounds.
And the last Big Boss: marketing.

That is why it is important do not leave this to the end, and already start gathering the army.
Even for those who say that they have no interest in money,
the Journals of development as you do is something that add value to game.
Because, how was said, the occupy time with something (or engagement) and liking (or desire) go together.

I studied the opposite that you: human sciences. My area is psychology. That's why I'm not very normal. ^^

3
Ask a Question / Re: How to make buttons to switch scenes on click?
« on: April 05, 2017, 11:40:18 am »
Yes.

4
Quote
When I ran my test to 66,000 repetitions, I never saw the population of tiles exceed 750. That's not an excessive number of images. None of them have transparency.

Does this code clear the memory?
Code: [Select]
Engine.engine.allActors.clr( a.ID );
Because, if does not exceed 750, why can not you get infinite repetition like my javascript example?

I updated the example.
http://canvas-test.bitballoon.com

layer1 = stencyl game
layer2= spawn particles
layer3= spawn mushroom green
layer4= spawn mushroom blue

P.s: I evolve from Spaghetti Code to multiple layers of Lasagna Code  :D

Edit: I tested , it's the block "remove from parent" that clean the instance images of memory.
I do not know if all browsers and users will have the same limit. But when get to 700add, can start deleting in sequence the first images add on the screen .

5
I get limit max of 1000 instance of images to browser crash with this example from LIBERADO

Just add this code to your player actor:
   


How do you get 60.000? You wrote that removes when overlapped. So does the limit remain the same?

6
Ask a Question / Re: Another way to do this?
« on: April 02, 2017, 08:18:29 pm »
Quote
If only one boolean attribute can be true at a time then why not use a single text attribute instead?

Yeah. You can also use nothing and only use events to make everything true or false.

However, if he wants to run this 60 times or 60 groups, what he really needs is use ID rather than text.
And create groups of 100 in 100.

Cactus_clan = 0
Cactus_1 = 1
Cactus_2 = 2

Tree_clan = 100
Tree_1 = 101
Tree_2 = 102

And use loop to iterate.
That's what I said on the other topic.
But without organization, it is easy to get lost.

7
Ask a Question / Re: Another way to do this?
« on: April 02, 2017, 07:29:51 pm »
Checking only one to change the others is simple.



To the state of one affect the state of all others, maybe it's better to use a realtime server with this already implemented.

8
Ask a Question / Re: Image API
« on: April 02, 2017, 05:15:19 pm »

9
Journals / Re: Merrak's Isometric Adventures -- Inventory
« on: April 02, 2017, 04:51:28 pm »
Quote
That's a neat idea. How did it work out? I imagine that for a game with a lot of players, that would require dedicated server resources (along with the expense of them).

The example I posted is out of air.

What I did was load Game1 on div1, and Game2 on div2.
While the player is on screen1, Game2 is hide or in a layer behind the canvas. This you control with z-index: -1, position: absolute.

Then I created an event by calling an external javascript function.

The function show div2 to display Game2, and deletes the contents of div1, hidden, and appends Game3 to loading.

Finally, there are only other events to check if the content has been loading and is available.

This is especially useful with musics which is usually the heaviest in the game, about 2-3Mb each when this is not a simple loop. A game with 30 musics, you do not need the 30 musics before the first stage. Nor wait to loading all this.

Depending on the load time, you can even know the speed of the internet, to know if you can or not loading the files in sequence, one after another. Or then, if you need to display loading for a given user. Anyway, the internet is now much less limited that before.

My Extension HTML5 lets do this without using any external code.

Quote
Your example runs really well on my computer. You should be able to achieve the same result with the Image API if you used the "draw image on image" block and render one image, instead of rendering tens of thousands of individual image instances. One idea I thought about was figuring out which tiles could never be walked behind and merging them into one large image.

Truth. I tested the example with Phaser and also overloaded the memory with 2,000 sprites.

Here the solution to 2-3x faster Box2D found by Scirra/Construct
https://www.scirra.com/blog/132/more-about-asmjs-powered-physics

Quote
The problem with spawning the tiles when the player walks between rooms in a scene is that I'm taking the big problem (loading time) and turning it into 12 little problems. I'm assuming load time scales linearly with the number of actors and tiles. If I'm wrong then I think your idea would be an easy solution to my problem... but unfortunately, I think it is linear. It takes about 30 seconds to load the scene. That would translate to roughly 2 1/2 seconds to load a single room. If I can get that down to half a second, then I can load tiles as the camera pans. But 2.5 is too long and would ruin the pacing. I want Prince of Persia style mad dashes across long corridors to catch a closing gate. That means individual rooms need to load very quickly.

Another possible solution would be this.

All the columns of your image above, as a single image in a layer.
And the whole floor as a single image in other layer. And collisions on a separate layer.

You would use Tiled only to draw the scenes. Each Loci of scene would have only 3 or 4 images.

The performance would be absurd. However, this increases the weight of images to loading.
But since you do not use many colors, it does not increase much.
And this also could be solved with my method above.
And if the game is desktop, do not even need it. The games usually have more than 100Mb.
And you're not going to use all that.

All other memory could be used with lighting, animations and so on.

Anyway, using only the floor as background would be much less tiles to process.

Another possibility that I do not know if is usefull is to convert bitmap to svg.
https://www.vectorizer.io/

10
Journals / Re: Merrak's Isometric Adventures -- Inventory
« on: April 02, 2017, 10:47:12 am »
I made an example with javascript.
Now I'm sure nothing remains in the memory with simple drawing.

http://canvas-test.bitballoon.com/


11
Journals / Re: Merrak's Isometric Adventures -- Inventory
« on: April 01, 2017, 10:38:06 pm »
Interesting concept. Improved 2x+-.

I perceived that with Chrome's framerate meter also consumes memory.
2,000 tiles of this example, 30fps with meter open. 60 with meter closed.
Probably the trash was of the graphics meter.
Because I do not see any problem drawing one tile over another.

The html canvas, for example, works like this:

Clean the screen
Draw tiles in positions
Clean the screen
Draw tiles in positions

This does not consume memory If you are not interested in the position and id of the old tiles.
And the tiles are draw in same layer.

It only complicates again if each tile is an actor, with id, layer and position control.
Because, the more actors, the more data - useful to be used.

But it's really unnecessary to spend memory to draw the tiles in the same positions.

This your same concept can be expanded on the x and y axis. Loading, create, spawn only parts of scenes and chars over a certain distance nearby to the player. As some games do with dark lighting (Remeber Command Conquer). Maybe Terraria uses this. Because the game takes place in a single giant scene.

It's similar to a idea what I wrote once. Export several separate scenes as games. And when play download only the main scene to avoid loading experience. When you play Scene 1, you are loading Scene 2: graphics, music, etc. And so on.

12
Chit-Chat / Re: What Graphics Card would you recomend?
« on: April 01, 2017, 07:35:24 pm »
It looks good. My card is Geforce.
I too need other Card.
And other Power Supply.
And other PC.   :D

13
Chit-Chat / Re: What Graphics Card would you recomend?
« on: April 01, 2017, 06:11:43 pm »

14
Journals / Re: Merrak's Isometric Adventures -- Inventory
« on: April 01, 2017, 02:41:16 am »
I think the problem is not just physics. I performed this test



Even using simple images continues with garbage in memory.



About overcoming Stencyl's limits, an simple example like this with 60fps is already impossible with Stencyl and Box2d.
http://brm.io/matter-js/demo/#sprites


15
Journals / Re: Merrak's Isometric Adventures -- Inventory
« on: April 01, 2017, 12:13:57 am »
Thanks for the answer.

I looked at the code. For me is very complex to change. I will not even try.  ^ ^

Code: [Select]
//TODO: For simple physics, we stick in either a box or nothing at all - maybe it autohandles this?
private static function createDynamicTile(shape:B2Shape, x:Float, y:Float, layerID:Int, width:Float, height:Float)
{
var a:Actor = new Actor
(
engine,
Utils.INTEGER_MAX,
GameModel.TERRAIN_ID,
x,
y,
layerID,
width,
height,
null, //sprite
null, //behavior values
null, //actor type
null, //body def
false, //sensor?
true, //stationary?
false, //kinematic?
false, //rotates?
shape, //terrain shape
-1, //typeID?
false, //is lightweight?
false //autoscale?
);

a.name = "Terrain";
a.visible = false;

engine.moveActorToLayer(a, layerID);

var key = "ID" + "-" + Engine.toPixelUnits(x) + "-" + Engine.toPixelUnits(y) + "-" + layerID;

engine.dynamicTiles.set(key, a);
}


Code: [Select]
public static function setTileAt(row:Dynamic, col:Dynamic, refType:Int, ref:String, tilesetID:Dynamic, tileID:Dynamic)
{

( ...)

//Now add the shape as a body
if(tile != null && tile.collisionID != -1)
{
// Copy the default shape into a new one that can be scaled to fit the tile size.
var refTileShape = GameModel.get().shapes.get(tile.collisionID);
var vertices = refTileShape.getVertices();
var vertexCount = refTileShape.getVertexCount();
var tileShape = B2PolygonShape.asArray(vertices,vertexCount);

// Adjust the collison shape based on the tile size.
for(vec in tileShape.getVertices())
{
vec.x *= (engine.scene.tileWidth/32);
vec.y *= (engine.scene.tileHeight/32);
}

var x = col * engine.scene.tileWidth;
var y = row * engine.scene.tileHeight;

if(!Engine.NO_PHYSICS && tileShape != null)
{
createDynamicTile(tileShape, Engine.toPhysicalUnits(x), Engine.toPhysicalUnits(y), layer.ID, engine.scene.tileWidth, engine.scene.tileHeight);
}
else if (tileShape != null)
{
getTileLayerAt(refType, ref).grid.setTile(col, row);
}
}

engine.tileUpdated = true;
}


Pages: 1 2 3 ... 46