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.


Messages - lsmod

Pages: [1]
1
Graphics / Re: playing with color alpha value
« on: July 07, 2015, 07:14:44 pm »
Quote
but we won't change the implementation to just use floats everywhere (if you were asking for that). ;)

why not it would be more convenient ? :p just kidding

It's just that was wondering if I was missing something. I will store variable like you said. Perhaps in object related to my animation. And I will do the same for Red, Green and Blue value.

2
Graphics / Re: playing with color alpha value
« on: July 07, 2015, 06:37:07 pm »
thx, yes sure that's a solution. But It means I have to store that variable and link it to my sprite, while all the others sprite's parameters are store in sprite class. It's not really elegant 

3
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)


4
SFML projects / Re: Game on Kickstarter 28 May!
« on: June 01, 2015, 12:21:15 am »
I just saw the video. I was hanging on kickstarter and came here to post "Hey check the new video".
Really funny make me laugh (the part with uncandescent). I hope playing the game will be funny as watching your video.   

Quote
Thanks for all the feedback and advice! :) Finally made a better video that illustrates our game a little better.
Finally I think the first video is great within the presentation page. I think the new it's nice to show on its own. Like if I google "luman" and get on a youtube

5
SFML projects / Re: Game on Kickstarter 28 May!
« on: May 30, 2015, 10:56:16 pm »
For anyone curious, I checked it out and the page is live.  Figured I'd post the link here

https://www.kickstarter.com/projects/147621009/luman

Nice presentation page ! Hope it reach its goal they deserve it

6
SFML projects / Re: RPG card game
« on: May 27, 2015, 08:30:39 pm »
hi as I'm closing in on finishing the game prototype. I would like to open the champagne to summarise to my-self what I have done so far (So It will be clearer for me what remain to do and what's to improve).

First as I said I'm making a game prototype to test various game idea. On paper ideas look nice but I believe it really need to be experienced by playing to see what concepts are good.

So basically I'm making a battle game 1 vs 1 with card as RPG entities. The Goals is to be the last standing. You can deploy max 30 card (8 max on your side of the board). When player have deployed/used all their 30 cards then it's the first to eliminate all enemies remaining cards on the board who wins.

Card are like RPG entities, with different stat and skills. Or a card it can be just like a spell.
Example:
- warrior entity with life, attack, shield (like an hero).
- heal aura (heal all card on the deck). in this case it has no attack and no life stat and would be destroyed at the first attack it get. That's why I consider It more like a spell.
With that in mind I had to organise my work.

Dev environment:

- Eclipse Kleper (love the "rename" refactoring function which I use a lot)
- gcc/g++ compiler (I had some problem to find the right version to work with SFML finally I use TDM-gcc-4.8.1
- SFML (of course)
- CUTE (for unit test) just like its simplicity
- metriculator (some eclipse plugin to count ligne of source code) not essential I just like to see my project advancement
- C++11 I'm new to c++. Long time I know the its syntax , but I never really got to dev in c++. So I jump into c++11. I knew it would be challenging but RAII idioms and smart pointer reassured me :)

The compromise:

I want to dev a prototype to try a game concept. So I have to dev some kind of engine. On one hand I don't want to throw of my work on the engine after I test my concept. On an other hand I don't want to get cut in game engine developing and forgot my first goal. So I try to make something flexible, but not to flexible because it's to much work and I may never use some of the functionalities. I want An engine rapidly release who will allow me to try different concept and somehow with a relatively clean design.
I manage to did it by focusing first on the functionalities that my prototype need and then how to make it more flexible. As I said it's a compromise and I think I lean toward  quality dev than to create a lot of functionalities. I get that know that I'm writing this. I have some functionalities yet to implement but I worked quiet a lot  on clean coding and test it.
I believe that what I dev would be use as base engine for the game. But also that if my concepts are not good what I have done won't be handy. Or maybe not I will see.

Dev steps & design:

1) I started by naively implement a card class, that could be seen as an rpg hero with life, shield, damage, element resistance (damage are of one of the four elements), chance of succeed an attack, and so on.

