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

Pages: 1 2 3 [4] 5
46
SFML projects / Re: My new Project
« on: November 26, 2012, 09:13:57 pm »
Quote
could you please download my app, try it and tell me if everything is alright.

I did, and it ran fine... that's how I figured out you spoke German, from the source code. :D

Quote
Wow, so it takes only a axe and shovel to turn a game into 'Minecraft'?
And the torch, Don't forget the torch! :P

Like I said... it reminded me more of Minicraft.
And because Notch did make it... It kinda made me think more of minecraft.
I honestly don't know why I thought of minecraft.
My brain works in mysterious ways... cant help it.

Quote
Laptop:

http://www.chiligreen.com/shop/configurator.asp?serie=375&id=8366 whit windows 8 64

Tablet:

http://support.acer.com/acerpanam/tablets/2011/Acer/ICONIATab/ICONIATabW500/ICONIATabW500sp2.shtml

Windows 8 32

Driver update maybe? Not sure if it would work but it couldn't hurt.
Stupid idea is stupid...
It cant be windows 8 either... because I have it too.... and so do you. :\

47
Window / Re: Mouse/Keyboard Event issue
« on: November 26, 2012, 08:55:42 pm »
Quote
Besides the codebase being quite, well ehrm ugly

I'm completely aware that it looks Very ugly... I don't even like it. :P
I'm also thinking about starting over and trying again if I cant fix this.

Quote
Try putting the sf::Event event right underneath while(Game::isOpen()).

Did it, nothing...

Quote
As a general advice, it's usually not common to call member functions with Classname::function(), but simply with function(). Also having a file that includes every header (IncludeFile.h) is a very bad idea. And a detail, since your programming in C++ it makes more sense (to me) to use .hpp ending, so whenever you see C++ code, you get .cpp/.hpp and for C code .c/.h. Unfortunately not too many programmer follow this.
There are many other things that could be nicer, so I suggest you take a look at some sources of other projects to get an idea of a bit a cleaner codebase.

Just a function?Not in a class? Well I kinda  wanted it to be a exclusive thing with player because I will soon have more stuff added like enemies and they need to update too.

I saw someone do the includefile.h thing and it seemed legit to me because he would only have to include it once, right?

On my other projects I had hpp...  but I just let Codeblocks do it this time for me and didn't really care to much about it.
Mostly because it ran anyway and it didn't bother me that much... to each, there own.

Looking at other projects? Noted...

48
SFML projects / Re: My new Project
« on: November 26, 2012, 08:38:45 pm »
Quote
It's sad to see that people only see Minecraft everywhere...
It's a survival game and so is Minecraft (at least in the survival mode) but there's no other connection and even before Minecraft there were hundreds of survival games.

Sorry, The Axe and shovel through me off... Minecraft really was a 3D mining game...
This one is a 2D digging game.... and they are both survival games.
Nonetheless... this game really reminds me of Minicraft... "Not Minecraft"
This whole situation kinda of reminds me of the release of Terraria... With the word "Minecraft" flying around.

And I do second the motion to debug it on the machine aswell.
Also, whats are the differences between the 2 machines by the way? Maybe there is a system requirement not met?

49
Window / Re: Mouse/Keyboard Event issue
« on: November 26, 2012, 08:24:47 pm »
Almost couldn't read the text :P
https://legacy.sfmluploads.org/file/157
I use codeblocks to build and code but I have a prebuilt exe in there, ready to run.

Edit: I may have removed the "Drawing.hpp" file, because it was empty.

50
Window / Re: Mouse/Keyboard Event issue
« on: November 26, 2012, 08:16:07 pm »
Forgot sorry... No your code worked, which is odd.
Er, I looked through everything and my code meet everything except maybe the way you did the if statement.
Tried the "Else if" thing on yours... nothing.
The pollevent function is called outside of the Player::Update command and it would break my code if it was in the Player::Update function.


Should I post ALL of my code?

51
Window / Re: Mouse/Keyboard Event issue
« on: November 26, 2012, 08:04:28 pm »
Tried another mouse... No dice... And the Recompile too.... Nothing.

52
Window / Re: Mouse/Keyboard Event issue
« on: November 26, 2012, 07:56:51 pm »
Quote
Okay my bad, don't show the full source, but a minimal and complete example, like the one I showed above. But as I said if the example above produced the error, then there's something wrong with your system/mouse.

Thats what I'm thinking... I will redownload the SFML 2.0 snapshot and recompile it.
I'm also starting to think its my mouse too.... Going to test another mouse in a second while thats compile and post back.

53
Window / Re: Mouse/Keyboard Event issue
« on: November 26, 2012, 07:47:28 pm »
Hold on.... Whoa... I had accidentally set this:
       
if((event.type == sf::Event::KeyReleased) && (event.key.code == sf::Keyboard::D))
        {
            Player::VELx -= 0.01;
        }

        if((event.type == sf::Event::KeyReleased) && (event.key.code == sf::Keyboard::A))
        {
            Player::VELx -= -0.01;
        }
 
Well, that's embarrassing... Removed it.... still nothing.

54
Window / Re: Mouse/Keyboard Event issue
« on: November 26, 2012, 07:40:09 pm »
Yes, but its not W but D... But I think you get the point.
I would also like to show the full source code but its kinda funky looking.
Note I did mess with it a little... trying to fix it.

But to get it fixed... Ya sure:

#include "Player.h"

void Player::Update(sf::Event event)
{
    Player::setTextureRect(Player::FrameSize);

        if((event.type == sf::Event::KeyReleased) && (event.key.code != sf::Keyboard::D))
        {
            //if button is not being pushed... Reset
            Player::FrameSize.left = 0;
            Player::VELx = 0;
            Player::clock.restart();
        }

        if((event.type == sf::Event::KeyReleased) && (event.key.code != sf::Keyboard::A))
        {
            //if button is not being pushed... Reset
            Player::FrameSize.left = 0;
            Player::VELx = 0;
            Player::clock.restart();
        }



    if(Player::frame == 6)
    {
        //if over frame limit for running... reset
        Player::frame = 1;
    }

    if(FrameSize.left == 192)
    {
        //if over frame limit for running... reset
        Player::FrameSize.left = 32;
    }
        if(event.type == sf::Event::KeyPressed){
        if(event.key.code == sf::Keyboard::D)
        {
            Player::FrameSize.left = 32 * Player::frame;
            Player::FrameSize.top = 0;
            Player::VELx += 0.01;
        }

        if(event.key.code == sf::Keyboard::A)
        {
            Player::FrameSize.left = 32 * Player::frame;
            Player::FrameSize.top = 32;
            Player::VELx += -0.01;
        }
        }

        if((event.type == sf::Event::KeyReleased) && (event.key.code == sf::Keyboard::D))
        {
            Player::VELx -= 0.01;
        }

        if((event.type == sf::Event::KeyReleased) && (event.key.code == sf::Keyboard::A))
        {
            Player::VELx -= -0.01;
        }


    Player::Location.x += VELx * Player::Seconds();
    Player::move(Player::Location);
    Player::frame++;
}

Player::Player()
{
    Player::frame = 1;
    if (!Player::ActorImage.loadFromFile("Player.png"))
    {
        std::string FAIL = "Failed to load Player Texture!";
        WriteLogLine(FAIL);
    }

    VELx = 0;
    VELy = 0;
    Player::setTexture(Player::ActorImage);
    FrameSize.height = 32;
    FrameSize.width = 32;
    Player::setTextureRect(Player::FrameSize);
    sf::Vector2f Scale;
    Scale.x = 2;
    Scale.y = 2;
    Player::setScale(Scale);
    Player::sethealth(100);
    Player::setPassive(false);
}

55
SFML projects / Re: My new Project
« on: November 26, 2012, 07:33:20 pm »
So its a top down minecraft? Cool! Notch had a cool entry for the lundumdare, it was called minicraft.
https://s3.amazonaws.com/ld48/ld22/index.html
You can probably get a couple ideas from his game, Not to steal but to learn from.
Either way, awesome game.

I would also like to know when you are going to work on world generation? and how? Noise maps and random numbers?

Hallo von amerika!

56
Window / Mouse/Keyboard Event issue
« on: November 26, 2012, 06:32:08 pm »
Alright... I have done everything in my power to fix this but it turns out.... I can't fix it.
Basically I call a check to see if a button on the keyboard is pressed and which button is being pressed.
Then it does what it is supposed to do(Move player left or right), And it works... BUT!

