2d-games

Android 2D Game With OpenGL

我是研究僧i 提交于 2019-12-04 19:23:54
Recently I worked on a 2D Game using SurfaceView and I learned a lot about game loops and everything. But now I want to make the same game using OpenGL. I read that the GLSurfaceView is the class that would be relative to what SurfaceView was. But I'm not sure about other things as: Using SurfaceView , I used the Bitmap class to load a image resource that would be lets say a character. And that bitmap would be a property of my Character class. And for the gameloop I used a different Thread I'm new to OpenGL so I'd like to know how to load image resources (do I load them using the Bitmap class?

Java: Using Swing for programming games

佐手、 提交于 2019-12-04 10:33:12
I am relatively new to game development. I have been developing games and studying game development for 2-3 months now. I use Java. I have always used Swing for my graphics (aka, the entire game is displayed on a JPanel , using a Graphics2D object). I had no trouble with this up until now. Very recently, I came across a problem in my most recent project. Some method has problems with being called in consistent time intervals (sometimes it runs every 15-16 milliseconds, as it should, and sometimes it starts to run every 3000 (!) milliseconds). I did some frustrating debugging and some research,

How to find Resolution under Delphi XE5

↘锁芯ラ 提交于 2019-12-04 04:19:45
I started to develop a game under Delphi XE5 for iOS. I have problem with the Resolution feature of the Firemonkey. When I open the screen and I check resolution on the iPhone I get 320x480. But the native resolution of the iPhone 4 and 5 is doubled. I found at official Delphi pages that FireMonkey is recalculating the screen by "Resolution" which is for Retina display 2. I think this is cool feature for regular apps, but when you start to do game and you want to manipulate with images by code it brings weird situations. My question is - is there way to find the actual Resolution value or at

how to make Sprite follow bezier curve

半世苍凉 提交于 2019-12-03 13:58:27
问题 Im fairly new to objective-c and sprite kit but i've done games development for a while. Im currently working on a 2d game and i have enemy ships moving from right to left on the screen. Ive been following tutorials for different parts of my game and then adding to it where necessary. I found a tutorial where the in game enemies follow a bezier path and i've managed to implement this in my game however as i'm new to bezier curves i do not fully understand them and the algorithm makes my

Toolkit Options for 2D Python Game Programming [closed]

陌路散爱 提交于 2019-12-03 09:02:54
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . What are some toolkits for developing 2D games in Python? An option that I have heard of is Pygame, but is there anything that has

Unity 4.6 - How to scale GUI elements to the right size for every resolution

北城余情 提交于 2019-12-03 02:20:23
问题 The new Unity 4.6 comes with a new GUI, when I change de resolution on Unity the UI Button scales perfectly but when I test on the Nexus 7 device the Button looks too small. Any idea how to solve this? 回答1: Unity's new GUI system uses "anchors" to control how gui elements (like buttons) scale in relation to their parent container. Unity has a tutorial video on how to use the new "Rect Transform" component (where the anchors are configured) here: http://unity3d.com/learn/tutorials/modules

Corona: how to capture a screen in corona?

佐手、 提交于 2019-12-03 00:40:37
问题 Can anyone suggest how to capture a screen in corona both full screen and particular portion of it? 回答1: Try this. It will work : local function captureDeviceScreen() local captured_image = display.captureScreen( true ) captured_image:scale(.5,.5) local alert = native.showAlert( "Success", "Captured Image is Saved to Library", { "OK" } ) end Runtime:addEventListener("tap",captureDeviceScreen) 回答2: A google search produced this link: How to capture a screen in corona If you are having issues

Unity 4.6 - How to scale GUI elements to the right size for every resolution

柔情痞子 提交于 2019-12-02 15:51:09
The new Unity 4.6 comes with a new GUI, when I change de resolution on Unity the UI Button scales perfectly but when I test on the Nexus 7 device the Button looks too small. Any idea how to solve this? Unity's new GUI system uses "anchors" to control how gui elements (like buttons) scale in relation to their parent container. Unity has a tutorial video on how to use the new "Rect Transform" component (where the anchors are configured) here: http://unity3d.com/learn/tutorials/modules/beginner/ui/rect-transform . The last half of the tutorial is all about anchors. That page has links to the

Slow Java2D Drawing on Integrated Graphics

杀马特。学长 韩版系。学妹 提交于 2019-12-02 07:48:28
I'm working on a simple 2D game, rendering via the Java2D API. I've noticed that when I try to draw on integrated graphics card the performance crashes. I've tested this game on both my main rig with a newer ATI Radeon and my 5 year old laptop which also has an (incredibly antiquated) Radeon. On both I get good FPS, but when I try to use my Intel i5's onboard HD 4000 graphics, it crawls at around 20 FPS. I'm using Full Screen Exclusive mode. At any given moment, I am rendering approximately 1000 images at once. Annoyingly, when I try to getAvailableAcceleratedMemory() it just returns -1 for

How to get started with andengine [closed]

你说的曾经没有我的故事 提交于 2019-12-01 18:23:14
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . Are there any good resources to get started with Andengine? Any good tutorials, blogs or books? Of course, I have visited its official website http://www.andengine.org/, but I didn't think the documentation they have is a good starting point. 回答1: I started with AndEngine not long ago, these are the thing that