# AliceLiddell

Member Since 16 May 2012
Offline Last Active Oct 25 2012 11:11 PM

### In Topic: Power consumption

20 October 2012 - 01:08 PM

fireside, on 11 October 2012 - 09:40 PM, said:

So, I got a kill-a-watt today. I was at Menards and it was on sale for 15 dollars. My Box uses about 100 watts most of the time, so everyone was pretty close. I think the monitor uses 40 but I'll have to check that out. I'll be able to monitor my average use this way also. Doesn't sound like I can save a whole lot with a laptop. I have to wait for my electric bill because I don't even know what the kilowatt hour rate is yet. Anyway, I got a fun new toy to play with that wasn't too expensive.

### In Topic: C++ && SFML Collision / Scrolling & questions

20 October 2012 - 12:57 PM

Thanks to your wonderful Idea of looking on Google I found a library of collision detection functions.

http://www.sfml-dev....ision_detection

I think now I can move on to doing what your saying, but I want to organize those conditions better and fully take advantage of OOP and all of the benefits, realizing how powerful a simple line of code is and how powerful it can be to keep syntax very clean I think I should add a ObjectManager to the game. I want to make my objects right the first time and I might write out tests and organize my code on a design document. I am not sure though I did notice there are multiple methods and it can look really messy in places like an event handler, can I make a event handler in a class file and then use it to contain conditions and then call the library in my main program? Is that over complicating things, I really am learning a lot at once and the only reason I think I get bogged down is because I want to organize my code and keep making it evolve slowly.

### In Topic: Consoles Are a Hobby Business?

19 October 2012 - 07:40 PM

Stainless, on 16 October 2012 - 02:27 PM, said:

Has anyone seen the spec for the new xbox yet?

Their was a briefing doc knocking around the office, but it seems to have disapeared

I read this http://www.redmondpi...phics-and-more/ and was pretty happy because I lean on that side for buying hardware.

### In Topic: C++ && SFML Collision / Scrolling & questions

18 October 2012 - 01:30 PM

Oh I see

#include <SFML/Audio.hpp>
#include <SFML/Graphics.hpp>
const int SCREEN_HEIGHT = 600;
const int SCREEN_WIDTH = 480;
const int SCREEN_BPP = 32;
int main()
{
sf::RenderWindow App(sf::VideoMode(SCREEN_HEIGHT, SCREEN_WIDTH, SCREEN_BPP), "Engine");
sf::Image BackgroundImage;
return EXIT_FAILURE;
sf::Sprite Background(BackgroundImage);
sf::Image Image;
return EXIT_FAILURE;
sf::Sprite Sprite(Image);
sf::Vector2f StartPos(100, 200);
sf::Vector2f Center(1000, 1000);
sf::Vector2f HalfSize(400, 300);
sf::View View(Center, HalfSize);
Sprite.SetCenter(32, 32);
Sprite.SetPosition(StartPos);
while (App.IsOpened())
{
sf::Event Event;
while (App.GetEvent(Event))
{
if (Event.Type == sf::Event::Closed)
App.Close();
if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
App.Close();
if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::F11))
App.Create(sf::VideoMode(800, 600, 32), "SFML Window", sf::Style::Fullscreen);
if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::F12))
App.Create(sf::VideoMode(SCREEN_HEIGHT, SCREEN_WIDTH, SCREEN_BPP), "SFML Window");
}
float ElapsedTime = App.GetFrameTime();
float Offset = 200.f * App.GetFrameTime();
if (App.GetInput().IsKeyDown(sf::Key::Left)) Sprite.Move(-100 * ElapsedTime, 0);
if (App.GetInput().IsKeyDown(sf::Key::Right)) Sprite.Move( 100 * ElapsedTime, 0);
if (App.GetInput().IsKeyDown(sf::Key::Up))    Sprite.Move(0, -100 * ElapsedTime);
if (App.GetInput().IsKeyDown(sf::Key::Down))  Sprite.Move(0,  100 * ElapsedTime);
App.Clear(sf::Color(207, 194, 149));
App.Draw(Background);
App.Draw(Sprite);
App.SetView(App.GetDefaultView());
App.Display();
}
return EXIT_SUCCESS;
}


here is the code its a good thing to note I am a beginner some research I've done and your reply has lead me to believe that I should really concentrate on some more OOP concepts and that I can't spend all day researching. I really thought I would be done after almost a year and a half of studying C++ but I guess it's a language that will be good to know for the future.