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

Pages: [1]
1
SFML projects / Re: Before the Reign
« on: May 24, 2012, 04:18:44 pm »
Hey :) Yeah along with the current preview I'll be adding a journal which shows the current quest and maybe completed quests. As for the source code, I might upload just the Quest part of the code, unless you wanted just this part of it?
Hey, yea thats what i mean :)

2
SFML projects / Re: Before the Reign
« on: May 23, 2012, 09:28:08 pm »
The Quest system looks nice. Are you planning to build something like a Questjournal? Like you have a quest where you need to kill 5 goblins, but you forgot how many you killed so far and you want to look it up? or you forget what quests you actually have to do?

Are you gonna upload the source for the Quest System Alpha as well?

regards
Jany

3
SFML projects / Re: Before the Reign
« on: May 20, 2012, 05:45:31 pm »
i may have a question ;) Did you draw the Sprites by yourself, or did you find them on the internet for free?
I am not a good pixelartist yet so my sprites look kinda weird and im looking for some nice looking ones^^


i found out that on the forest_collision.png was a tree that blocked the way, it may have gotten there by accident, after i deleted it i could get through and kill the goblin ;)

Hey :) For all of the sprites and maps, i found them online or used a generator:
http://www.famitsu.com/freegame/tool/chibi/index1.html
http://www.lorestrome.com/pixel_archive/main.htm

They're the two main sources :)


Thank you very much, the Character creator is very nice. Even with my bad Japanese ^^

4
SFML projects / Re: Before the Reign
« on: May 19, 2012, 05:03:21 am »
i may have a question ;) Did you draw the Sprites by yourself, or did you find them on the internet for free?
I am not a good pixelartist yet so my sprites look kinda weird and im looking for some nice looking ones^^


i found out that on the forest_collision.png was a tree that blocked the way, it may have gotten there by accident, after i deleted it i could get through and kill the goblin ;)

5
SFML projects / Re: Before the Reign
« on: May 17, 2012, 02:36:22 pm »
First of all: Very nice game, i am coding one myself too, also with 2D graphics and stuff! =)

I've only one problem in your game, :D after i left town and went on, i came through a little cave and ended up in a forest with thornes, i can go "through" some of the trees but then suddenly one tree has collision and i cannot go further, i can see a troll beneath me but cannot reach cause of that thorntree ;)

but so long: good job ! =)
regards
jany

6
SFML projects / Re: COSMAGERS - new 2D MMORPG developing
« on: May 11, 2012, 12:36:53 pm »
It looks very good, i will keep an eye on that one ;)

7
General / QtCreator 4.7.3 with SFML 1.6 [Windows 7]
« on: December 06, 2011, 03:07:09 pm »
Yes i m sorry, i could have dont it before posting ;)

I did it and it was such an silly Error
i did QSFMLWidget *gameWorld; in the Class Declaration
but i forgot to write gameWorld = new QSFMLWidget(this); into the Constructor...
im silly, sorry ^^

Regards
Jany

8
General / QtCreator 4.7.3 with SFML 1.6 [Windows 7]
« on: December 06, 2011, 02:41:29 pm »
Good afternoon,

i am trying to use the SFML Libraries, i downloaded the MingW Libraries, within the QtCreator but its driving me crazy because its always telling me some different errors, now i am at this error:

But now it works to start, but no window appears on my desktop it only says this:
Quote
Start F:\Programming\Basic\spiele\pixelmännchenspiel\Pixelmännchenspiel-build-desktop\debug\Pixelmann.exe...
F:\Programming\Basic\spiele\pixelmännchenspiel\Pixelmännchenspiel-build-desktop\debug\Pixelmann.exe beendet, Rückgabewert -1073741819

Rückgabewert = Return Code

This is my *.pro file:
Code: [Select]
TARGET = Pixelmann

HEADERS += pixelmann_gui.hpp \
    pixelmann_qsfmlwidget.hpp
SOURCES += pixelmann_gui.cpp \
    pixelmann_main.cpp \
    pixelmann_qsfmlwidget.cpp

