sprite-sheet

Corona - create regular display objects from sprite sheets?

戏子无情 提交于 2019-12-11 18:18:12
问题 This is normal way of displaying an image: local img = display.newImage("image.png"); But doesn't it save memory to put all your images in one large image and export from Zwoptex? There is documentation for creating animated sprites from sprite sheets, but what about just pulling a single image from a sprite sheet? local zwoptexData = require "sheet1" local data = zwoptexData.getSpriteSheetData() //then what? 回答1: The commands to make a static image from a tile sheet look like this: local

Animating sprites in sfml from a sprite sheet

时光总嘲笑我的痴心妄想 提交于 2019-12-11 17:25:07
问题 I am trying to animate a sprite in sfml. At the moment I am able to move the sprite and change it's image when moving in a different direction, but I want to animate it while it is moving. I am thinking that there might be a way to accomplish this with sf::Clock or there might be a better way. All sprites are on the same sprite sheet so I just need to find a way to change the X and Y coordinates of the textureRect based on a time while moving in a direction. If I am missing something or you

Using a sprite sheet with createPattern()

烂漫一生 提交于 2019-12-10 18:14:20
问题 I can't seem to find any solid info on how to do this, so I'm wondering if someone can point me in the right direction. I have a large sprite sheet, let's call it textures.png. Each texture is 64x64 pixels and I need to be able to create patterns out of these textures. createPattern() is a great function but it seems to only take two arguments, the image source and whether to repeat it or not. This is fine if you are loading a single image for each texture, but I'm wondering how to do this

Techniques for drawing spritesheets in OpenGL with shaders

人走茶凉 提交于 2019-12-10 10:18:12
问题 I'm learning OpenGL with right now and I'd like to draw some sprites to the screen from a sprite sheet. I'm note sure if I'm doing this the right way though. What I want to do is to build a world out of tiles à la Terraria. That means that all tiles that build my world are 1x1, but I might want things later like entities that are 2x1, 1x2, 2x2 etc. What I do right now is that I have a class named "Tile" which contains the tile's transform matrix and a pointer to its buffer. Very simple: Tile:

How to use a sprite sheet in swift and sprite kit?

佐手、 提交于 2019-12-09 06:35:13
问题 Title says it all. How do i use a sprite sheet in swift and sprite kit? I've searched google, stack exchange, and the apple documentation and I can't figure this one out. 回答1: In xcode 7, you can use Images.xcassets to create a sprite atlas. Click on Images.xcassets Click on the plus bottom in the bottom left Select "new sprite atlas" Then you can drag and drop all your images into the atlas If you drag in all three image sizes with the proper suffix (@2x and @3x) it will automatically

What are the pros and cons of a sprite sheet compared to an image sequence?

我是研究僧i 提交于 2019-12-07 12:19:38
问题 I come from a 2D animation background and so when ever I us an animated sequence I prefer to use a sequence of images. To me this makes a lot of sense because you can easily export the image sequence from your compositing/editing software and easily define the aspect. I am new to game development and am curious about the use of a sprite sheet. What are the advantages and disadvantages. Is file size an issue? - to me it would seem that a bunch of small images would be the same as one massive

What are the pros and cons of a sprite sheet compared to an image sequence?

给你一囗甜甜゛ 提交于 2019-12-06 02:04:08
I come from a 2D animation background and so when ever I us an animated sequence I prefer to use a sequence of images. To me this makes a lot of sense because you can easily export the image sequence from your compositing/editing software and easily define the aspect. I am new to game development and am curious about the use of a sprite sheet. What are the advantages and disadvantages. Is file size an issue? - to me it would seem that a bunch of small images would be the same as one massive one. Also, defining each individual area of the sprites seems time cumbersome. Basically, I dont get why

SVG & Spritesheets

夙愿已清 提交于 2019-12-04 04:54:06
问题 Is this combination possible? I have a retro-style spritesheet, however I'd like to use SVG with it in order to apply some effects such as shadows, outlines, and other things. Don't question it. I know canvas is an alternative, however for this project I'd prefer to use SVG. One major issue is in the way, however: taking individual sprites from a spritesheet. Additionally, I use 1x1 pixel sprites but enlarge the spritesheet to make them 6x6 via hidden canvas, so I'm also working with an image

How to use a sprite sheet in swift and sprite kit?

女生的网名这么多〃 提交于 2019-12-03 09:19:59
Title says it all. How do i use a sprite sheet in swift and sprite kit? I've searched google, stack exchange, and the apple documentation and I can't figure this one out. Rob Norback In xcode 7, you can use Images.xcassets to create a sprite atlas. Click on Images.xcassets Click on the plus bottom in the bottom left Select "new sprite atlas" Then you can drag and drop all your images into the atlas If you drag in all three image sizes with the proper suffix (@2x and @3x) it will automatically populate the images for you. Then to use these assets in code simply write: let atlas = SKTextureAtlas

svg + Sprite sheet + d3 + clipPath + position + size

僤鯓⒐⒋嵵緔 提交于 2019-12-03 07:13:24
Need to apologize in advance: for length and for my ignorance. I'm trying to teach myself new concepts: d3.js and sprite sheets. The sprite sheet concept is simple to understand, but I'm confused how to integrate this into d3. Basically what I want to do is to select the sprite that I want to use as an image from the sprite sheet and then use d3 to display this selected sprite somewhere else on the page, and most likely multiple copies of the same sprite. The actual sprite sheet for reference (see disclaimer below): Here are the issues: 1) I add the sprite sheet to my html, hard code the