Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Vitis

Pages: [1]
1
Graphics / sprite sheet data
« on: July 03, 2014, 06:27:05 pm »
Greetings SFMLers!

I am currently working on a game that features an animated character sprite.  I am using this sprite sheet as a placeholder while I develop the game: http://www.spriters-resource.com/fullview/41519/

(I eventually plan on making my own pixel art for the character.)

My problem relates to obtaining the rectangle data for each individual character image in the sprite sheet.  It took me many hours to manually obtain and enter all the x/y pixel coordinates and height/width values in order to create tightly bound rectangles to properly display each frame of the animated character. (This particular sprite sheet is comprised of well over 300 individual character frames/images.)  I was wondering if anyone knows of a better, more efficient way to get all this data instead of having to obtain it one frame at a time from a sprite sheet like I did.

Regards,
-Vitis     

2
General discussions / AI in games
« on: June 28, 2014, 07:55:10 am »
Greetings SFMLers!

This topic is not directly related to SFML, so I hope I'm not offending members of the SFML community by posting it. 

I have recently used SFML to create my very first game, which is a relatively primitive 2 player fighting game, and I want to learn about AI by adding a 1 player (vs CPU) mode to my game.

I have been searching the web for information on how artificial intelligence was handled in 1990s 2D fighting games but have found very little on the subject. I was wondering if anyone in SFML land knows anything about how AI was handled in 1990s fighting games like the Street Fighter series, the Mortal Kombat series, and countless others from companies like SNK, Capcom, Midway etc. 

Regards,
-Vitis

3
Graphics / Platform game / tile permeability / Box2D
« on: June 27, 2014, 05:03:49 am »
Greeting SFML community!

I'm very new to SFML and game programming.  I've been using SFML for about three weeks.  So far, I've programmed a rudimentary fighting game using a primitive physics engine and a collision detection system I coded from scratch.  Like most fighting games, there aren't any tiles, just a background, two animated character sprites, and sprites for lifebars.

For my next project, I want to create a basic, tile-based platform game.  I have already created a program that maps tiles over a background and displays a movable character sprite; however, I could use some advice from more experienced programmers before I proceed further. (Keep in mind that my goal in this new project is not to make a great platform game, but to learn more about game programming in general.)

I have not yet developed a system to keep track of the permeability characteristics of each individual tile.

My questions are:

1) What is an efficient way to handle character sprite/tile interaction to be consistent with normative platform gameplay mechanics?  (By "player sprite/tile interaction" I mean that some (transparent) tiles should  be completely permeable to the character sprite, some tiles should be completely impermeable to the character sprite, and some should be permeable in only one direction, i.e. a the player should be able to pass through the tile/platform from below but not from above.)

2) Should I use a physics engine like Box2D, or should I handle physics with code I create from scratch?
    (I'm leaning towards the latter option because I want this project to be didactic.)

Regards,
-Vitis
 


4
Greetings SFML community!

I was having a seemingly intractable screen tearing problem with a simple test program that consisted of a movable sprite and a scrolling background.  I tried setting the frame rate with VSync disabled.  I tried enabling VSync with a single function call as recommended by SFML documentation.  I tired changing my frame rate several times.  I made sure my driver setting was set to "application control".  Nothing I tried solved the problem.  Then I decided to try enabling VSync by putting the function call inside my game loop so it was called every iteration, and that was the only thing that worked.  I am using window 7 and have an Intel HD 4600 Graphics Card. 

I feel I shouldn't have to keep enabling VSync inside my game loop.  Is anyone else having this problem?  Is it a driver issue or SFML issue?

-Vitis


EDIT:

In the process of writing a minimal example that reproduces the problem, I discovered the source of the Vsync / screen tearing issue.  My original test program has a function that allows the user to change the video mode.  The function closes the window and creates a new one with a different video mode, but the function doesn't enable vsync after the new window is created.  I believe that SFML sets vsync to disabled by default anytime a new window is created, so enabling vsync once when the program is initialized and enabling it again after each time the video mode is changed solves the screen tearing problem without having to call setVerticalSyncEnabled(true); in the game loop.

-Vitis

5
Graphics / Tile map to image for color masking/transparent tiles
« on: June 26, 2014, 05:51:12 am »
Greetings to the SFML community!

I am new to SFML and game programming in general.  I found this excellent tutorial on creating and drawing a tile map. (http://www.sfml-dev.org/tutorials/2.0/graphics-vertex-array.php) (I plan on going further by loading a tile map from a text file tile index instead of an array, but I plan to tackle that challenge later.)

Right now I'm trying to draw a tile map with transparent regions over a background sprite. I have figured out how to create a color mask to key out background colors, which allows me to use sprite sheets that do not have transparent backgrounds for animated characters; however, I have not figured out how to draw tile maps with transparent regions over a background sprite. 

I created four hand-drawn test tiles: three tiles are to be visible on screen, and one is a solid fuchsia color that I intend to key out and make transparent.  I have made a simple tile map using the technique from the "Example: Tile Map" section of the aforementioned SFML tutorial. (See link above.)  In order to have transparent regions of my tile map, I figure I need to somehow:

1) copy the tile map to an image
2) key out the fuchsia tiles using createMaskFromColor()
3) create a texture from the tile map image
4) create a sprite from the tile map texture
5) and draw the tile map sprite over my background sprite.

I have enough SFML experience to do steps 2-5, but I don't know how to accomplish step 1).  Any help with this step would be greatly appreciated! (If you have a better way to accomplish this task, please share it!)

Regards,
-Vitis

Pages: [1]