When ever I move the mouse, it does the same thing(Move the player to the right).
Does the problem rely on the mouse I am using(Razer - Black Mamba) or am I an idiot?
Here is a snippet of my code:

        if((event.type == sf::Event::KeyPressed) && (event.key.code == sf::Keyboard::D))
        {
            //Move to the Right and shift one frame on the animation tile
            Player::FrameSize.left = 32 * Player::frame;
            Player::FrameSize.top = 0;
            Player::VELx += 0.01;
        }

        if((event.type == sf::Event::KeyPressed) && (event.key.code == sf::Keyboard::A))
        {
            //Move to the Left and shift one frame on the animation tile
            Player::FrameSize.left = 32 * Player::frame;
            Player::FrameSize.top = 32;
            Player::VELx += -0.01;
        }
        if((event.type == sf::Event::KeyReleased) && (event.key.code != sf::Keyboard::D))
        {
            //if button is not being pushed... Reset the animation
            Player::FrameSize.left = 0;
            Player::VELx = 0;
            Player::clock.restart();
        }

        if((event.type == sf::Event::KeyReleased) && (event.key.code != sf::Keyboard::A))
        {
            //if button is not being pushed... Reset the animation
            Player::FrameSize.left = 0;
            Player::VELx = 0;
            Player::clock.restart();
        }

Oh and also... Note that the VEL stuff is not 100% thought through yet, I needed to test the movement of the sprite and its animation.
As for the "(event.type == sf::Event::KeyReleased)" and "(event.type == sf::Event::KeyPressed)", has no effect if it was like:

        if(event.type == sf::Event::KeyPressed){
        if(event.key.code == sf::Keyboard::D)
        {
            Player::FrameSize.left = 32 * Player::frame;
            Player::FrameSize.top = 0;
            Player::VELx += 0.01;
        }

        if(event.key.code == sf::Keyboard::A)
        {
            Player::FrameSize.left = 32 * Player::frame;
            Player::FrameSize.top = 32;
            Player::VELx += -0.01;
        }
        }

Any insight or fix or anything would be most greatly appreciated.

57
Graphics / Re: Optimizing Texture and Sprite management
« on: November 11, 2012, 10:46:06 pm »
This is mostly used for 3d games but try researching Mipmaps...
That way, progressively, your loading the sprites...
This is also great for when you want to zoom out and will not be able to see the whites of there eyes to begin with.

Ya its stupid, Mipmaps for 2D games? Here's my offer, Why not?

58
General discussions / Re: A book on SFML -- looking for author(s)!
« on: November 11, 2012, 09:43:34 am »
I wouldn't mind having a copy... as long as it has tons of examples and resources to pull from it.
Then I might consider a hard copy for my fancy on desk book shelf, for quick references. :P

59
General discussions / Re: Engine Dev or Game Dev...Which one goes first?
« on: November 11, 2012, 09:33:14 am »
Well both of you strike a good argument(And articles), I never did want to reinvent the wheel.
The fact that I'm here, on a forum of a "Multimedia" library, proves that I speak just that.
Also i'm in the right place... considering what you guys told me.
And I knew making a engine would be a stupid endeavor, You guys proved it and now I know for sure.
If I wanted to make a engine all by my lonesome... there would be no "game".... or engine.
Not that I couldn't do it but because I would get bored... I like games not tech demos.
I was also right that it WAS a stupid question... Ha!

If this is all true(About the game not the engine), What would the workflow be to make it?
And I did see TDD, I like it, and I might try it. but I want this to be answered.
So far my workflow has been very hectic and irrational most of the time.
And what I usually get is either incompatible code from the last thing I implemented.
Or I strike gold and get something I want, Which is 4/5's of the time.

I watched Notch write a game for a Ludum Dare, on I think twitch?
He had this workflow about it where he kept pounding at it and didn't care to much for the structure of it.
So it looked crude and inefficient(Structure not speed), Granted this was Java and he can see his changes as he set them. But it wasn't enough for me to stand up and say "Forget this, its Java now".

Then I watched one of the Amnesia Dev's, No different, He had low level code for the complicated and High level scripts for the simple, and yet again... he got it out fast, even faster than notch did.
So basically I believe at that point, that a good workflow and style is key.

So you can tell, I am not all sorts of confused. I'm actually hoping you guys might have a tip that might help me. Maybe a library that has a usable interface to Python like the amnesia Dev? Or is that something I might need to make?

But so far, I got a lot to chew on now, Thanks!
-

As for the Auto correction... I would just go get Visual Studio, but I like my IDE to be on Linux too.
OR I might just not worry about it and keep reading the documentation.
(Taking your advice Laurent :P)

60
General discussions / Re: Hi?Question...
« on: November 09, 2012, 11:35:20 am »
See I knew I was crazy... I never had auto correct fail on me till now.
Know any way to fix it?

Pages: 1 2 3 [4] 5
anything