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

Pages: [1] 2
1
General / Best way to create a game updater.
« on: August 28, 2016, 11:21:53 am »
This is mainly for an mmorpg style game (one that will probably never be complete like many of my personal projects :P)

I'm wondering what the best way to create an in-game update is.
Should i use FTP, or HTTP, or just create my own file transfer server and send the data manually?
Without spending money, http seems like the best method, i could just shove my updates onto a random free website from 000webhost and have the client download updates from that link if the server says that an update is required.

What would be the best option? What is most commonly used for this?

2
Graphics / Re: Mixed styles in one sf::Text object
« on: July 10, 2016, 01:08:21 pm »
As you said, you could draw each character separately with their own style (or split it into substrings with different styles)
However, if the text doesn't constantly change, then i'd suggest drawing the text to a RenderTexture, and then drawing the RenderTexture to the window.

3
General discussions / Re: Looking for a dev partner
« on: July 08, 2016, 04:25:09 pm »
I'm also slightly interested, But as the same time, i may not even be able to help that much.
Currently going to uni in Australia for game programming, and a lot of my time is dedicated to that, but i could probably input something here and there.
I'm no expert either, i only have about 2 years SFML/ C++ practice, and am used to previously using Gamemaker (which i'm trying to replace with C++)

As Hyden said though, Github may be a good idea, considering how many people are interested, and collaboration is a skill i need to get better at.

4
Network / Re: Second messagelost on certain computer.
« on: March 03, 2016, 10:47:07 pm »
Alright, think i found it, when sending a packet you have to wait for the socket to be ready to send again, so ill just use a hacky while loop until the socket is ready again before sending the second one.

Will make a queue in the future to process packets.

5
Network / Second messagelost on certain computer.
« on: March 03, 2016, 10:35:54 pm »
Basically, i send two messages straight after each other, and the second is not received by the client at all, here is my code:

Quote
         for (int i = 0; i < WC.clients.size(); i++)
         {
            if (WC.clients == nullptr || i == foundEmpty)
               continue;
            mapData.clear();
            mapData << (sf::Int32)2 << (sf::Int32)0 << (sf::Int32)i;
            WC.clients[foundEmpty]->send(mapData);
            cout << "(2) Sending " << i << " to " << foundEmpty << endl;
         }   
foundempty is the ID of the client's socket in the array, this code is on the server and successfully prints:
Quote
(2) Sending 0 to 2
(2) Sending 1 to 2

On the client there is this code to receive the data:

Quote
         sf::Packet recievedata;
         if(WC.socket.receive(recievedata) == sf::Socket::Done)
         {
            sf::Int32 messageType;
            recievedata >> messageType;
            switch (messageType)
            {
            case 2://Other Player
               sf::Int32 oPlayerMessage;
               recievedata >> oPlayerMessage;
               {
                  switch (oPlayerMessage)
                  {
                  case 0://create new player
                  {
                     sf::Int32 OPID;
                     recievedata >> OPID;
                     cout << "Player created: " << OPID << endl;
                     if(WC.otherPlayers[OPID] == nullptr)
                        WC.otherPlayers[OPID] = new otherPlayer(WC);
                     break;
                  }
                  }
               }
            }
         }

This prints:

Quote
Player created: 0

The sockets are non-blocking, and this code runs on a loop.
If i decide to send the information later, it works, it just does not work as it is in this code, i could probably do a workaround by sending all the players in one packet, but i need to know why it's broken before continuing...

Sorry for the messy code, ill try to create a minimal code example later.

Also, these packets successfully get received on my computer at home, but on this computer it does not.
Only one packet gets received.

6
Audio / Playing sound at precise timing.
« on: November 21, 2015, 06:22:44 am »
Because of my game's framerate, playing a sound at a certain time will only trigger at a frame after that time, so i cannot get it precise. I've had the idea of adding some empty sound to the start of the sound (50ms or so) and playing it 50ms before and taking away the offset when it actually gets called to play, however, i have many small sounds which would cause my program to have an even greater RAM usage (even if it's only 50ms, it may still end up being a lot when i have 731 small sounds)
So my question is, can i make a sound play at a precise time independent of the game's framerate? (Possibly seeking negatively before the sound?)

7
I've always used "renderTexture.display();" after recreating an entire renderTexture, should i also be using it after only slightly altering a rendertexture? For example, if there is already lots of information in a renderTexture, and i decide to draw one extra pixel on it, should i then call display?
I've never encountered problems when not using display in this case, AS OF YET.

8
General / Re: Opening and closing fraps causes program to crash.
« on: June 14, 2015, 03:23:02 am »
Yeah that's fine, it's easy enough to make my own FPS counter.
Thanks for the response, i wont bother reporting it to fraps, it's not that big of an issue :P

9
General / Opening and closing fraps causes program to crash.
« on: June 14, 2015, 02:48:19 am »
I just realized this when i was trying to find a cause of a crash in my program, but when i use fraps to measure the FPS of my program, after i close fraps, my program crashes a few seconds later.
I tested this on more than one of my games that have no relation, so it shouldn't be a bug with my game.
Considering fraps doesn't crash any other game, could this possibly be a bug in SFML?

10
Thankyou,
The obvious and simple way of doing it! - Sorry for the simple question, i just didn't have time to play around and find out how.

11
I've been testing my game on computers with little video memory, and because my game uses a lot of rendertextures, after a while an error shows up "failed to share opengl context" - or something like that
So, is there a way for me to see if there is enough video memory available to create one, or is there a way to see if it correctly got created after creating it, and then disabling the error message that gets shown when it is created.

Sorry if this question has already been answered elsewhere, i didn't quite know how to word it.

12
SFML projects / Ayy lmao
« on: April 09, 2015, 01:06:32 pm »
Some zombie game. *First SFML game*

13
Graphics / Re: [SOLVED] Copying texture from rendertexture.
« on: February 23, 2015, 11:55:11 am »
Thankyou binary, that actually made a lot of sense!

Anyways, after learning that it creates memory issues, i've begun reusing rendertextures.
This question is for a similar reason, i don't want to have to create any more render textures than i already have, so i'd rather just use one and copy it into textures where i can.

I don't think my GPU was contributing to the majority of the leak anyways, so that should be fine.

14
Graphics / Re: [SOLVED] Copying texture from rendertexture.
« on: February 23, 2015, 11:37:24 am »
Not certain, i just gave up on trying to get around it.
http://en.sfml-dev.org/forums/index.php?topic=17235.0
eXpl0it3r says in that article that "It has most likely to do with the infamous context leak or a leak in the GPU driver."

I havn't tested it since getting new GPU drivers, so that may just be the problem.

Basically i created a loop which created and destroyed render textures, and the ram kept going up.

15
Graphics / Re: Copying texture from rendertexture.
« on: February 23, 2015, 10:36:53 am »
Thankyou! sorry for the unorganised question haha.
I'm using it to create a 'map' of solids in my game. the textures only need to be created at the load time, or in edit mode when a solid is placed, so speed isn't a problem. I'm using it to remove blood/ effects from the top of solid objects.

I cannot use lots of rendertextures due to them not deallocating their memory after being destroyed.
I am already using lots of rendertextures for another system, but they can be reused.

This is solved.

Pages: [1] 2
anything