That said, at least two high profile Heaps games have been ported to mobile, so it can’t be impossible. #STENCYL SHADERS ANDROID#OTOH I’m not 100% about native support for iOS and Android (see iOS and Android support #STENCYL SHADERS CODE#It definitely supports asset reloading and perhaps even for code (no idea though). HashLink is part of a rather tightly integrated stack centered around Heaps, which also offers its own editor.And you can still compile the whole thing as cpp.Īs for deciding for one over the other, it’s a matter of choosing an eco system: If done correctly, you can basically have the speed of cpp and the compile times of cppia (and again having an interpreter opens up various possibilities). The intended use of cppia is to prebuild a “host” with cpp (that has all the performance critical code in it) and load cppia scripts into that. In cpp+cppia the difference between compile times and execution speed are further apart. AFAIK Shiro actually runs shipped games on it, because the difference is negligible enough, but using an interpreter has its own advantages. In HashLink, the interpreted mode’s runtime speed is reasonably close to compiled mode. And last but not least: creating a VM specifically tailored for the language you’ve created must be a fun thing to do for people who enjoy that kind of work. I’m not sure how mature cppia was at this point (I suppose it was about 1-2 years old at the time). Neko was certainly not going to provide the necessary performance, because by design it was a runtime for dynamic languages (meaning all the strictness Haxe imposes goes to waste). And making OpenGl bindings for nodejs isn’t much fun either (also I’m not 100% Nicolas has overcome his skepticism towards nodejs). JavaScript would’ve been an option, either with WebGL in node-webkit/electron or nodejs + OpenGL bindings (or some such thing). IIRC way back when ShiroGames began shipping their first game (AFAIK based on what would later become Heaps) targeting Adobe AIR, which at the time was probably the best sweet spot between compile times and performance.ĪIR itself was on its way out and didn’t perform that well. The answer as to why there are two solutions is grounded in history. The third one is a hitspark effect that only lasts two frames.For starters, please compare the compile times and runtime performance (for CPU bound operations) on targets relevant to the context of this question: Haxe formatter_noio benchmark The first one simulates the look of a divot by pinching in everything toward the center and the second one creates smoky undulations when spun around. Here are some example textures that I'll draw into the sampler buffer to get some displacement. For reference, a completely neutral sampler that evokes no distortion would have every pixel be #007F7F (except GameMaker for whatever reason flips r and b so it's $7F7F00). The red value is a sine/cosine height value to mimic shimmering water or uniform heat haze. The green and blue values in the sampler buffer are horizontal and vertical displacement buffers respectively. This is doing a couple things, so I'll break it apart. Gl_FragColor = texture2D(gm_BaseTexture, texCoord) Float hor = texture2D(s_alphaTex, v_texcoord).g įloat ver = texture2D(s_alphaTex, v_texcoord).b įloat wav = texture2D(s_alphaTex, v_texcoord).r
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |