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

Pages: 1 [2] 3 4 5
16
General / Re: How to make a class for displaying levels
« on: June 28, 2012, 08:55:35 pm »
Hey natchos, thanks for your reply!!!
I am not sure as this is my first game but I will try to type out all the info I need.

1. Level name
2. Chapter number (each level has multiple chapters)
3. Chapter name

4. What sort (different species) enemies will spawn
5. What sprites to load and display (the level sprites and so on)
6. ????

I am not sure what more to do as this is my first game and it is still a learning process :)

Edit
I think a level range would be good to i.e. level 1-5. If someone is higher, then he will not receive experience or receive less from killing enemies.

I also want to be able to make a list of enemies with their statistics like:
- HP (health)
- Damage (Strenght based for example)
- Gold drop (how much he can drop)
- Item drop (which items he can drop, items will be in a list to like enemies list)
- Enemy sprite(s)

This so I can easilly add new monsters or items. But that is of no concers for the class I am asking for now ;)

17
General / How to make a class for displaying levels
« on: June 28, 2012, 07:31:45 pm »
Dear readers,

could someone give me a sample code, or explain to me (since I am totally noob when it comes to developing games) how I should make a class to load levels?

I have no clue where to start and -or how to do it.

I need a class which includes (i think).
What level to load, what enemies in it and where to spawn, and some general info i guess like "level name" and so on.

Hope someone can tell me how they did it :)

18
General / Re: During startup program exited with code 0xc0000135
« on: June 27, 2012, 10:03:39 pm »
Will do Laurent my bad. Anyways, I will edit this post in a bit, my previous one isnt valid anymore lol

EDIT: Got everything working... I downloaded SFML 2.0 and compiled it myself with Cmake.
To make sure this was the solution, I reinstalled my computer downstairs, and tried the SFML 2.0 RC edition and again, everything was working except the Network stuff.

I then downloaded the 2.0 Snapshot, compiled it, tried that and it works flawless.

So I am sorry I cant give any solid solution to you guys on what the problem was, but it seems that RC version is giving me problems and the 2.0 Snapshot is working.

19
General / Re: During startup program exited with code 0xc0000135
« on: June 27, 2012, 05:13:55 pm »
Well, I can be very clear about that one lol.

With the following code:
Code: [Select]
#include <SFML/Network.hpp>
#include <QDebug>
#include <iostream>
#include <string>

#define _DEBUG

int main()
{
    std::cout << "test";
   
   

    return 0;
}

Breakpoints work on ANY line... but with the following code:
Code: [Select]
#include <SFML/Network.hpp>
#include <QDebug>
#include <iostream>
#include <string>

#define _DEBUG

int main()
{
    std::cout << "test";
   
    sf::TcpSocket socket;

    qDebug() << "Line 14...";

    sf::IpAddress address;

    std::string str;

    return 0;
}

Breakpoints do NOT work... the program gets terminated even BEFORE running line 1, which only includes the Network.hpp file.

So basicly I can do anything, but when calling to a function or class within Network.hpp the program crashes even before running line 1 of my .cpp file.

Same on my other computer.

20
General / Re: During startup program exited with code 0xc0000135
« on: June 27, 2012, 04:47:30 pm »
Have you copied the sfml-network2-d.dll file in the same directory as your executable?

Yeah I got all files there...

sfml-audio-2.dll
sfml-audio-d-2.dll
sfml-graphics-2.dll
sfml-graphics-d-2.dll
sfml-network-2.dll
sfml-network-d-2.dll
sfml-system-2.dll
sfml-system-d-2.dll
sfml-window-2.dll
sfml-window-d-2.dll

They are in the same directory as where my .exe file is.

To eXpl0it3r;

You are totally right, but I really do not expect people to do my work, it is just that I found a lot of websites which provided me with examples which do not work. Maybe because I understood them wrong (as English is not my main language, which shouldnt be an excuses I know lol).

As far as I saw they meant:

1. Include the qDebug header.
2. Parse custom info by using qDebug("Message here");

The messages will only be shown when running the debugger, and not the "normal" build.

Anyways, I will look into the link you gave me, seriously, thank you very, very much for the link. I will look into it (already printed it out to learn it all haha).

21
General / Re: During startup program exited with code 0xc0000135
« on: June 27, 2012, 04:19:15 pm »
ohhh you are awesome, going to check it out and learn it right away, I edited my last post with some information which might be helpful on this problem :P

P.S. a small part of my debugger log:
Quote
Application started
>*running,thread-id="all"
>=thread-exited,id="1",group-id="i1"
sThread 1 in group i1 exited
>=thread-group-exited,id="i1"
sThread group i1 exited
>167^error,msg="During startup program exited with code 0xc0000135."
dCOOKIE FOR TOKEN 167 ALREADY EATEN (InferiorRunOk). TWO RESPONSES FOR ONE COMMAND?
dNOTE: INFERIOR EXITED
dState changed from InferiorRunOk(11) to InferiorExitOk(16).
dState changed from InferiorExitOk(16) to InferiorShutdownOk(19).
dState changed from InferiorShutdownOk(19) to EngineShutdownRequested(20).
dQUEUE: SHUTDOWN ENGINE
sExecutable failed: During startup program exited with code 0xc0000135.
dCALL: SHUTDOWN ENGINE
dPLAIN ADAPTER SHUTDOWN 20
dINITIATE GDBENGINE SHUTDOWN IN STATE 0, PROC: 2
<168-gdb-exit
>168^exit
dGDB CLAIMS EXIT; WAITING
dGDB PROCESS FINISHED, status 0, code 0
dNOTE: ENGINE SHUTDOWN OK
dState changed from EngineShutdownRequested(20) to EngineShutdownOk(22).
dState changed from EngineShutdownOk(22) to DebuggerFinished(23).
dQUEUE: FINISH DEBUGGER
dNOTE: FINISH DEBUGGER
dHANDLE RUNCONTROL FINISHED
sDebugger finished.

22
General / Re: During startup program exited with code 0xc0000135
« on: June 27, 2012, 04:02:55 pm »
Super thanks for your reply eXpl0it3r, but I need a guide on how to use the Qt debugger.
Anyways, I know (learned some time back ago) there is a function qDebug or something, I will look into that.

Edit:
I really dont understand the debug stuff on Qt...
Code: [Select]
CONFIG += debug
CONFIG += console

Is what I added to my .pro file.
I added this code to my .cpp file.

Code: [Select]
qDebug() << "Line 14...";
When I press the "debug" button, nothing happens actually.

My .pro file looks like this now:

Code: [Select]
QT       += core gui

TARGET = project
TEMPLATE = app

SOURCES += main.cpp
HEADERS  +=

INCLUDEPATH = "C:\\Users\\Angelo\\Desktop\\SFML-2.0-rc\\include"
LIBS += -L"C:\\Users\Angelo\\Desktop\\SFML-2.0-rc\\lib"


CONFIG += debug
CONFIG += console

CONFIG(debug, debug|release) {
    LIBS += -lsfml-graphics-d -lsfml-window-d -lsfml-system-d -lsfml-network-d
}

CONFIG(release, debug|release) {
    LIBS += -lsfml-graphics -lsfml-window -lsfml-system -lsfml-network
}

my cpp file looks like:
Code: [Select]
#include <SFML/Network.hpp>
#include <QDebug>
#include <iostream>
#include <string>

#define _DEBUG

int main()
{
    sf::TcpSocket socket;

    qDebug() << "Line 14...";

    sf::IpAddress address;

    std::string str;

    return 0;
}



When I press the "Run" button I get the message:
Quote
Starting C:\Users\Angelo\Desktop\Projecten\Validate Username and Password\project-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug\debug\project.exe...
The program has unexpectedly finished.
C:\Users\Angelo\Desktop\Projecten\Validate Username and Password\project-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug\debug\project.exe exited with code -1073741515

When I press the "Debug" button (green arrow with a bug on it) I get a popup message:
Quote
During startup program exited with code 0xc0000135.

