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

Pages: [1] 2
1
Graphics / Re: Rendering objects from different classes to one.
« on: April 28, 2017, 11:12:12 pm »
The class Tank has a "t_window" but you don't pass it to the tank in the "main.cpp".

I suggest this way:

Tank tank;
...
Tank.Render(&win);

And change Render function to:
void Tank::Render(window *win)
{
        win->Draw(t_tankSprite);
        HandleInput();
}

2
Graphics / Re: Sprite is drawn as solid white
« on: April 15, 2017, 02:53:33 pm »
As long is keep alive, yes.

3
Graphics / Re: Sprite is drawn as solid white
« on: April 15, 2017, 02:31:31 pm »
The problem is that you are creating the sf::Texture inside the createWallSide() function, so when the function ends, the texture is destroyed and the sprite returned have a pointer to an invalid texture.

You must keep the texture alive as long your sprites are using them. One solution to this is to create the texture in main.cpp.

Read this tutorial for more info https://www.sfml-dev.org/tutorials/2.4/graphics-sprite.php#the-white-square-problem

4
General / Re: Inverting velocity to bounce an object (along x-axis)
« on: April 15, 2017, 12:24:55 pm »
It's a wild guess, but the way you are describing the problem is that the IF statements in the update() function are never true.

So I would say to check that your position vector (which I suppose is a member variable of the class Enemy3) is not updated correctly when you call move().

I mean, if you are using a sf::Sprite to represent and draw your enemies, moving the sprite also change it's internal position automatically (which can be obtained by getPosition()) but not your custom position vector.

5
Graphics / Re: How to change pixels on a big map
« on: April 14, 2017, 02:36:35 pm »
You might consider getting rid of that big texture (map) and use sf::Sprite for each country.

It will be more fast, and much more less expensive for your computer.

The idea is to create one texture for each country, load them at the start in a std::vector<sf::Sprite> and asign each sprite his position on the "map". Use window.clear(dark blue) for the background, and Sprite.setColor(light blue) for the country.

sf::Sprite country;
country.setColor(sf::Color::Blue);
country.SetPosition(pos);
vCountry.pushback(country);

Now, you need a method to know when the mouse is over any country. You can use Sprite.getGlobalBounds().contains(Mouse Position) to check it. But it's not a precise method because the FloatRect of a Sprite is a square shape and can overlay with any other country nearby.

So I will say to check if the mouse position is inside the bounds of a contry Sprite and IF so, then perform a pixel perfect check to be sure the mouse IS inside the country.

for (int i = 0; i < vCountry.size(); ++i)
{
    if (vCountry[i].getGlobalBounds().contains(mouse) && pixel_perfect(vCountry[i], mouse)
    {
        vCountry[i].setColor(Grey);
    }
}

For drawing, you only have to iterate through the vector of sprites and draw them.

window.clear(Dark Blue);

for (int i = 0; i < vCountry.size(); ++i) window.draw(vCountry[i])

window.display()

6
The lastest download links for sfeMovie doesn't work with SFML 2.4.2

I build my own binaries for Visual Studio 2013 32bits and working with SFML 2.4.2

Here is the download link if anyone needed:

https://mega.nz/#!KMcUQK7Y!PMqnZEfMybQckIs8QAMxroQIjjDCJ7YWMVxjPtblEtw

Thanks Ceylo for the library  :)

7
SFML projects / Re: Kronos - Action, RPG, Roguelike
« on: August 22, 2015, 02:50:28 pm »
Thank you! :)

Currently I'm on vacation 8)

But when I come back I will post more details.

8
SFML projects / Re: Kronos - Action, RPG, Roguelike
« on: August 05, 2015, 03:02:48 pm »
Thanks! Still more to come  ;)

9
SFML projects / Re: Kronos - Action, RPG, Roguelike
« on: August 01, 2015, 02:31:04 pm »
@pleaq Thanks!  :)

@Hapax Thanks! I appreciate your sincerity  :)

I'm just a programmer who wants to make a good game, and I feel very happy and confortable with the art I can make. I've been playing games for a long time. I miss the old way of doing games, like the graphic adventures of Lucasarts (Loom, Monkey Island, Indiana Jones...). Games that are remembered by their story, gameplay, mechanics, fun.

I prefer to spend my time and resources to improve things that can make the game more fun and better. Anyways I cannot afford a designer who make super realistic graphics or detailed pixel art.

My own game, my own art I suppose  :P

10
SFML projects / Re: Kronos - Action, RPG, Roguelike
« on: July 30, 2015, 12:54:56 pm »
CRAFTING

A good rpg must have a good crafting system that helps the hero in one way or another. The possibility of crafting your own items and improve it through the game is a good feature.

My idea of a good crafting system is to be simple, practical and especially useful. It's disappointing wasting time gathering ingredients when the object created sucks or didn't help you much. For that reason, all the items that can be made with crafting are very useful and powerful if used properly without being overpowered.

This are the alchemy tables where you can craft everything you want, if you have the necessary ingredients.



You can use alchemy in four different modes:


POTIONS

At the top of the panel are the four round buttons for selecting witch mode you want.

Below there's a list of all the potion recipes that you can craft. Selecting one will display it on the right side and tell you witch ingredients and how many cost to craft.

If you have enough, simply click the green button to craft it and put it directly in the inventory.



Potions gives useful effects for a short period of time. Increasing your damage, resistances, speed, or gives special and useful effects.

Here's a example of some potions effects:




ARROWS

Using a bow doesn't require special ammunition, always shot normal arrows. But you can change it with special arrows that do special effects when fired. This arrows are powerful and with limited quantity.



