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

Pages: [1] 2
1
SFML projects / Re: Vector Shooter 2D Top-View Arena game
« on: January 15, 2013, 06:35:19 pm »
Did you download the VS-0.7-MSVS2012-update1.zip file ( i'm saying it because i have no new downloads on that file and it fixed a lot of weird bugs on my friends's computers)  ? be sure to run the executable ( VC++11 redist ). If it doesn't run. If it doesn't work i'll try to compile it on windows XP, thank you for you time again ! ( btw don't you have windows 7 ? )

P.S. In these days i'll probably port it to linux.

2
SFML projects / Re: Vector Shooter 2D Top-View Arena game
« on: January 14, 2013, 05:42:38 pm »
I'm on xp, maybe that's it.
http://windowsxp.mvps.org/images/tui_x64.gif
This kind of error.

I didn't compile it with Visual Studio 2012.1, but with the earlier version, that doesn't support XP, now i'm uploading the new version compiled with the right VS version, that "should" work. If you can try, i'd be glad

3
SFML projects / Re: Vector Shooter 2D Top-View Arena game
« on: January 14, 2013, 02:52:08 pm »
I still can't run it, still says that it's not valid Win32 application or something similar(sys message isn't english).

Thank you for trying, i'd be really glad if you could post a screenshot of the problem so that i can fix it as soon as possible. For now it runs on all the systems i tested it on. Thank you again!

4
SFML projects / Re: Vector Shooter 2D Top-View Arena game
« on: January 14, 2013, 01:55:28 pm »
EDIT :
I'm updating the binaries on sourceforge.net, becuase, after further testing, i discovered that the Lua5.1.dll and the MSVS2012 redistributable packages are missing, now the installer and the dll are included with the program.

In some computers after the Highscores ( at the end of the arena ) the program doesn't respond, i'll fix it as soon as i get home.

5
SFML projects / Re: Vector Shooter 2D Top-View Arena game
« on: January 14, 2013, 01:14:30 pm »
Nice work, and I think the main graphics, not the HUD, are okay.  ;)

I hope you can release the source soon.  :)

ahahaha thank you!  are you saying that the HUD graphics suck ? ( i do agree btw :))

6
SFML projects / Vector Shooter 2D Top-View Arena game
« on: January 13, 2013, 09:31:34 pm »
Lately i've been working on Vector-Shooter. As the title states it is a 2D top-view arena game, the idea of the game is to provide the player a funny 2d action experience, but unfortunately it turned out to be more a tech demo than a real game, for now i'll be releasing the binaries only, will update the source code later. This because i'm currently rewriting parts of the code that are really bad written.

I tried to experiment with a lot of design techniques and algorithms, in fact the game "features" :
> Goal-Based AI (with pseudo-equations to determine the different state values )
> Multiple pathfinding algorithms ( A*, Dijkstra  )for different purposes.
> Lua integration
> XML loading
> XBox360 controller support
> Game states
& more language specific features

