2d

2d Sprite Animations without using XNA or other third-party libraries

雨燕双飞 提交于 2019-12-03 03:20:40
I want to create a simple game, similar to what can be created with RPG Maker. What I am primarily looking for at the moment is a tutorial which can guide me on how to accomplish it without using XNA or any other specific library. The ideal would be a step-by-step tutorial or a good, easy-to-understand example. My goal is to do it on my own, and come to an understanding of how the overall process works with regards to animation elements relating to one another. I've already built a simple snake game in the past using a simple tutorial, but there was no movement animation in it and that's the

Java slow 2D performance - Resizing

China☆狼群 提交于 2019-12-03 03:09:09
I am using Windows 7 with Aero, and have a very fast graphics card (Radeon 6870) that I use for gaming. I have some issues when resizing very simple programs I make with java. For instance, this program does absolutely nothing. It has no action listeners, no loops. It's simply a GUI interface with buttons. Resizing with OpenGL acceleration off: [View fullscreen] It takes about a second to resize the components. For me that's very noticeable. Resizing with OpenGL acceleration on: I have tried to enable OpenGl acceleration to solve this problem. I compiled the JAR and run it with java -Dsun

html5 canvas strokeStyle?

空扰寡人 提交于 2019-12-03 02:31:09
问题 I am trying to map an image to a "3d" grid that simulates cloth using strokeStyle and canvas, i have the image included but it is currently acting as a background image and not actually flowing with the "cloth" as is ripples, I.E the image is static as the grid flows. here's the jsfiddle which is self explanatory ( only works in Chrome). any help is much appreciated. here is the javascript that renders the image into the background, How do i stop from rendering as a background image and only

Working with the coordinate system and game screen in Unity 2d?

 ̄綄美尐妖づ 提交于 2019-12-03 02:15:07
So I've developed games in other platforms where the x/y coordinate system made sense to me. The top left representing the game screen with coordinates of (0,0) and the bottom right was (width,height). Now I'm trying to make the jump to Unity 2d and I can't understand how the game screen works. If I had a background object and a character object on the screen, when I move the character around his x and y values vary between -3 and 3... very small coordinates and it doesn't match the game resolution I have setup (1024x768). Are there good tutorials for understanding the game grid in Unity? Or

Cant find suitable example for android 2d opengl sprite class wich does not use GL11Ext for drawing

好久不见. 提交于 2019-12-03 02:04:50
问题 As SpriteMethodTest says there are many ways for drawing sprites. Firstly, I tried canvas, and had some performance problems. Next, I decided to learn opengl. I made my first achievements using GL11Ext extension. However, you know by default, that when you draw textures they become flipped and the x and y axis have zero on the bottom left corner of the device screen (in landscape mode), not like the canvas, but you cannot rotate sprites. Then, I tried to affect this axis view using GLU look

Android OpenGL ES and 2D

╄→尐↘猪︶ㄣ 提交于 2019-12-03 01:29:03
问题 Well, here's my request. I don't know OpenGL already, and I'm not willing to learn it, I want to learn OpenGL ES directly since I'm targeting my development to android, however. I want to learn OpenGL ES in order to develop my 2D games. I chose it for performances purpose (since basic SurfaceView drawing isn't that efficient when it comes to RT games). My question is: where to start? I've spent over a month browsing Google and reading/trying some tutorials/examples I've found anywhere but to

Mathematics and Game Programming

久未见 提交于 2019-12-03 01:23:18
问题 I want to program graphical 2D games more complex than the basic 2D stuff I already know. I don't want to do 3D programming. Just more complex 2D stuff. I dropped high school before I could learn a lot of stuff so I walked away with enough algebra knowledge to balance my checkbook and do some light 2D Cartesian programming. Are there any good resources out there for a guy with a limited attention span (say 20 minutes apiece for a subject I'm keenly interested in) to learn, gradually, how to

2D tile map generation

别等时光非礼了梦想. 提交于 2019-12-03 01:04:52
问题 I'm developing a 2D tile engine and at this moment I'm working on map generation algorithms. I tried the basic ones usually involved in simple heightmap generation like hill generation perlin noise diamond square but I always get the same problem: this kind of algorithms seems suitable when dealing with tile maps that also have a height component but this is not my case. I basically have sprites like grass, sea, desert and so on but they shouldn't be placed inside the map according to a

c# - how to move point a given distance d (and get a new coordinates)

痴心易碎 提交于 2019-12-03 00:31:47
Hi I was wondering if there is any efficent way to calculating coordinates of point (which was moved distance d from it's original location). Let's say I have a point P(0.3,0.5) and I need to move that point random direction with distance d. So far I did it by random picking new x and y coordinates and I was checking if distance between old and new point equals d. I do realize that is't too eficient way to do that. How would You do it ?? Given a point (x1, y1) , we want to find a "random" point (x2, y2) at a distance d from it. Pick a random angle theta . Then: x2 = x1 + d * cos(theta) y2 = y1

Java code needs a system.out.println statement to run [duplicate]

泪湿孤枕 提交于 2019-12-02 23:49:31
问题 This question already has an answer here : Loop doesn't see value changed by other thread without a print statement (1 answer) Closed 4 years ago . I wanted to know if anyone else experienced this problem. This one portion of code in my game relies on a system.out.println statement to work. without it, it won't function properly while(isladder){ t = Map.tiles[(int) (Player.x + 15 + ScrollManager.xoffset) / 32][(int) ((Player.y ) + ScrollManager.yoffset) / 32]; if(t.row == 3 && t.col == 5){