You can gather special arrows exploring the castle or in enemy drops, but the most practical way is crafting it. The effects vary depending on the arrow, some apply elemental effects on the target like burn, freeze, stun, etc. Others have area of effects like exploding arrows or cluster arrows that releases small bombs when impact.

Here's a example of some arrows effects:



When the special arrows ammunition is empty, you will shot normal arrows again until another arrows are equipped.


ENCHANTING

In this mode you can improve you gear giving it more stats of effects like life regeneration or elemental resistance.



Only items with enchant slot (the purple circle) can be enchanted, one enchant per slot. First select the item you want to enchant and a list of possible enchant will appear. Simply select the enchant and craft it, and you have a more powerful sword/armor.

High level items can drop with more enchant slots. Also the enchant effects scale up with your level, but when applied to a item, are permanent.

For example let's enchant this sword:



Whit this enchantment:



And the result is:




RECYCLE

This is the easy way of getting ingredients. When you have weapons or armor that you don't want or its worst that you wear, you can recycle all the items you don't want and gain many ingredients in return.



The ingredients can vary depending of the type of the item and the effects already have.

Recycling an item will destroy it in the process, so be careful.




Using alchemy through the game will help you fighting and surviving some of the hard boss fights, and using potions and special arrows will make it more fun.

11
SFML projects / Re: Kronos - Action, RPG, Roguelike
« on: July 25, 2015, 11:44:53 pm »
There's no corutine reimplementation. All the heavy work is done in the c++ side, the lua functions are just intermediates between the script and the engine. That's why I use lua for this scenes and AI, for it's flexibilty and customization without hardcode anything.

The thread is launched by the engine, but who decide which actions execute is the script. I don't tend to reivent the wheel unless there 's a very good reason  ;)

12
SFML projects / Re: Kronos - Action, RPG, Roguelike
« on: July 25, 2015, 07:23:58 pm »
Progress Update!

We managed to get the cinematic scene system working! And implement it with lua scripts!  :)

The idea behind is very simple: Execute actions in order automatically without player intervention.

The actions can be anything, from move the player to some location, spawn some enemies, open/close doors, display texts, cast spells, etc.

Technically it was a challenge. How perform automatic actions while the game still running and doesn't get stuck? The logical answer is "threads".

When the player perfom a specific action (take an object, resolve a puzzle, enter in some area...) it activates a trigger who is waiting for a such action. This trigger lauches a thread that loads the lua scene script and execute it in paralel while the main thread still runs but in a some "stasis" mode, waiting for the thread to end.

Once the system is implemented and all the functions binded to lua, the next step is very easy. Write the scripts.

Here is a gif showing the pre-battle scene with a boss. The trigger is activated when the player enters the area and start the scene.



And here is the script for that scene:

-- BOSS pre fight
SCENE_100 = function() 
                       
                BEGIN()
               
                Door_Close(0)
               
                Door_Lock(0)                           
               
                Actor_MoveTo(0, 1392, 1248, SP.SLOW)
               
                Camera_MoveTo(1392, 1008, SP.SLOW)
               
                WAIT(4)
               
                Actor_Face(0, DIR.NORTH)
               
                Actor_Say(1, "What a surprise! You managed to open the armory doors...", "red")
               
                Actor_Say(0, "Poor security for a heavy guarded location, but you're the boss", "white")
               
                Actor_Say(1, "It doesn't matter, you fool! My winter soldiers will kill you!", "red")
               
                Actor_Say(0, "I already killed a dozen to get here. They need better training", "white")
               
                Actor_Say(1, "Silence! My mace will crush your head!", "red")
                                                       
                END()

        end;   
 

The results are stunning, and this is a very simple script. More complex scenes can be done with even more actions and events  :)

13
SFML projects / Re:creation - a top down action rpg about undeads
« on: July 25, 2015, 02:00:04 pm »
Great stuff over here!

I like this proyect, it reminds me the old school rpg but with modern ideas. Nice work!

The possesion mechanic is original and a lot of puzzles can be made around this.

Also, let me say, your code is very good and clean. Personally I don't like the composite pattern, I feel more natural and comfortable with hierarchy. But I see similarities in how approach the game structure.

In our game, we also do a z-order rendering but only with entities visible on screen, so we need to filter firts. The average map size is 8000x6000, with 15-25 rooms and 25-100 objects, depending of the room size. So yes, we need to filter the amount of entities to be drawn, and tilesets is the way to go.

Early in the development I used polimorphism to manage the differents enemy types, but adding LUA remove any need of polimorphism and the AI is purely made of lua scripts.

Also I like the way you managed the triggers and events in the game, is similar to ours, and this way is very flexible and customizable.

And believe me, as a programmer, I kwnow how hard and frustating can be doing your own art, but the results are worth it. Good job!

Keep it up!  :)

14
SFML projects / Re: Kronos - Action, RPG, Roguelike
« on: July 16, 2015, 05:27:35 pm »
Thanks!

I know is hard to receive feedback just from some screenshots and gifs. That's why we are working hard to get the demo ready and receive real gameplay feedback from other players and improve the game.

15
SFML projects / Re: Kronos - Action, RPG, Roguelike
« on: July 12, 2015, 08:20:58 pm »
This is looking like a pretty fun game. Are there still plans to provide a demo?

Of course  :)

The development is still on going, and with the alchemy system and talent trees almost finished, the next big objective is a fully playable demo.

Also a very talented composer has recently joined the team and he will make great music for the game.

In the meantime, I will post more features and gameplay details before the demo launch.

Pages: [1] 2
anything