win32 {
  INCLUDEPATH += F:/Programming/Basic/SFML-1.6/include
  LIBS += "F:/Programming/Basic/SFML-1.6/lib/libsfml-graphics-s-d.a" \
          "F:/Programming/Basic/SFML-1.6/lib/libsfml-window-s-d.a" \
          "F:/Programming/Basic/SFML-1.6/lib/libsfml-system-s-d.a"
}


For this i have to say, i dont really know which of the libraries to use. i tried using libsfml-*.a, libsfml-*-d.a, libsfml-*-s.a and the libsfml-*-s-d.a


And this is the Declaration and Definition of the Widget. It is made with the Tutorial found in the SFML 1.6 Tutorial Section "Using SFML with Qt Interface"
Declaration:
Code: [Select]
#ifndef PIXELMANN_QSFMLWIDGET_HPP
#define PIXELMANN_QSFMLWIDGET_HPP

#include <SFML/Graphics.hpp>
#include <QPaintEngine>
#include <QPaintEvent>
#include <QShowEvent>
#include <QTimer>
#include <QWidget>

class QSFMLWidget : public QWidget, public sf::RenderWindow {
    Q_OBJECT
private:
    bool initiert;
    QTimer *idleTimer;
    sf::Image myImage;
    sf::Sprite mySprite;

    void OnInit();
    void OnUpdate();
    QPaintEngine* paintEngine() const;
    void showEvent(QShowEvent *);
    void paintEvent(QPaintEvent *);

public:
    QSFMLWidget(QWidget *parent = 0, unsigned int frameTime = 0);
    ~QSFMLWidget();
};

#endif // PIXELMANN_QSFMLWIDGET_HPP


Definition:
Code: [Select]

#include "pixelmann_qsfmlwidget.hpp"
#ifdef Q_WS_X11
    #include <qx11info_x11.h>
    #include <X11/Xlib.h>
#endif

QSFMLWidget::QSFMLWidget(QWidget *parent, unsigned int frameTime) :
    QWidget(parent),
    initiert(false) {
    // Setup some states to allow direct rendering into the Widget.
    setAttribute(Qt::WA_PaintOnScreen);
    setAttribute(Qt::WA_OpaquePaintEvent);
    setAttribute(Qt::WA_NoSystemBackground);

    // Set Strong Focus to enable keyboard events to be received
    setFocusPolicy(Qt::StrongFocus);

    // Setup the Timer
    idleTimer->setInterval(frameTime);

    return;
}

QSFMLWidget::~QSFMLWidget(){
    return;
}

void QSFMLWidget::showEvent(QShowEvent *) {
    if ( !initiert ) {
        // Under X11, we need to flush the commands sent to the server to ensure
        // that SFML will get an updated view of the windows
        #ifdef Q_WS_X11
            XFlush(QX11Info::display());
        #endif
        ;
        // Create the SFML Window with the widget handle
        Create(winId());

        //Initalize
        OnInit();

        //Setup the Timer to trigger a refresh at specified framerate
        connect(idleTimer, SIGNAL(timeout()), this, SLOT(repaint()));
        idleTimer->start();

        initiert = true;
    } // if ( !initiert )

    return;
}

QPaintEngine* QSFMLWidget::paintEngine() const {
    return 0;
}

void QSFMLWidget::paintEvent(QPaintEvent *) {
    // Update the window
    OnUpdate();

    // Display on Screen
    Display();

    return;
}

void QSFMLWidget::OnInit() {
    // Load the Image
    myImage.LoadFromFile("images/screen/screensaver.png");

    // Setup the Sprite
    mySprite.SetImage(myImage);
    mySprite.SetCenter(mySprite.GetSize() / 2.0f);

    return;
}

void QSFMLWidget::OnUpdate() {
    // Clear Screen
    Clear(sf::Color(0,128,0));

    // Rotate the Sprite
    mySprite.Rotate(GetFrameTime() * 100.f);

    // Draw it
    Draw(mySprite);
}


King regards
Jany

9
General / SFML Complete Game Tutorial
« on: November 11, 2011, 11:01:01 am »
a really good tutorial! it helped me much to get into the SFML Library, and also i had fun reading and coding with it. =)

Waiting for Part 8 :)

Greetings Jany

Pages: [1]