The game technically is almost completed, the big features that are missing are :
> Sound ( i've already written the c++ wrapper for OpenAL and the Engine ), i'm only looking for some music and sound effects
> Graphics ( i'm not really a graphic guy, the assets are 90% made by me, i'll try to replace it as soon as i can.

What i'm working on :
> Port all XML files to LUA
> Polish gameplay, weapons
> Create more maps
> Fix bugs

DISCLAIMER : "The credit menu button IT'S working, but there is nothing to display"

Controls :
ENTER - BACKSPACE - ARROW KEYS : navigate the menu
ESC : pause the game
WASD : move in the arena
Q - E : switch weapon ( will add number support soon )
Left-mouse click : shoot

There are different game modes :
Night Mode - Day Mode
Different difficulties
Time limit
Kill limit

The gameplay is what really needs to be polished.

The project has been compiled using VC++11 ( Microsoft Visual Studio 2012 compiler ) on Windows 7 64-bit.
The game will never ( for now ) run on non-windows platforms because of the XBox 360 controller support.

Download links :
SourceForge : http://sourceforge.net/projects/vshooter/files/?source=navbar
All the credits for the arts are included in each folders.

Here are some screenshoots :



7
SFML projects / Re: Spartickes Engine
« on: October 06, 2012, 11:38:36 pm »
Nexus you are not offending me :) you're just helping! thanks for all the hints. I'm gonna study more and will retry later!. Thanks to FRex too.

8
SFML projects / Re: Spartickes Engine
« on: October 06, 2012, 11:14:17 pm »
void sp::ParticleEngine::DestroyAll()
{
for ( int i = 0; i < active_emitters_.size(); i++)
{
active_emitters_.erase(active_emitters_.begin() +i);
}
}
That loop looks dangerous. It'll only delete half of contents(every element with even index) of active_emitters. Is that intended?

I'm sorry but i don't get it. why even index? are you referring to "+i"?

9
SFML projects / Re: Spartickes Engine
« on: October 06, 2012, 11:07:05 pm »
The Vector2D is weird.. ???
What's the point of it since this is exclusivly for sfml you could use sf vectors and define bunch of functions to do what you do with your vector.
        // Deconstructor
~Vector2D(){};
That's destructor. But that's not that important.
        Vector2D operator+(Vector2D& right)
{
return (Vector2D(x_ * right.x_,y_ * right.y_));
}

Vector2D operator-(Vector2D& right)
{
return (Vector2D(x_ * right.x_,y_ * right.y_));
}

Vector2D operator*(Vector2D& right)
{
return (Vector2D(x_ * right.x_,y_ * right.y_));
}
Why three operators do the same and not take const reference to right?
        Vector2D Scale(double S)
{
x_ /= S;
y_ /= S;
return *this;
}
Why doesn't that do *= instead of /= and return temp copy instead of reference?
        double  x_;
double  y_;
Public vars with trailing underscores are.. weird?

yes.. i know i was gonna replace that class with sf::Vector2f asap. Thanks for the hint!

10
SFML projects / Re: Spartickes Engine
« on: October 06, 2012, 11:05:43 pm »
Also it would've been interesting if you had added an example to your code, so we could actually be able to test it, without having to go through the code and figure out how things work...

Adding some code samples!

11
SFML projects / Re: Spartickes Engine
« on: October 06, 2012, 10:51:19 pm »
Posting more images. Thanks for reply

12
SFML projects / Spartickes Engine
« on: October 06, 2012, 10:22:00 pm »
Sparticles Engine : Particle engine developed by sparkon

LINKS TO IMAGES
http://postimage.org/image/mm3mbwy69/]http://postimage.org/image/mm3mbwy69/]http://postimage.org/image/mm3mbwy69/
http://postimage.org/image/q3fx7zj85/

( don't blame me for imagination )
Hello guys! this is my first "big" project with SFML, it maybe stupid for most of you, but for me it's really important. I was coding my game when i felt the need to create a particle engine, but i didn't want a costum-made one just for my game so i wrote this. It's a simple particle engine based on SFML 2.0 and nothing else.
As soon as i'll post this i'll write a couple of tutorials on how to use it, even though it will become clear while reading its features.


FEATURES

The library is composed by two main classes :

-> DirectionalEmitter
-> ExplosionEmitter

as the names suggest they have been create with two different purposes, even though if you work out your directionalemitter you can achieve pretty much ( not exactly) the same effect of the explosionemitter.
Since for the two emitters there are a lot of data that you need ( position, heading,speed,blending etc.....) i've created two costum structs to make the construction easier :

-> DirectionalEmitterMode
-> ExplosionEmitterMode

They work the same way of sf::VideoMode :

-> you initialize them
-> you choose your values
-> you put it in the Emitter constructor


Since there are a lot of variables, you can choose to initialize it with pre-defined values and tweak them later or hardcode them directly in the constructor. To make the whole thing working there is just 1 thing that you absolutely have to do before constructing the emitter, and it is :

CHOOSING THE PARTICLE
Sparticles emitter allows you to use 4 different kinds of "look" for your particles :

1  - TEXTURE                Use your asset - fast,but not the fastest
2  - CONVEX SHAPE      choose your cool shape - slowest one
3  - CIRCLE SHAPE
4  - PIXEL ARRAY          Just pass the size of the screen and the color you want! easiest and fastest


Everything it's really straighforward. For the Pixel array i've added a few modes ( more will come in the future ) to make the effect really cool :

-> Color Range   Avaiable for both emitters
-> Rainbow Mode  DirectionalEmitter
-> RandomColor   ExplosionEmitter


Again.. as the names suggest you can choose a random color within a predefined range, rainbow mode starting from a predefined range.
Color Range in my opinion is the best one, the particle will start from color A (you choose it ) and will change color ( based on lifetime ) til dying with color B ( you choose it ofc).

ENGINE

The last class you need to be aware of is the ParticleEngine that is nothing else than a higher-level wrapper to manage all your emitters. Every emitter has got his own ID you can access from. You add an emitter by passing its pointer and then place an Update in your main loop.

LINKS

The project is hosted on GitHub, but i've also added a link to mediafire.
In the ZIP file you'll find :
-> compiled headers (debug and release)
-> source code
-> include ( with headers file )
-> Tutorial ( not yet, i'll post it as soon as i can )

P.S : Excuse my english please.

MEDIAFIRE
http://www.mediafire.com/?1bben2471vl229c

GITHUB PROJECT
https://github.com/sparkon/Sparticles

CODE SAMPLES
Sample Explosion with pixels
Code: [Select]
#include "sparticles.h"
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>


int main()
{

sf::RenderWindow Window(sf::VideoMode(800,600,32),"PARTICLE SYSTEM TEST");
sp::ParticleEngine Engine;

Window.setFramerateLimit(120);
sp::ExplosionEmitterMode dmode(sp::Vector2D(400,300));
dmode.set_pixel_array(sf::Color(255,0,0),sf::Color(255,255,0));
dmode.n_of_particles_ = 6000;
dmode.life_time_ = 100;
dmode.blend_mode_ = sf::BlendAdd;
dmode.random_speed_ = 1;
sp::ExplosionEmitter* emitt = new sp::ExplosionEmitter(Window,dmode);
unsigned int ID = Engine.NewEmitter(emitt);


sf::Clock clock;
while ( Window.isOpen())
{
sf::Event Event;
while ( Window.pollEvent(Event))
{
switch(Event.type)
{
case sf::Event::Closed :
Window.close();
break;
default :
break;
}
}
Window.clear(sf::Color(0,0,0));
sf::Time dt = clock.restart();
Engine.Update(dt);
Window.display();
}
return 0;
}

Directional emitter sample
Code: [Select]
#include "sparticles.h"
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>


int main()
{

sf::RenderWindow Window(sf::VideoMode(800,600,32),"PARTICLE SYSTEM TEST");
sp::ParticleEngine Engine;

Window.setFramerateLimit(120);
sp::DirectionalEmitterMode dmode(sp::Vector2D(0,0));
dmode.set_texture("Particle0.png");
dmode.n_of_particles_ = 10000;
dmode.burst_rate = 0.001;
dmode.life_time_ = 150;
dmode.reuse_ = true;
dmode.blend_mode_ = sf::BlendAdd;
sp::DirectionalEmitter* emitt = new sp::DirectionalEmitter(Window,dmode);
unsigned int ID = Engine.NewEmitter(emitt);


sf::Clock clock;
while ( Window.isOpen())
{
sf::Event Event;
while ( Window.pollEvent(Event))
{
switch(Event.type)
{
case sf::Event::Closed :
Window.close();
break;
default :
break;
}
}
Window.clear(sf::Color(0,0,0));
sf::Time dt = clock.restart();
Engine.Update(dt);
Window.display();
}
return 0;
}

13
Graphics / Re: Sprite and Texture errors
« on: September 04, 2012, 08:05:46 pm »
FRex thank you for your time ! I've already changed my code :P

14
Graphics / Re: Sprite and Texture errors
« on: September 04, 2012, 08:00:12 pm »
FRex you said i should use drawable instead of passing the window reference, what do you mean?

15
Graphics / Re: Sprite and Texture errors
« on: September 04, 2012, 07:35:38 pm »
ok i'll go for that. But can you briefly explain me why that happened?

Pages: [1] 2
anything