andengine

认识AndEngine选自Android 2D游戏引擎AndEngine快速入门教程

99封情书 提交于 2019-12-06 19:37:45
认识 AndEngine什么是AndEngine 随着 Android 手机、平板的盛行, Android 下的游戏也不断的变得火热。而对于游戏开发有兴趣的同学们,应该也想要学习开发游戏。虽说游戏开发的引擎较多,但是大多数都需要花费一些资金才可以正式使用。而我们这里要讲解的 AndEngine 则是一个免费并且开源的 2D 游戏引擎。对于它的使用,读者不仅不必担心授权问题,而且还可以获得 AndEngine 源码,在需要的时候对其进行修改。本章就来讲解如何在自己的计算机上搭建一个自己 AndEngine 开发平台。本文 选自Android 2D游戏引擎AndEngine快速入门教程 1 . 1 什么是 AndEngine AndEngine 是一款面向 Android 平台的 2D 游戏引擎,它的整个项目是开源并且免费的。其官方网站是 www.andengine.org ,首页如图 1.1 所示。 AndEngine 主要使用 Java 语言开发,只有在一些比较耗时的功能上使用了 C/C++ 进行优化。 AndEngine 对 Box2D 的封装也十分惊人,在使用时会比同级别的物理引擎有更高的效率。 AndEngine 对大量的函数和方法进行了封装,在开发时会更为方便快捷。 本文 选自Android 2D游戏引擎AndEngine快速入门教程 图 1 . 1 AndEngine

Use different sprites texture in one generic pool AndEngine

孤街醉人 提交于 2019-12-06 14:40:56
问题 I want to use at least 9 image & they will be use via pool. But i can use only one texture for a Pool Class & can't use rest other. My code: Like: public class BubblePool extends GenericPool<Bubble> { public static BubblePool instance; private PixelPerfectTiledTextureRegion aITiledTextureRegion; public BubblePool(PixelPerfectTiledTextureRegion aTextureRegion) { if (aTextureRegion == null) { throw new IllegalArgumentException( "The Texture Region must not be null"); } this.aITiledTextureRegion

Showing adds in gameplay in AndEngine Android

时间秒杀一切 提交于 2019-12-06 14:13:55
问题 Hi I want to show adds at the top of the game in AndEngine. Can any one help me with this?? 回答1: Oops I got the answer so posting. @Override protected void onSetContentView() { final FrameLayout frameLayout = new FrameLayout(this); final FrameLayout.LayoutParams frameLayoutLayoutParams = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.FILL_PARENT, FrameLayout.LayoutParams.FILL_PARENT); final AdView adView = new AdView(this, AdSize.BANNER, "XXXXXXXXXXXXXXXXX"); adView

AndEngine - scroll sprites up and down

て烟熏妆下的殇ゞ 提交于 2019-12-06 13:23:16
I am a beginner andengine user and I need your help. I have created a class MySprite extending sprite and I want the sprite to move up and down on the y - coordinate when I slide with the finger on the Screen by touching only the sprite. I have tried to achieve this by implementing IScrollDetectorListener and IonSceneTouchListener but the Problem is: I can touch anywhere and my sprites moves. I would be glad if someone could help. For more Details just comment :) Sprite mySprite = new Sprite(x, y, textureRegion, this.getVertexBufferObjectManager()) { @Override public boolean onAreaTouched

Show different scenes for different levels. AndEngine

点点圈 提交于 2019-12-06 13:02:06
问题 I'm using AndEngine for a Game 2d. Wanna to load different Activities or better different Scenes for the different levels and for the main menu. How to achieve this ? ..Where can I find an example ? 回答1: I would recommend for you to use scenes instead activities to avoid black screens between switching activities. Create your own scene manager and use it for changing screens. Basic example: public class SceneManager { private static Game game; // your main activity private static SceneManager

How do I make a “Hello World” with andEngine inside Android Studio on a Mac

荒凉一梦 提交于 2019-12-06 09:54:10
I have tried a lot of tutorials and they are fairly complicated to follow or partly irrelevant now. How do I make a Hello World for Android using andEngine and Android Studio on a Mac? Scott This is my experience as of Android Studio v1.0 on a Macintosh to setup a Hello World example. (Although it's a blue background.) Goto https://github.com/nicolasgramlich/AndEngine and clone in desktop. Create a new library by going to File -> Project Structure (⌘;) then selecting the + button on the upper left hand corner. Under "more modules select "Android Library." Change the application/library name to

Looking for a method for flipping bidi (Hebrew) text so it would be displayed correctly in AndEngine

送分小仙女□ 提交于 2019-12-06 09:47:18
I've been lurking around the web for days trying to look for a code implementation (Preferably Java) for flipping Bidi text so it would be displayed correctly inside platforms that do not support Bidi text text out of the box. (Such as AndEngine). The optimal solution would be a method that I would provide it with Hebrew text, and it would return its content flipped. I could do this by myself but it's getting complicated once it gets to mixed strings of both English and Hebrew text, as well as I think it would be quite dumb for me to implement it as probably there should be much better

Should I use cocos2D or andengine?

久未见 提交于 2019-12-06 09:05:02
问题 What is the project the more active/Stable? Can you say me the deep diference between cocos2D and andengine? 回答1: I'm using AndEngine for one of my projects, and I must say, it's rather nice. A little comparision between LibGDX and AndEngine: 1) AndEngine Only for Android. High level, you propably won't need any direct calls for GL functions. Quite easy to learn, and to code with. There are versions (source) for OpenGL ES 1.0 / 1.1 / 2.0 (with support for shaders) 2) LibGDX Multiplatform

GL Maximum Textures Size Policy

拈花ヽ惹草 提交于 2019-12-06 08:48:54
I'm developing a game with AndEngine. Since I'm doing it for Android and I want to cover as many devices as possible without the textures quality trade off I have 2 texture packs types: the HD and the LOW: HD textures = 2048x2048 LOW textures= 1024x1024 HD camera = 800x1280 LOW camera = 400x640 I've have made all the logic of setting up a HD texture pack or a LOW texture pack, what I need now is a good policy for choosing witch to use when the app starts up. Using AndEngine's: GLState state = new GLState(); int max = state.getInteger(GLES20.GL_MAX_...); I came across some values: Model :

loading SVG in AndEngine

两盒软妹~` 提交于 2019-12-06 08:07:27
Is anyone familiar with AndEngine and loading svg's? Right now i am trying to load a background for a scene and it doesnt appear at all for some reason.. Here is th code i am using to load the SVG and attach it to the scene. //In my onLoadResources method this.mBuildableTexture = new BuildableBitmapTexture(1024, 1024, TextureOptions.BILINEAR_PREMULTIPLYALPHA); SVGTextureRegionFactory.setAssetBasePath("gfx/"); this.mSVGTestTextureRegions = SVGTextureRegionFactory.createFromAsset(this.mBuildableTexture, this, "background.svg", 16, 16); //OnLoadScene method final BaseTextureRegion