Noob learns to code in 3 months
Re: Noob learns to code in 3 months
Some more cool settings for the particles
https://streamable.com/gng23
Second game project is starting next week. I really like our idea, hope it will turn out good.
We'll need quite a bit of unrealistic physics. Wrote a quick and dirty test for parts of it today just to get a sense if it's doable. I think it is. Note that the game will look nothing like this once it's done lol
https://streamable.com/lcmo8
We'll also try to make use of some physics engine before resorting to writing all the physics ourselves
https://streamable.com/gng23
Second game project is starting next week. I really like our idea, hope it will turn out good.
We'll need quite a bit of unrealistic physics. Wrote a quick and dirty test for parts of it today just to get a sense if it's doable. I think it is. Note that the game will look nothing like this once it's done lol
https://streamable.com/lcmo8
We'll also try to make use of some physics engine before resorting to writing all the physics ourselves
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Noob learns to code in 3 months
Well, for the benchmarking, I was going to explain, but instead I'll just share.
Code: Select all
//BenchTimer.h
#pragma once
#include <chrono>
#include <limits>
#include <string>
using clock_type = std::chrono::high_resolution_clock;
using time_point = std::chrono::time_point<clock_type>;
class BenchTimer
{
public:
BenchTimer( std::string Filename );
void Start();
void Stop();
void Update();
std::string MinTime()const;
std::string MaxTime()const;
std::string AvgTime()const;
private:
void Reset();
void Log();
private:
static constexpr size_t reset_interval = 300;
time_point start, stop;
float minTime = std::numeric_limits<float>::max();
float maxTime = std::numeric_limits<float>::min();
float avgTime = 0.f;
float time_count = 0.f;
size_t counter = 0;
std::string logfilename;
};
Code: Select all
//BenchTimer.cpp
#include "BenchTimer.h"
#include <algorithm>
#include <fstream>
BenchTimer::BenchTimer( std::string Filename )
:
logfilename( std::move( Filename ) )
{
}
void BenchTimer::Start()
{
start = clock_type::now();
}
void BenchTimer::Stop()
{
stop = clock_type::now();
}
void BenchTimer::Update()
{
const auto dur = std::chrono::duration<float>( stop - start ).count();
time_count += dur;
++counter;
minTime = std::min( minTime, dur );
maxTime = std::max( maxTime, dur );
if( counter >= reset_interval )
{
avgTime = time_count / static_cast< float >( reset_interval );
Log();
Reset();
}
}
std::string BenchTimer::MinTime()const
{
return std::to_string( minTime );
}
std::string BenchTimer::MaxTime()const
{
return std::to_string( maxTime );
}
std::string BenchTimer::AvgTime()const
{
return std::to_string( avgTime );
}
void BenchTimer::Reset()
{
counter = 0;
time_count = 0.f;
minTime = std::numeric_limits<float>::max();
maxTime = std::numeric_limits<float>::min();
}
void BenchTimer::Log()
{
//
std::ofstream file( logfilename );
file << logfilename << '\n'
<< "Min frame time: " << MinTime() << '\n'
<< "Max frame time: " << MaxTime() << '\n'
<< "Avg frame time: " << AvgTime() << std::endl;
}
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com
-
- Posts: 115
- Joined: April 27th, 2012, 11:49 pm
Re: Noob learns to code in 3 months
Nice benchmarking class. I'll be using this myself. Thanks!
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Noob learns to code in 3 months
Thanks, it's quite simplistic and is loosely based on chili's FrameTimer class from the old tutorials.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com
Re: Noob learns to code in 3 months
Presentation of our second game project went reallly well. It seemed well received by the audience and we won a prize for pitch of the year.
Working on this project for 9 weeks has been an absolute blast and the group has been awesome.
It's highly likely we'll continue development over the summer
Working on this project for 9 weeks has been an absolute blast and the group has been awesome.
It's highly likely we'll continue development over the summer
- krautersuppe
- Posts: 91
- Joined: September 14th, 2015, 10:58 pm
- Location: Istanbul
Re: Noob learns to code in 3 months
I'm curious.
Is language of instruction english over there? And that of communication among students?
Is language of instruction english over there? And that of communication among students?
DSU
Discord: dsu1, GitHub: https://github.com/DSpUz
Discord: dsu1, GitHub: https://github.com/DSpUz
Re: Noob learns to code in 3 months
It's swedish and english. The teachers will do lectures in english if we ask them to. there's a few english speaking students in our class. In my group there's one english speaker so we do all our meetings etc in english.
But most of the time we speak swedish to each other unless there's an english speaker present in the conversation
But most of the time we speak swedish to each other unless there's an english speaker present in the conversation
Re: Noob learns to code in 3 months
The game looks really nice, and it's a nice touch with the tandem physics mechanic in there. Looks like a fun project to work on.
Chili
Re: Noob learns to code in 3 months
Thanks chili
Yeah it's been fun. Porting it to ps4 is no fun tho
Yeah it's been fun. Porting it to ps4 is no fun tho