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

Pages: [1]
1
Network / Sockets cannont be a vector
« on: April 03, 2016, 01:38:36 am »
I dont know what to do
(click to show/hide)

this throws this error in vs2015

Severity   Code   Description   Project   File   Line   Suppression State
Error   C2280   'sf::TcpSocket::TcpSocket(const sf::TcpSocket &)': attempting to reference a deleted function   Test   c:\program files (x86)\microsoft visual studio 14.0\vc\include\xmemory0   655   

2
General / Error 0xc000007b SOLVED
« on: February 28, 2016, 09:35:53 am »
I compile on a windows 7, 64 bit laptop with vs 2015. The program(s) works on my laptop, and my windows 7, 64 bit desktop; it does not work on 2 windows 10 computers and a windows 7 computer owned by my friends.

I am using sfml 2.3.2 with c++, when executing a program that i compiled (one with graphics, system, and window, and another with system and networking), the computer throws an error "The application was unable to start correctly (0xc000007b). Click OK to close the application" . I have programs that I made also with sfml that do not throw the error, but i still believe the issue to be sfml (or probably my handling of it) because if I remove one of the sfml files nessesary for dynamic linking, I get a window saying that such file (eg sfml-audio-d-2.dll) is missing like normal, but when I have all of the necessary files the window pops up.

looking for any real reason this might happen, or a solution to the issue.
just ask for more information if necessary as I don't know what to include. thanks for any response.


----EDIT----

I apoligize for not trying this sooner, but I tried to use another program without sfml at all
(click to show/hide)

and I received the same error message when executing, I'm still asking for help, it just probably isn't related to sfml.

----EDIT-----
Turns out I'm just dumb and needed to compile in release...

3
Graphics / Add a glow
« on: January 24, 2016, 09:02:09 am »
So basically what I've been looking for for quite a while is a way to "add a glow" to specific sprites, shapes (ie sf::RectangleShape), and text. I don't know what direction to go to get what I'm looking for, or if it is even possible. At first I thought that I would need to use a bloom or a blur shader, so after looking into it for quite a while I never found something that looked like what i wanted to achieve, they only affected the actual texture itself, not the space around it. Then I found bloom post effects, that affected the area outside of the sprite/shape, but it had to be applied to everything that was being drawn as far as I could tell. I did find a "tutorial" that simply made a glow sprite and drew it on top of the sprite with the "glow", but i feel like this could be done without 2 textures for every sprite, also it wouldn't work for shapes or text. Answer is probably just shaders, but I've been looking for longer than I'd care to admit, so I'm here now. Sorry if off topic. Thanks in advance.

tldr
I want the after, for specific things (not everything on screen to have a glow, just a few sprites/text/shapes) , how do I achieve it, and where should I start?

4
Feature requests / setTextureOffset() / offsetTexture()
« on: June 01, 2015, 04:38:29 am »
used:
// works like setPosition()
Sprite.setTextureOffset(float xOffset, float yOffset);
Sprite.setTextureOffset(/*vectorthing*/);

// works like move();
Sprite.offsetTexture(float xOffset, float yOffset);
Sprite.offsetTexture(/*vectorthing*/);
 

Basically, it would move the texture within the sprite's box. When the Texture is set to loop, it would still repeat within the Sprite.

a major use of this:
Parallax: set the sprite with the background texture (looping), equal to the size of the view, and centered on the player. then each frame call
Sprite.offsetTexture(PlayerX / SomeNumber, PlayerY / SomeNumber);
for each level of parallax, have a different SomeNumber variable to change individual level speeds.


5
Graphics / SetRotation() Sometimes causing Sprite to not draw.
« on: June 01, 2015, 03:29:34 am »
Ok, second time:

this line of code:
Sprite.setRotation((atan2(ty - y, tx - x)) * 180 / pi + 90);
is used by the player class, and npc class, and their projectile bullets, to point at a specific point (tx, ty).

While the same code is being used in different places, the npc sprite, and the npc's projectile's sprites fail to draw. also, the npcs and the player use the same projectile class.

The most confusing part of this issue is that it works fine in the player class, but casues the sprites to break in the npc class. when the line is removed, the sprites do draw (but obviously don't rotate).

Not really sure what code you'd like to see, as the only other sprite manipulation in all cases is
Sprite.setPosition(x, y);
Win.window.draw(Sprite);

tx/ty vars:
(click to show/hide)

initial x/y vars
(click to show/hide)

move x/y vars
(click to show/hide)



Pages: [1]