Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by laborin

UPDATE: Texture mapping is now working. Sadly, it slows down considerably in my mobile safari (iphone 5) but you can deactivate texture mapping or shadows to improve performance. WORKING GREAT under ejecta, demo running at 60fps on iphone 5 - iOS7.

Hi, first time posting here.

I will be sharing some code, starting with this little plugin. It would be great to see pull requests with improvements. I'm thinking of adding texture mapping but I'm not sure about how will it affect the performance and how should I set the textures for the side faces, I don't think it's a good idea to use the same regular map tile for the 3D depth faces.

plugin repo
demo video
playable demo

1 decade ago by Joncom

That's a pretty cool 3D effect.
Good work, and thank you for posting a demo :)

1 decade ago by stillen

Looks pretty cool, similar to something I was trying to accomplish. It would be awesome if you put up a simple working demo to go along with the repo and the video.

I definitely would take a look at that and try to help out with improvements

1 decade ago by matthewjames

Hello, unable to access the repo right now, must be a local issue. Does this plugin require any modification in the terms of art etc or is it a load/call and done?

Thanks in advance for the cool plugin.

1 decade ago by laborin

Thanks! I thought i will receive notifications on replies.

Matthew, the only requirement is that your 3D map should only have square tiles (no slopes, no round corners). And to make it work, you only have to rename your map in weltmeister to have "3d" at the end.

I have just added a demo to the repo, its based on the super generic jump and run sample. All i did was edit the grass level to only have square tiles and activated the plugin adding renaming the "main" map to "main_3d". The ice level remains the same, without the 3d effect.
Here is the demo running

1 decade ago by Joncom

The first level of the playable demo looks fantastic!! :)
Quote from laborin
The ice level remains the same, without the 3d effect.
Slope support would be pretty awesome too!!
I have no idea how difficult this would be though...

1 decade ago by laborin

Quote from Joncom
The first level of the playable demo looks fantastic!! :)Slope support would be pretty awesome too!! I have no idea how difficult this would be though...


Thanks. I have to think a little bit to figure out how to do add slope support.

However... i've just added texture mapping =), check out the demo again.

1 decade ago by Joncom

Quote from laborin
Thanks. I have to think a little bit to figure out how to do add slope support.

However... i've just added texture mapping =), check out the demo again.
That looks SO good!! How does a specific block know what texture to use for the top versus the sides? I can see they are not the same...

1 decade ago by laborin

Quote from Joncom
That looks SO good!! How does a specific block know what texture to use for the top versus the sides? I can see they are not the same...


You can override the default tile with another one from the tileset. In the demo i set two overrides:
ig.textureOverrides["main_3d"] = {
    77: {"top": 176}, //Change the top face for tile 77 to 176
    119: {"top": 179}
};

Where "main_3d" is the name of your backgroundMap. This way you can override the default tile for the top, left, right and bottom faces. The bad part is that you have to know the tiles by its number. Maybe a weltmeister plugin could help here, but i've never player with weltmeister.

1 decade ago by matthewjames

Is the texture mapping commited already? I would like it :P.

And slope support would be amazingggg for my game.

1 decade ago by laborin

Quote from matthewjames
Is the texture mapping commited already? I would like it :P.

And slope support would be amazingggg for my game.


Yes, the texture mapping part is in the repo. Slope support will definitely be the next thing i add but don't expect anything for a few days, first i have to do some real work as playing with impact is what i do in my procrastination time and now i'm late for a deadline =P.

1 decade ago by laborin

It would be great if someone test the demo project under ejecta and tells if it runs faster than in mobile safari.

1 decade ago by stillen

I build this in ejecta.

I was getting 30fps on the opening screen, but then when playing it went down to about 7fps. This was unbaked, and with the shadows and texture on. I didn't make any changes b/c I was at work.


The demo should be baked or should remove the impact folder on github, otherwise anyone who comes across this will have a free copy of impact.

1 decade ago by laborin

Quote from stillen
I build this in ejecta.

I was getting 30fps on the opening screen, but then when playing it went down to about 7fps. This was unbaked, and with the shadows and texture on. I didn't make any changes b/c I was at work.


The demo should be baked or should remove the impact folder on github, otherwise anyone who comes across this will have a free copy of impact.


You're right, thanks. I've just backed the game in the live demo and removed the core impact files from the repository history.

What device are you using for testing? It runs smoother in my mobile safari (iphone 5 with ios 7). I am getting about 22 fps in the grass level and full 60pfs in the intro screen and the ice level. I run this in the safari console (linked to the iphone):
> (1/ig.system.tick)
< 22.222222222242433

I was expecting a dramatic speed improvement with ejecta. Maybe your device is older or maybe ejecta is slow with canvas transforms. I'm trying ejecta tonight to see what's going on.

1 decade ago by stillen

I took these screen grabs from my iOS simulator. I was getting similar results on the devices.

iPhone5 iOs6 Mode
http://imgur.com/sG6pxuS,qFw4Nam

iPad2 iOs6
http://imgur.com/sG6pxuS,qFw4Nam#1

The landing screen was 60 on my iPhone, 30 on my iPad

1 decade ago by laborin

So bad, I really was expecting a much better performance under ejecta =(.

However, it still looks good without texture mapping and runs as smooth as without any 3d effect:
> ig.game.getMapByName("main_3d").deepMapEnabled = false;
< false
> (1/ig.system.tick)
< 58.823529412368934
> ig.game.getMapByName("main_3d").deepMapEnabled = true;
< true
> ig.game.getMapByName("main_3d").textureMappingEnabled = false;
< false
> (1/ig.system.tick)
< 62.49999999970157

Im going to add the ability to set a specific color for each face when running without texture mapping, this way we could turn off features depending on the average framerate, without making it look sad gray.

1 decade ago by stillen

I just picked up an ipad Mini, and was getting a solid 30 fps. The first time I build it, it was dragging at 6-7, but then I clean it out and retried it and was getting 30.

1 decade ago by laborin

I did my tests on ejecta today, with an iPhone 5 (iOS 7) and its running at 60fps. Came here to post about it and saw your update.

I didn't changed anything to the source, just dropped the sample game in the Ejecta App folder and it ran smoothly. In the simulator its running at about 6fps, but it works perfect on real device.

- Off topic -
I tested Pyton Impact, its perfect to to run your game in the browser from the ejecta's App folder. Just don't forget to remove the debug plugin when building for iOS, or do what I did:
.requires(
	/*..other modules...*/
	'plugins.deep-map',
	window.ejecta ? 'plugins.null-module' : 'impact.debug.debug'
)

Where null-module is an empty module. I did it that way because I don't know how will impact behave if I set an empty string in the requires.
Page 1 of 1
« first « previous next › last »