• Content count

  • Joined

  • Last visited

Community Reputation

477 Neutral

About Josheir

  • Rank

Personal Information

  • Interests
  1. SFML How are Symbols Loaded?

    Well I am using someone else's library and dll (SFML's,) so I don't know if this applies to me. I did look for evidence for what you said and located the following pdbs that were created by the IDE upon my build. They are : textbox.pdb and vc141.db. These are for my textbox project and they seem to already be in the correct debug library with the executable and the dlls. When I put the pdb called sfml-graphics-d.lib into this directory there is a change in the sf:text's 'readout in the IDE when debugging.' No more pesky "symbols haven't been loaded," However there is still no readable display of the length or actual text. The dll is numbered 2 and the pdb I am using is apparently for the first dll. So, is there a solution?, I have had to display to the screen in a separate rendering window to see the values and debug things. I have found no specific pdbs/downloads for the library I am mentioning. Sincerely and thankfully, Josheir
  2. SFML How are Symbols Loaded?

    I am getting the message : <information not available, no symbols loaded for sfml-graphics-d-2.dll> when hovering over the sf::Text object name for Visual C++ using Visual Studio (SFML). I am wondering how do I load the symbols so I can view the text object's text for example? Thank you, Josheir
  3. Fix Your Timestep

    Just understood what you meant when I changed the ticks per second to 10.f on your sample! Thank you so much, Josheir
  4. Fix Your Timestep

    Well it's interesting I think. Both programs (mine and your sample) work smoothly. I'm interested in why (more feedback from you.) By running on the draw side you mean that their code for SFML drawing already uses interpolation? Thanks also for those great tips and the excellent code sample. Have a super Labor Day weekend, Josheir
  5. Fix Your Timestep

    From what I understand VSYNC is about double buffering and it is on by default with SFML. Here is the address for the project: The asteroids and bullets were smooth. The Ship graphic had some very slight variation with it's motion. This is just a simple game, but changing things around I think I now have an acceptable experience. I tried changing the ticks per second to 50.f and it was also working well. Look forward to hearing from you, Josheir
  6. Fix Your Timestep

    Well I decided to start with Rutin's advice to start with for now. I created a fixed step with interpolation. I benefited from the structure of the non sleep usage because there is no longer a slight variation in speed with the ship. However after all the work when I tried the game with the ship uninterpolated I saw no difference in the now acquired smoothness. The ship is just as smooth now using interpolation as not interpolated! I don't know how to feel about this because I spent a while and achieved the desired effect, but it is not because of the interpolation. I'm wondering if I should leave the interpolation in the program. As far as Kylotan's advice I suppose I could now start reading up on Lerp and using Alpha with a variable timestep, but I doubt it's necessary with the movement now looking okay? The Lerp is another way to interpolate and each vector is an x and y position? Why are they called in and out? The problem was the sleep really, so perhaps I've done what I need to do with your help. Or maybe I need to use the Lerp to complete the project more polished in your opinion? What I did was put the input and the changed the values of the x and y in the input/logic half and in the second half I checked for collisions, applied the interpolation, and drew and displayed. The first screen has about 14 images including the bullets and there all moving fine now. I still haven't learned how this works too which I think is important enough to know. How should I learn what these two formulas and the Lerp are actually doing? They're not terribly difficult and I have taken some college mathematics so how should I go about this? I suppose I start by googling interpolation. Any help would be greatly appreciated! I didn't expect the program to work right without the interpolation so I'm still pretty surprised, Josheir
  7. Fix Your Timestep

    Okay I'm having problems. This is what I have : interpolation = float(((float)(GetTickCount() - firstTime) + SKIP_TICKS - (nextTime)) / (SKIP_TICKS)); shipObject.GetShipImage().setPosition(sf::Vector2f ((shipObject.prevx + ((shipObject.GetX() - shipObject.prevx)* interpolation)), (shipObject.prevy + ((shipObject.GetY() - shipObject.prevy) * interpolation)))); I am having trouble understanding what nextTime is. I tried different solutions and I can't understand the relationship of the first interpolation statement with the second statement that uses the interpolation variable. I can't really understand how an interpolation variable can work if it is seemingly always just increases or decreases with an extremely small value or just gets bigger and bigger. That's why I think nextTime is not being correctly used by me. To work it seems necessary that the interpolation formula should be able to give values that aren't just always increasing or always decreasing. So I don't understand how to get this working, is NextTime always increasing by SKIP_TICKS each loop, and does it start with the same value as (GetTickCount() - firstTime) plus the first iteration of SKIP_TICKS? And what is the range of the interpolation variable? I can't really seem to get it working hopefully it's "nextTime" If it's not could you help me too please? Thank you all, Josheir Secondly, where is the sleep_Time condition located as compares to the rest of the code use by Rutin's preference?
  8. Fix Your Timestep

    I am trying to get the time stepping working consistently in an asteroids project. The application runs fairly smoothly but when really looked at there are some pretty slight variances in motion. I have looked at and I tried to write something similar to the first link but did not really notice a difference. Here is the first article: const int FRAMES_PER_SECOND = 25; const int SKIP_TICKS = 1000 / FRAMES_PER_SECOND; DWORD next_game_tick = GetTickCount(); // GetTickCount() returns the current number of milliseconds // that have elapsed since the system was started int sleep_time = 0; bool game_is_running = true; while( game_is_running ) { update_game(); display_game(); next_game_tick += SKIP_TICKS; sleep_time = next_game_tick - GetTickCount(); if( sleep_time >= 0 ) { Sleep( sleep_time ); } else { // we are running behind! } } This article said there would be no problems on computer's that are fast enough, and this does not seem to be true. Perhaps the slight variations are as good as it is going to get? Here is the second article: double t = 0.0; double dt = 0.01; double currentTime = hires_time_in_seconds(); double accumulator = 0.0; State previous; State current; while ( !quit ) { double newTime = time(); double frameTime = newTime - currentTime; if ( frameTime > 0.25 ) frameTime = 0.25; currentTime = newTime; accumulator += frameTime; while ( accumulator >= dt ) { previousState = currentState; integrate( currentState, t, dt ); t += dt; accumulator -= dt; } const double alpha = accumulator / dt; State state = currentState * alpha + previousState * ( 1.0 - alpha ); render( state ); } As I understand it this program takes whats left over in the accumulator and blends it with an interpolation. I have read that this is a pretty famous article. I am wondering about the variables previousState and currentState. I assume the passed in variable to integrate is a reference to hold the value for next time? And in the final line before the render, the 2 states that are being multiplied by the 2 alphas are what, maybe my x and y? The variable Previous is previousState and current is currentState? Will this be even any better though as my understanding is I would need a previous and current x and y for every object and there is a function call for each draw. I would also have to run the while over and over again and and than the two lines below it over and over again. These two procedures in themselves would seem to slow the game down more than what it is now. I could really use some help, please. Thank you, Josheir
  9. Well instead of not doing anything at all, changing the code even at the end of the project (which I'm not saying by any means is better than along the way,) is making mental connections with the actual code by: working on it, seeing it, doing it, remembering it. It is definitely better than nothing at all other than "next time." People tend to remember what they work on more than just wishing towards it with a future promise. Of course it is also important that we change are behaviors, but this is not yet an option in this case. What we're talking about is doing something valuable enough with our time over doing nothing and deciding that we will do the changes next time. Over sanitized, well I don't think there is a penalty for making code better. If necessary, it could be explained. Josheir
  10. I think changing the code if even a sweep is also practical learning. This applies more to a different "sweeping change," being consistent with capitalization for different variable types and names. Josheir
  11. Well I'm polishing up this project so that it may be presentable if needs be (at an interview perhaps.) One of the criticisms was the spacing seemed to be random in the functions. I thought why not just make it all the same. Is it suggested that I do this all manually instead? Thanks again, Josheir
  12. Also, I noticed that the .cpp files have one extra line space before the last brace when the function has no return (void return type.) Once again, is this the standard and how is it changed to none? Thank you very much. Josheir
  13. I just removed all the white vertical white space for my C++ Visual Studio 2017 project using : ^.$\n What is the recommended standard for the spacing between functions. Is it suggested that a line break be placed after each of the functions' closing brace? If so, is there a convenient method or do I just go through all the code and press enter after each function? Anything else I need to know about line spacing? I don't mean to be petty, I'm just finishing up this project, Thank you, Josheir
  14. GitHub Public Repo Password Protection

    Well I went for a walk and was thinking maybe I should try a new local repo to understand this password entering problem. So upon doing so I encountered "Sign Out" under Team Explorer - Home - Projects - Manage Connections. This seems to have done the trick, Visual Studio is now asking for my Username/Email and Password when Connecting. That's all it was, should be problem solved I think. You all agree? Thank you, Josheir
  15. GitHub Public Repo Password Protection

    By "either way" and these two paragraphs do you mean that know matter how its working my repo is protected by a password or a SSH key? That is a different computer can not access my repo without my password no matter how my software is working? I checked with the remote command and I looked at the config file and they displayed the url for fetch and push. I looked at the SSH link and deleted the unused SSH and there was no effect. I clicked on the links for Oauth and one link said: no Oauth applications, and the other link asked if i would like to generate a personal token. According to Matias one of three options is happening, so I assume since I'm not using an SSH key and I'm not being asked for the password that the password is being stored in a working manner on my harddrive, right? I think I'm just looking for general security, that is protection from other computers changing my own source code on the GitHub server. I think this will be secure enough. Thanks for your help, I really want to get going on this project but I want to be sure that my code won't be modified. Josheir