Compile Output:
Quote
16:16:49: Running build steps for project project...
16:16:49: Configuration unchanged, skipping qmake step.
16:16:49: Starting: "C:\QtSDK\mingw\bin\mingw32-make.exe"
C:/QtSDK/mingw/bin/mingw32-make.exe -f Makefile.Debug
mingw32-make.exe[1]: Entering directory `C:/Users/Angelo/Desktop/Projecten/Validate Username and Password/project-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug'
mingw32-make.exe[1]: Nothing to be done for `first'.
mingw32-make.exe[1]: Leaving directory `C:/Users/Angelo/Desktop/Projecten/Validate Username and Password/project-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug'
16:16:49: The process "C:\QtSDK\mingw\bin\mingw32-make.exe" exited normally.

Application Output:
Quote
Debugging starts
Debugging has finished

23
General / Re: During startup program exited with code 0xc0000135
« on: June 27, 2012, 03:42:40 pm »
I am using the debugger. It says "debugging started", "Debugging ended" and "program terminated succesfully without errors" lol. I will start documenting everything I did and post it here for a good overall view.

24
General / Re: During startup program exited with code 0xc0000135
« on: June 27, 2012, 12:05:17 am »
It does not tell me a line, just a pop-up message.
I will carefully document everything tomorrow and let you know what I find out.

25
General / Re: During startup program exited with code 0xc0000135
« on: June 26, 2012, 06:11:33 pm »
Tested it out, but again the same error...

So far I see, this error only comes when using something from the

<Network.hpp> header/class :(


I started a new project to make sure other stuff works, and as expected everything else is working perfectly. The following code is working flawless:

// include SFML headers
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>

// include other headers
#include <string>

// custom headers
#include <userCharacter.h>

// global settings
bool showSplashScreen = false;
bool isGameAvailable = false;
bool isGameExiting = false;
bool isGamePaused = false;
bool isShowingMenu = false;

// main loop
int main()
{
    // game title and info, to be placed in welcomeScreen.h
    // set a font type
    sf::Font font;
    font.loadFromFile("C:\\Windows\\Fonts\\arial.ttf");

    // set title
    sf::Text tTitle("Crystallibrium", font, 30);
    tTitle.setColor(sf::Color::White);
    tTitle.setPosition(200, 200);

    // set version info
    sf::Text tVersion("ver. 0.1", font, 13);
    tVersion.setColor(sf::Color::White);
    tVersion.setPosition(388,217);

    // set story subtitle
    sf::Text tSubtitle("The crystal chronicles", font, 16);
    tSubtitle.setColor(sf::Color::White);
    tSubtitle.setPosition(200, 234);
    // -------------------------------------------------->

    // Create the main window
    sf::RenderWindow window(sf::VideoMode(800, 600), "Crystallibrium");
    window.setFramerateLimit(60);

    // Start the game loop
    while (window.isOpen())
    {
        // Process events
        sf::Event event;
        while (window.pollEvent(event))
        {
            // Close window : exit
            if (event.type == sf::Event::Closed)
                window.close();
        }



        // Clear screen
        window.clear();

        // Draw text
        window.draw(tTitle);
        window.draw(tVersion);
        window.draw(tSubtitle);

        // Update the window
        window.display();
    }

    return 0;
}

// Declerations
userCharacter::userCharacter(std::string cName, int cLevel, float cExperience) : characterName(cName), characterLevel(cLevel), characterExperience(cExperience){}

So where it goes wrong, is all about the Network stuff :(

26
General / Re: During startup program exited with code 0xc0000135
« on: June 26, 2012, 12:47:19 pm »
Np Laurent, awesome that you tried I am really thankfull :)
Is it anyways possible for just 1 Libray to not work? cause I can use text, sprites, and everything else... it all works flawless its just the Http part which generates errors here ^^

Update:
I just tried the same on a different computer... everything works except the Http part... so badicly on a different computer I get exact the same problems and everything...

The computer is (also) a Windows 7 64-bit installation with only Qt SDK (newest version) on it, which I just installed on it for the first time, and the SFML 2.0 RC 32-bit.

I did everything from scratch as this computer has never had any development programs installed.

May it be a bug in the library on certain 64-bit systems perhaps? or is that impossible?... unfortunately I dont have a 3rd computer otherwise I would test it there to.

Best regards, and thanks again for your patients and help!

27
General / Re: During startup program exited with code 0xc0000135
« on: June 26, 2012, 11:46:09 am »
Yeah, like I said, never seen that code, you are the first one to show it to me :)
I am google'ing it now to find more info so I understand what this does correctly.

I found some great information at this link link.

Anyways, I added it to my PRO file and now I have this:

QT       += core gui

TARGET = project
TEMPLATE = app

SOURCES += main.cpp
HEADERS  +=

INCLUDEPATH = "C:\\Users\\Angelo\\Desktop\\SFML-2.0-rc\\include"
LIBS += -L"C:\\Users\Angelo\\Desktop\\SFML-2.0-rc\\lib"




CONFIG(debug, debug|release) {
    LIBS += -lsfml-graphics-d -lsfml-window-d -lsfml-system-d -lsfml-network-d
}

CONFIG(release, debug|release) {
    LIBS += -lsfml-graphics -lsfml-window -lsfml-system -lsfml-network
}

Still no error messages or anything changes as previous :)

28
General / Re: During startup program exited with code 0xc0000135
« on: June 25, 2012, 04:30:22 pm »
Oh never knew (nor seen) that, going to try that out now :)

Update:
Still nothing...

Quote
Debugging starts
Debugging has finished

And a pop-up saying:

Quote
During startup program exited with code 0x0000135

My Pro file:
Code: [Select]
QT       += core gui

TARGET = project
TEMPLATE = app


SOURCES += main.cpp

HEADERS  +=

#LIBS += -L"C:\\Users\Angelo\\Desktop\\SFML-2.0-rc\\lib" -lsfml-graphics -lsfml-window -lsfml-system -lsfml-network

INCLUDEPATH = "C:\\Users\\Angelo\\Desktop\\SFML-2.0-rc\\include"

CONFIG(debug, debug|release) {
    LIBS += -L"C:\\Users\Angelo\\Desktop\\SFML-2.0-rc\\lib" -lsfml-graphics -lsfml-window -lsfml-system -lsfml-network
}
CONFIG(release, debug|release) {
    LIBS += -L"C:\\Users\Angelo\\Desktop\\SFML-2.0-rc\\lib" -lsfml-graphics -lsfml-window -lsfml-system -lsfml-network.
}

and in my main loop all I have is:

Code: [Select]
sf::Http http;
return 0;

All of SFML works great (so far) except the Http class :D

EDIT: Been using Google all day but no solution yet ;  ;

I made a fast movie so anyone can see my settings and code, probably easier then copy pasting it everytime... hope someone has some more tips which I can try out :)

Movie of my files (.mp4 format)

29
General / Re: During startup program exited with code 0xc0000135
« on: June 25, 2012, 02:20:59 pm »
I will rebuild everything in a bit, for now I just replaced the files from the by me compiled, with the release candidate one :) (different location though).

#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/Network.hpp>
#include <iostream>
#include <string>

int main()
{
     // Create a new HTTP client
     sf::Http http;
     /*
     // We'll work on http://www.sfml-dev.org
     http.setHost("http://www.sfml-dev.org");

     // Prepare a request to get the 'features.php' page
     sf::Http::Request request("features.php");

     // Send the request
     sf::Http::Response response = http.sendRequest(request);

     // Check the status code and display the result
     sf::Http::Response::Status status = response.getStatus();
     if (status == sf::Http::Response::Ok)
     {
         std::cout << response.getBody() << std::endl;
     }
     else
     {
         std::cout << "Error " << status << std::endl;
     }
     */


    // end program
    return 0;
}

As you can see in the code above, the only thing which will be read (the rest is commented) is the command where we declare a new Http value.

That is where the error is generator (the program stops working).

My .pro file is as follow:
#-------------------------------------------------
#
# Project created by QtCreator 2012-06-24T16:09:39
#
#-------------------------------------------------

QT       += core gui

TARGET = project
TEMPLATE = app


SOURCES += main.cpp

HEADERS  +=

LIBS += -L"C:\\Users\Angelo\\Desktop\\SFML-2.0-rc\\lib" -lsfml-graphics -lsfml-window -lsfml-system -lsfml-network

INCLUDEPATH = "C:\\Users\\Angelo\\Desktop\\SFML-2.0-rc\\include"

30
General / Re: During startup program exited with code 0xc0000135
« on: June 25, 2012, 01:52:22 pm »
Yeah just took the Qt SDK from the mainlink on the index, which is Qt 4.7.4 32-bit :)
I will try that pre-compiled version today, after I will let you know if that solved the problem :)

Update
Just used the RC version, but still the same error...   :'(

SFML 2.0 Release Candidate - Windows 32 bits - GCC DW2 (11.5 MB)

Pages: 1 [2] 3 4 5