2) I separate the attack for the card class. Simply because I realise card don't have to got attack. So better to create an AttackSkill class. Therefore I did some other skill classes who play will with card's stats.

3) I create Interaction class for AttackSkill. Wish take an card and its AttackSkill and apply it to an other card. Then I finally get to my head that it's better design to separate stat from the action who manipulate then.
So I got:
- proprieties class (cards stats & skill stats) 
- interaction class (which use skill stat to modify taget card's stat)
example
HealSkill class {bonus_stat +10pv}
HealInteraction{healSkill* skill; apply(Card* target)}
Card {life_stat {0}; getLife();, setLife();}

4) I made some unit test ! And caught a lot of bugs :D

5) The event! All right card1 attack card2 I made it. But what about Card2 heal him-self after receiving damage? So I had to manage event.
What I did:
- EventHandler class (still empty class it was too hard to do :( No I'm just kidding, but it was challenging for me)
- SkillHolder every card got its skills in it. And there is one for each event: Holder* trigger_attack, trigger_defense, trigger_dead
- player action will call EventHandler trigger matching function. ex: card1 attack card2 -> EventHandler.attack(card1, card2) then EventHandler.defense(card2, cart1);
- then the event function check card.trigger_attack for skill to apply
- EventHandler apply the interaction to the card2 target, using card1 skill

6) What a mess ! So many skill, so many interaction wish are of different class type. I know I deserve it with my "go get it, think one step at the time method". Oh men! template class come to the rescue. One function to apply different interaction class type. C++ is so nice.

7) refactoring: Well all my interaction classes derived from the same base HealInteraction : Interaction, AttackInteraction : Interaction. It's nice because I need apply(), canApply(), remove() but apply  heal is really different from apply attack. So heritage was a good solutions.
My problems come here: skill are of different type (HealSkill, AttackSkill, ...) and interaction need access to skill's stat.
First idea (ugly but worked) I made apply() a pure virtual function and add-in member skill pointer to every skill child. But not in the Interaction parent class. As i said ugly but worked.
As you can see I need to improve in c++! Hopefully I found a better solution: parent Interaction as a template class. So now child derive from it. Like this: healInteraction : Interaction<HealSkill>, attackInteraction : Interaction<AttackSkill>
And so I did add-in a template member skill pointeur. T* skill; And get reed of my ugly design.
   
8 ) An other problem... In eventhandler when a event is triggered. I got many type of skill to check if they react and many type of interaction.
So I have to do Something like:
 
  void EventHandler::attack(card, target)
   { if(card.trigger_attack.haveHeal)
      applyInteraction<heal>(card, target);
   if(card.attack.haveAttack)
      applyInteraction<Attack>(card, target);
   }
It would have been ok if a had only one event, but I got many of them And really would like to do something like this:
     
while(card.trigger_attack.hasSkill)
         applyInteraction<card.trigger_attack.getTypeSkill)(card, target);
I tried those ideas:
-put my skills into a vector<Skill> (Skill is the parent class of HealSkill, AttackSkill...) Okay but I couldn't get access to child member without dynamic_cast wish made me make a giant list of if -> return to case zero
- use a tuple<HealSkill, AttackSkill> Problem : tuple.get<X> X is a compil time parameter I would have to write: tuple.get<1> tuple.get<2> tuple.get<x>, ... Same ****
- I add a class member with the type of the next Skill's derived class to access. It worked well to got my loop. BUT I run into a problem with template type deduction : it's made at compile time add my loop at runtime, so It could call the correct template function matching my current type -> return to case zero
...Meanwhile I received my new book "Modern C++ generic design by Andrei Alexandrescu". Who talks exactly about my problem (didn't know when order it)...
- Out of nowhere I got and idea (hiding the book it got nothing to do with it) : skills into a tuple and use boost::fusion::for_each on it who call a template functor for each element of my tuple!
Well that step took time and went back and forward but I learn a lot.

9) refactoring then rewrite from scratch my unit test (to much had evolve and the old one were, hmm... too old)


