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

Pages: [1]
1
SFML projects / Mazian Chronicles: The Settler
« on: August 15, 2014, 02:14:01 pm »
Hey there SFML enthusiasts! I've been working on and off on a 16 bit JRPG with what I like to think is an innovative battle system.

I've been using SFML 2.1 (started with 2.0 waaaay back) for things like window management, and drawing capabilities.

We're a team of three people:

1 programmer (which is me)
1 designer
and a 2D artist

We're huge fans of JRPGs and we decided we wanted to create one many years ago.

Now in whatever free time we've been working on it.

I'm not too great about  explaining it in great detail, but my designer is!

Take a look at http://www.nicholasstamatis.com/projects/mazian-chronicles/ to see a pretty detailed description of the battle system and some (outdated now) graphics!

Also here's an idle animation for one of characters: http://i.imgur.com/ae3dh4T.gif. I hope to have the battle system finished by the end of summer, then I will release a demo for testing purposes.

I know there isn't much to go on right now, but if you guys have feedback, I'd love to hear it!

2
General discussions / New website design?
« on: April 29, 2013, 07:44:11 pm »
I like it, it's very streamlined. That being said, I'll have to learn the layout again :) Also, SFML 2 is no longer listed as a release candidate, does that mean it's been officially released, and should I grab it to replace the RC that I had?

3
General / Data storage
« on: April 13, 2013, 09:17:44 pm »
Hello there guys. I apologize if this is in the wrong section, but it seemed like the appropriate place to post this.

I've been developing a J-styled RPG for a while now, and  I've been loading everything manually in the code.  I decided that it's time to off-load some of this stuff to files, and load them in from said files.

Now, while I'm focusing on Windows development right now, I think I'll eventually want to port my game over to Linux, so I need to keep things portable.

Things I want to store include:

Player/Monster stats
Player/Monster spritesheet locations
Battle backgrounds
Battle monster groups
eventually I'm going to be storing Tile maps/info also.

Now I've done some research and I've narrowed it down to a few options:
YAML
XML
INI (My research lead me to think that this would be the best for windows data files, but it's not portable without third party libraries)

So, what do you guys think would be best to use? Also, I'd eventually like to market this game, so if it's a library (boost comes to mind), It would be necessary for the license of said library to allow for that.

Or maybe I should just suck it up and write my own file format/ parser?

I appreciate all the help these forums are, Thanks in advance guys!

4
General discussions / Code Analysis tools
« on: April 05, 2013, 01:12:27 am »
Hey there SFML Community!

I'm developing a J-Styled RPG, and I want to run some Static/Dynamic Analysis on my code.

Now I tried using  pretty much every free tool listed here:
http://stackoverflow.com/questions/413477/is-there-a-good-valgrind-substitute-for-windows

And they all didn't work. They all failed to various extents. Hell AMD Code Analyst screwed up my registry so badly I had to do a system restore! Otherwise It'd tell me my images couldn't load.

Currently I'm using VS 2010 professional C++. I switch between an x64 Win8 machine and an x64 Win7 machine for development. I tried doing a search on the forums, but I turned up pretty much nothing.

I would appreciate any help! Thanks in advance!

5
Graphics / Animation playing an extra frame
« on: August 18, 2012, 06:31:42 pm »
Hey guys, I'm new to using SFML, and I was trying to get a sprite to animate through some frames. I've done this before in XNA and never had much of a problem with it.  However when I'm doing it now, it plays one extra frame for some reason

I adapted the c# animated sprite class that can be found on the wiki here : https://github.com/SFML/SFML/wiki/SpriteAnimated  into c++ and it seems to me like I'm doing everything correctly, and I just can't see where the problem is.

Here's my AnimatedSprite class:
#include "animatedsprite.h"
#include <iostream>

using namespace std;
AnimatedSprite::AnimatedSprite(Texture text, float frameWidth, float frameHeight, int fps,int firstFrame, int lastFrame,bool isAnimated = false, bool isLooped = true)
{
        _text = text;
        _frameWidth = frameWidth;
        _frameHeight = frameHeight;
        _fps = fps;
        _interval = _fps/250;
        _firstFrame = firstFrame;
        _lastFrame = lastFrame;
        _frameCount = lastFrame - firstFrame;
        _currentFrame = _firstFrame;
        _isAnimated = isAnimated;
        _isLooped = isLooped;
        _clock = 0;
        setTexture(_text);
        setTextureRect(getFramePositon(_currentFrame));
}


IntRect AnimatedSprite::getFramePositon(int frame)
{
        int count = (getTexture()->getSize()).x/ _frameWidth;
        int newX = frame% count;
        int newY = frame/count;
        IntRect pos(_frameWidth*newX,_frameHeight*newY,_frameWidth,_frameHeight);
        return pos;
}

void AnimatedSprite::update(float deltaTime)
{
        _clock += deltaTime;
       
        if(_clock >= _interval && _isAnimated)
        {
                IntRect temp = getFramePositon(_currentFrame);
                setTextureRect(temp);

                if (_currentFrame < _lastFrame)
                {
                        _currentFrame++;
                }
                else
                {
                        _currentFrame = _firstFrame;
                }

                _clock = 0;
        }

        if(!_isLooped && _currentFrame == _lastFrame)
        {
                _isAnimated = false;
        }
}

float AnimatedSprite::getFPS()
{
        return _fps;
}

void AnimatedSprite::setFPS(float value)
{
        _fps = value;
}


and here's my main:

#include <SFML/Graphics.hpp>
#include <iostream>
#include "AnimatedSprite.h"
using namespace sf;

using namespace std;

int main()
{
        RenderWindow window(VideoMode(1280, 720), "Mazian Chronicles");
        window.setFramerateLimit(60);
        Texture text;
        Clock deltaClock;
        Time dt;
        if(!text.loadFromFile("sprite.png"))
        {
                return EXIT_FAILURE;
        }

        AnimatedSprite  crono(text,33,35,60,0,12,true,true);
        while (window.isOpen())
        {
                Event event;
                while (window.pollEvent(event))
                {
                        if (event.type == Event::Closed)
                                window.close();
                }


               
                dt =deltaClock.restart();
                crono.update(dt.asSeconds());
                window.clear();
                window.draw(crono);
                window.display();
        }

        return 0;
}

I would be very appreciative if someone could help me with my (most likely stupid) mistake. Thanks!


Pages: [1]
anything