Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [Game Dev] Time linking with stopwatch  (Read 6742 times)

0 Members and 1 Guest are viewing this topic.

CssHammer

  • Newbie
  • *
  • Posts: 18
    • View Profile
[Game Dev] Time linking with stopwatch
« on: November 19, 2014, 06:19:57 pm »
I`m trying to make character moving by linking to time by this lesson: http://youtu.be/6OHMFwQK44k?t=5m11s
But I making game on c# and didn`t find the Clock class even in SFML.NET 2.1. So i decided to use Stopwatch, but it can return only Milliseconds. Comparing to Clock in c++ lesson(where microseconds returned), i devided millisonds by 1000. But the result is very different: character moves so fast that he running away of the screen. Please, take a look at the part of this video  http://youtu.be/6OHMFwQK44k?t=5m11s and help me :)

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: [Game Dev] Time linking with stopwatch
« Reply #1 on: November 19, 2014, 06:52:12 pm »
Use the latest SFML.NET revision on GitHub, it has Clock and Time classes.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

CssHammer

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: [Game Dev] Time linking with stopwatch
« Reply #2 on: November 19, 2014, 07:12:37 pm »
And how to install it?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
AW: [Game Dev] Time linking with stopwatch
« Reply #3 on: November 19, 2014, 08:08:22 pm »
Build from source.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: [Game Dev] Time linking with stopwatch
« Reply #4 on: November 19, 2014, 08:13:31 pm »
There is a Visual Studio 2008 solution which you should be able to use (update to a newer VS version if necessary). The Visual C# projects in their respective subfolders in src.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

CssHammer

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: [Game Dev] Time linking with stopwatch
« Reply #5 on: November 20, 2014, 07:48:07 pm »
I downloaded this pack, updated, find this "src" folder, and what i have to do with this source files? Include it to my project?

CssHammer

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: [Game Dev] Time linking with stopwatch
« Reply #6 on: November 21, 2014, 08:31:56 pm »
Plz help the noob ;D

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: [Game Dev] Time linking with stopwatch
« Reply #7 on: November 21, 2014, 08:37:57 pm »
The noob could at least try to spell properly. It's "please", not "plz" - what are you? 14?
As for what to do with the source files; have you considered compiling them? There are tutorials explaining this in great detail - read them.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: [Game Dev] Time linking with stopwatch
« Reply #8 on: November 21, 2014, 08:45:48 pm »
There is not particularly much you can do with a Visual Studio solution (.sln), a VC# project (.csproj) and source files (.cs)... As Jesper Juhl said, you need to compile them. I'm not sure, but I assume the source files are already added to the Visual Studio project, so it might be possible that all you need to do is to hit the "Build" button.

Instead of waiting a whole day for an answer and pushing the topic, you could at least try the basic approaches... a large part of programming is own research and experimenting ;)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

CssHammer

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: [Game Dev] Time linking with stopwatch
« Reply #9 on: November 22, 2014, 08:34:09 am »
 :-[ So have I need to build vc2008 project or what? Furthermore it can`t to be built because it is just library of classes. Please, don`t get angry, I just so newbie in this, can you write me "To Do list" to use it in my project? :-[

CssHammer

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: [Game Dev] Time linking with stopwatch
« Reply #10 on: November 22, 2014, 06:56:23 pm »
Okay, i built this, i found this .dlls in "lib" but there are not all of dlls that supposed to be here because of errors during building: Sorry for russian, but i hope you can understand what`s the problem :-\ (Can`t find OpenTK, can`t find namespace OpenTK etc.)
« Last Edit: November 22, 2014, 07:00:07 pm by CssHammer »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: [Game Dev] Time linking with stopwatch
« Reply #11 on: November 22, 2014, 08:33:11 pm »
OpenTK are only for the examples, these errors don't prevent SFML to be built. And to fix them, you just have to install OpenTK anyway.
Laurent Gomila - SFML developer