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 - lsmod

Pages: [1]
1
Graphics / playing with color alpha value
« on: July 07, 2015, 06:19:31 pm »
Hello,

I'm playing with SFML to create animation for my project. I have an issue trying to increase very slowly alpha value of a sprite.

while (window.isOpen())
{              
// Get elapsed time
float delta = clock.restart().asSeconds();

auto alpha_etoile = etoile2_sprite.getColor().a;
etoile2_sprite.setColor(sf::Color(255, 255, 255, (alpha_etoile + 1 * delta)));
}

it work like this (but it's not what want):
etoile2_sprite.setColor(sf::Color(255, 255, 255, (alpha_etoile + 1)));

I believe it's because alpha is an unsigned char. So when I add only decimal to its value it's cast an value doesn't change. So I can really use distance by second for alpha because it's integer value only. But maybe I'm missing something.

otherwise It works for sprite's scale, rotation and position (those are all float variables I believe)


2
SFML projects / RPG card game
« on: March 16, 2015, 12:37:02 am »
Hi I'm lsmod,

as I'm  working a video game project using SFML I would probably ask soon for forum's help on some technical issues. So I think It would be better to introduce my-self before come-in with (a lot a of) questions.

So I'm a programmer for years and I decide few month ago to develop my own game. As I always wanted to do since I learn programming by my-self. I choose to use SFML because it got SIMPLE in it :) and also a good forum, some nice clear and concise tutorials, not to forgot "SFMF game development" book (which I need to finish reading but one thing at the time). And one very important thing it's free & opensource so many many thx

So what about the project:

It's a card game with some RPG in it (combat mechanics mostly). You know built your deck and go duel someone. BUT this one it's different (even if it don't exist yet except in my head). Yes different because it's:
- handraw graphics (personal and "artistic abstract style")
- never will be a pay to win (that fuck all the good card games IMO)
- hazard part it's gonna be small (no random cards in your hand and you waiting for the one you need)
- no complete informations (some of adversary cards will be face down)
- a completed game with a story/senario , hero quests, and many levels

I hope to make a complete game one step at the time.  Currently I have nothing to show except some drawing and test, code and more code. But nothing with an UI. I don't expect to finish it any time soon but to work on it every day (okay i meant every week).
Soon I would be able to test a real combat. I started to create a prototype with an UI know that I have solid combat mechanics develop. The goal of this prototype is to being able to test many cards and strategies to see what works, what's fun, what's not.
I would like to be fun, fast with many way to own your opponent. That to say strategieS and counter strategies. I played a lot off poker I dream to make a game so deep in mind level, that always left you wondering what if you have done something else. But not frustrating and not without fun in defeat (just a dream will see).

any way thx in advance for futur help, I hope to learn a lot and be able to contribute in return someday.


Pages: [1]
anything