Tag Info

Hot answers tagged

8

Pixel art generally responds extremely bad to any scaling. Just a small size adjustment will make pixel art appear either blurry or distorted, depending on what scaling algorithm your engine uses. For that reason it is important to make sure that the graphics are designed in exactly the resolution in which they appear in the finished game. Here is a ...


2

Make them the size they would normally be. Don't try to make them big and scale them down later. That way there will be less time loading the images (Not that it's all that long.) Less data stored as well. Make sure that when you are scaling them up to draw them to the screen, you don't use a any sort of filter. Anotherwords... Use no mipmapping. Ie point ...


1

I believe that in a lot of cases it's not worth investing huge amounts of time into optimizing assets to shave off a few MB of your final game. Sure, if you need to stay below a certain size limit (eg. 100MB for Apples policy for apps to transfer over cellular-networks), then it's reasonable. A general optimization you can do is making use of some PNG ...


1

Whichever option is easier for you to work with, you are unlikely to push the hardware limits with a 2d game so you should get a good framerate with either approach. Using a Group and place components in it means you can detect mouse clicks on each element the same as any other JavaFX control. Drawing into a Canvas is more similar to how a fully fledged ...


1

If you can only afford to have one set of sprites drawn (i.e. your artist time/effort is limited) then get them to do the largest resolution. It's far easier to make hi-res sprites look okay when scaled down than it is to make low-res sprites look okay when scaling up. Neither approach is better than having sets of sprites tailored for your target ...


1

Vector images are useful since they would work with any resolution, and you can even use them directly in the game, letting OpenGL/DirectX rasterize it only when they are rendered to the frame buffer. But since you specifically mentioned pixel art it doesn't sound like you would get the right look with vector graphics, in that case you want to be careful ...


1

I used this code to generate a simple array with consecutive values like [0,1,2,3,4,5] starting at 0 var particules = 6; var _pArray = Array.apply(null, {length: particules}).map(Number.call, Number) and then i used this array as a second param in the makeParticles method : emitter.makeParticles('logo_sheet', _pArray ); Works perfectly !


1

It would be better to add a bool variable into your Script and then toggle it on/off. var object1Script = object1.GetComponent<MyScript>(); var object2Script = object2.GetComponent<MyScript>(); object1Script.enabled = toggle; object2Script.enabled = !toggle;


1

As far as I know, this is possible using the sf::Image class: sf::Image spritesheet; spritesheet.loadFromFile("spritesheet.png"); int currentSprite = 2; sf::Texture texture; texture.loadFromImage (spritesheet, currentSprite*spriteWidth, spriteHeight); sf::Sprite sprite; sprite.setTexture(texture); If you do this in a for-loop, you could create a fluent ...



Only top voted, non community-wiki answers of a minimum length are eligible