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

Pages: 1 [2] 3 4 5
16
Graphics / how do i draw lines/polygons?
« on: December 10, 2012, 11:47:48 pm »
Hey folks :)

How do i draw all kinds of primitives?
I know circleshape and rectangleshape, that was pretty easy,
but cant seem to figure out how to draw lines and polygons

ive looked at the documentation but i cant figure it out, 
and also the 1.6 tutorials... but it doesnt work the same as 2.0 :(

I will be grateful for any help you guys can provide  :D

17
General / Re: Need some general information about integrating Qt with SFML
« on: November 23, 2012, 08:59:44 pm »
I appreciate all the info and help you all gave me!!

Thanks alot  :) :) :) i know im gonna make it some day  ;D

18
General / Re: Need some general information about integrating Qt with SFML
« on: November 22, 2012, 11:44:50 pm »
As a side-note ........ Take all that into account before you get overwhelmed by the enormous amount of work something that big can take.

Hehe, ty for you sidenote  ;)

But right now, i still have a tons of things to learn...
Networking, AI, OOP, Qt, Math, hardcore C++ stuff (pointers, polymorphism and other standard c++ libraries).

So i think its gonna take more than 2 years at least just to learn that  ;D

19
General / Re: Need some general information about integrating Qt with SFML
« on: November 22, 2012, 01:55:55 pm »
Ok cool, thanks a lot  :D

20
General / Re: Need some general information about integrating Qt with SFML
« on: November 22, 2012, 01:22:33 pm »
Quote
Keep in mind that with Qt you can't draw the GUI over you SFML drawings, they need to be stricly separated, while with SFGUI/TGUI/CEGUI etc you can integrate the GUI into your game drawings.

In my future dreamgame, so far, i dont plan to draw the GUI over SFML.
I plan to make it some kind of similiar to League of Legends, where you have the log-on screen, menubar, chatbar and all other tabs in the main window.
Then when you start a game, a whole new window is gonna pop up, and then you play in that new window.

So thats what ive been thinking in my game. Where the main window is Qt, and when i start the game, the SFML window is gonna pop up and start the game and the gameloop.

But is it that Qt is capable of doing and fill the requirements of my future dreamgames needs?

Thanks a lot for helping me man!!  :) :)

21
General / Re: Need some general information about integrating Qt with SFML
« on: November 21, 2012, 10:56:34 pm »
Quote
if it actually can be used with SFML then please correct me.
http://www.sfml-dev.org/tutorials/1.6/graphics-qt.php
Yes, its compatible.

I just looked up SFGUI, and it looks nice too.
But all-in-all, what do you recommend me to learn?

My ultimate dream/goal is to become a professional 2d gameprogrammer and make a big game where people can log on, chat, create customgames and play with eachother, something like League of Legends  ::)

22
General / Need some general information about integrating Qt with SFML
« on: November 21, 2012, 07:49:49 pm »
Hello  ;D (it might be a dumbass question, sorry). But i just wanna know what Qt exactly kinda is, when integrating it with sfml

Is it something nice to use when you want to make a gamemenu with all kinds of buttons and images?

Normally when i make a gamemenu for my game, then i load the images, make int variables to control where the button is etc... which kinda take long time to make and its gonna get pretty messed up.

But is it that Qt can take care of?
It looks cool, but i dont know if i should learn it, if i shouldn't use it anyway   :P

23
SFML projects / Re: Hungry Snake 1.1 Released!!!
« on: November 17, 2012, 03:27:14 pm »
Btw, i wont update this game anymore for a long time, because im thinking about going back to general c++ and learn some more about polymorphism, inheritance, pointers, etc etc since i suck at it  :P

24
General / Re: How do i put icons at my application?
« on: November 15, 2012, 11:48:09 pm »
Quote
... which includes the Win7 taskbar icon...

Sorry im being so reckless sometimes  :(
I really appreciate all your help man, thanks alot  :)

25
General / Re: How do i put icons at my application?
« on: November 15, 2012, 09:55:00 pm »
There's only one icon, which is used for both big and small sizes.

I got it to work with this code

#include <SFML/Graphics.hpp>

sf::Image myicon;

int main()
{
        myicon.loadFromFile("snake.png");
        sf::RenderWindow mywindow(sf::VideoMode(800,600,32),"icon");
        sf::Event ev;
        mywindow.setIcon(32,32,myicon.getPixelsPtr());
        while(mywindow.isOpen())
        {
                while(mywindow.pollEvent(ev))
                {
                        if(ev.type == sf::Event::Closed)
                                mywindow.close();
                }
                mywindow.clear(sf::Color(0,200,0));
                mywindow.display();
        }
}

But the big icon on the taskbar isn't showing. Why is that?

26
General / Re: How do i put icons at my application?
« on: November 15, 2012, 01:00:54 pm »
Quote
Load the image into a sf::Image, then pass its size (width & height) as the first two parameters and for the third one: image.getPixelsPtr().

#include <SFML/Graphics.hpp>

sf::Image myicon;

int main()
{
        myicon.loadFromFile("snake.ico");
        sf::RenderWindow mywindow(sf::VideoMode(800,600,32),"icon");
        sf::Event ev;
        mywindow.setIcon(32,32,myicon.getPixelsPtr());
        while(mywindow.isOpen())
        {
                while(mywindow.pollEvent(ev))
                {
                        if(ev.type == sf::Event::Closed)
                                mywindow.close();
                }
                mywindow.clear(sf::Color(0,200,0));
                mywindow.display();
        }
}

I get an error in the console window that says:

Failed to load image "snake.ico". Reason : Image not of any known type, or corrupt.

 :-\
Also.... how can i pass the width and height?
myicon.width or height doesn't exist.

There is a tutorial on the SFML Wiki:

Tutorial: Create and Use SetIcon


That tutorial is from 1.6, and in 2.0 theres no .width or .height  :-\

27
General / Re: How do i put icons at my application?
« on: November 15, 2012, 12:26:57 am »
I have only the express version of visual studio, so i cant use resources.

Quote
Well if you use a sf::RenderWindow, then you should look at the documentation for the rendern window, where you'd see sf::RenderWindow::setIcon.

Yes, i use renderwindow. But where in the code should i write so my program knows where to load the icon, and what can i write in the 3rd parameter of sf::Window::SetIcon?

28
General / How do i put icons at my application?
« on: November 14, 2012, 11:22:27 pm »
ive looked at

http://www.sfml-dev.org/documentation/2.0/classsf_1_1Window.php#a63af61e026fba08e3153fd013620bcc0

void sf::Window::setIcon, but i didn't really understand it because it only have 3 parameters which is width, height and pixels. But where should i load the big & small icons?

Thanks for all your support  ;D

29
SFML projects / Re: My new game released!! HUNGRY SNAKE 1.0
« on: November 14, 2012, 06:40:10 pm »
I die as soon as it starts :(

Its like its super accelerated or something.

Its fast, but you souldn't die as soon as it starts  :)

30
SFML projects / Re: My new game released!! HUNGRY SNAKE 1.0
« on: November 13, 2012, 05:44:35 pm »
Quote
You have to poll the events otherwise the OS thinks the application doesn't work properly anymore.

What do you exactly mean by i have to "poll the events"? What kinds of events? I have no events on my loop when playing the game.  I only use:

if (sf::keyboard::iskeypressed(sf::keyboard::up))

and things like that.

Do you mean that i just need a "if(mywindow.pollevent(ev))" code inside my loop and the problem is solved?
 


Pages: 1 [2] 3 4 5
anything