Skip to content

Commit

Permalink
made fullscreen for video recording
Browse files Browse the repository at this point in the history
  • Loading branch information
thatgamesguy committed Jul 18, 2018
1 parent 95ce84f commit 1d9ab5e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
Original file line number Original file line Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "C_Velocity.hpp" #include "C_Velocity.hpp"
#include "Object.hpp" #include "Object.hpp"


C_Velocity::C_Velocity(Object* owner) : Component(owner), velocity(0.f, 0.f), maxVelocity(80.f, 80.f){} C_Velocity::C_Velocity(Object* owner) : Component(owner), velocity(0.f, 0.f), maxVelocity(200.f, 200.f){}




void C_Velocity::Update(float deltaTime) void C_Velocity::Update(float deltaTime)
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


GeneticAlgorithm::GeneticAlgorithm(ObjectCollection& objects, WorkingDirectory& workingDir, ResourceAllocator<sf::Texture>& textureAllocator, Window& window) : objects(objects), workingDir(workingDir), textureAllocator(textureAllocator), window(window), maxPoolSize(40), totalFitnessScore(0.f), mutationChance(0.1f), genNumber(0), addedToGame(0) GeneticAlgorithm::GeneticAlgorithm(ObjectCollection& objects, WorkingDirectory& workingDir, ResourceAllocator<sf::Texture>& textureAllocator, Window& window) : objects(objects), workingDir(workingDir), textureAllocator(textureAllocator), window(window), maxPoolSize(40), totalFitnessScore(0.f), mutationChance(0.1f), genNumber(0), addedToGame(0)
{ {
const unsigned int numOfUFOsToSpawn = 80; const unsigned int numOfUFOsToSpawn = 200;


for (int i = 0; i < numOfUFOsToSpawn; i++) for (int i = 0; i < numOfUFOsToSpawn; i++)
{ {
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ std::vector<float> NeuralNetwork::GetOutput(const std::vector<float>& input)
netInput += layers[i].neurons[j].weights[numInputs - 1] * bias; netInput += layers[i].neurons[j].weights[numInputs - 1] * bias;


//Store result in output //Store result in output
// float sigOutput = FastSigmoid(netInput); //float sigOutput = FastSigmoid(netInput);
outputs.push_back(netInput); outputs.push_back(netInput);


weightCount = 0; weightCount = 0;
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ void SceneSplashScreen::OnCreate()


sf::Vector2u windowCentre = window.GetCentre(); sf::Vector2u windowCentre = window.GetCentre();
splashSprite.setPosition(windowCentre.x, windowCentre.y); splashSprite.setPosition(windowCentre.x, windowCentre.y);

splashSprite.setScale(1.8, 1.8);
} }
} }


Expand Down
Original file line number Original file line Diff line number Diff line change
@@ -1,9 +1,10 @@
#include "Window.hpp" #include "Window.hpp"


Window::Window(const std::string& windowName) : window(sf::VideoMode(1920, 1080), windowName, sf::Style::Titlebar) Window::Window(const std::string& windowName) : window(sf::VideoMode(1920, 1080), windowName, sf::Style::Fullscreen)
{ {
window.setVerticalSyncEnabled(true); window.setVerticalSyncEnabled(true);
window.setFramerateLimit(60); window.setFramerateLimit(60);
window.setMouseCursorVisible(false);
} }


void Window::Update() void Window::Update()
Expand Down

0 comments on commit 1d9ab5e

Please sign in to comment.