After all that I can say that I have learn a lot (C++ and software design). I enjoyed developing  that prototype more than anything a ever have developed. The C++ book came right on time and I will learn more from it.
About the prototype I still have some skill to add-in (Stun, resurrection and invocation) and work a little bit on the "UI design". Then I will finally be able to test concepts and learn from it to determine how the game will play.

7
SFML projects / Re: Game on Kickstarter 28 May!
« on: May 27, 2015, 01:56:17 pm »
Quote
Here it is, a cut-scene example! ;D


I love the video nice!
I check luman on facebook and I saw Uncandescent. "rumoured to be suffering from acute Napoleonic complex." It's funny.
Perharps you don't need to show more about gameplay. I thought about what I said and: we all know plateformer. 2sec of the video and we recognize that's one plateformer. What's intriguing it's luman universe  you made great video about this. Also I really like the picture with "The cast of Luman" it show that there more to discover that what we see in the video.

8
SFML projects / Re: Game on Kickstarter 28 May!
« on: May 27, 2015, 01:36:55 am »
Quote
I suppose our video doesn't show much and we need to show our mechanic. Would you say our art is too plain and it doesn't seem like there's a lot going on?

Hi! Great works it look nice it's artistic and it got a soul. I don't believe Your art is too plain. But that it doesn't show what we expect has a player. I mean when I look at video game presentation:
1) I look for the art (in this case I like it)
2) I want to know the gameplay and see how the game is really play(and i don't like the video for it)

So basically show that luman needs to run ! And after that he is fragile (he break very easily but we see that only at the video's end) then what's it's rewards, adversaries, ...

Why does he need to run ? 
because he has too or it's intensity decrease and luman don't shine no more ?
time is limited ?
collect some stuff ?
Really I don't know from the video

After 30 sec of video start asking my-self where are the enemies. I don't see them. I see that hero is vulnerable when he run. Therefore I know it's not super mario like so I really want to know what the gameplay. and I don't get it

In resume I don't really get hero goals and what I will do as a player from the video, so It's frustrating.

Hope I help somehow

edit:
Maybe the video doesn't aim to explain the gameplay in details. It doesn't have to if it's explain on kickstarter


9
SFML projects / Re: RPG card game
« on: March 17, 2015, 03:52:13 pm »
Quote
But how did you earn cards then?
as StormWingDelta said, I was thinkings random loot at the end of duels (for loosers and winners). May be not after each duel. It's not define yet. And later on when duel and trading are working as quests rewards.

Quote
starting with all cards available for testing might help
that's exactly what I'm planning to do :)

10
SFML projects / Re: RPG card game
« on: March 16, 2015, 05:55:39 pm »
thx for the advice it's good one. I understood long time ago that game development is may be the most complex field in programming. I learnt programming about 14 years ago because I wanted to create video games. But I quickly  realise that it's not for beginners even to make small games.
I created some board game (played with friends was fun). A decade ago I made some video game prototypes, a lot of projects that I gave up on years ago. I have finished a small video game (tamakotshi like in flash). Finally I started working as programmer but not in game development.

That to say I know my project it's really ambitious. That's why divide the project in small realistic steps to make many release who will add-in some aspect of the game the one by one. like this :
0) 1vs1 prototype (test gameplay)
1) 1vs1 game
2) 1vs1 game online
3) add-in loots and trading
4) tutorial and solo quests
....
X) full complete game online

My goal it's to make a complete game. But only by staying realistic about my resource in time and skills. So at some point I won't give up on the project because it's out of my reach. The "end game" it's my inspiration for know not my direct goal.
Also I'm making this prototype to test game mechanics because I would like to try something different than an game where you win when kill enemie's heroes (like hearstone or duel of champions). But it's hard to say if it's an idea who will works until I play a real game.

11
SFML projects / Re: RPG card game
« on: March 16, 2015, 03:52:59 pm »
Hello,

no it won't have a store (typing error I meant "story" not store  ::)). Yeah a bit like heartstone but more like duel of champions. It's hard to say until I test a real game. But really I don't want no store and/or booster pack. I was thinking loots from 1vs1 game and quests. And also open trade between players (like in diablo II).

Thanks for your interest. I will post more later on

12
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]