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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Noegddgeon

Pages: 1 2 3 [4]
46
Graphics / Graphics/Window Scaling
« on: May 03, 2010, 08:24:19 pm »
Quote from: "Ashenwraith"
Why not just scale your sprites in-game like many emulators do?

If you want it to look old all you have to do is set smoothing to false.


The idea seems fairly simple, but what about for movement and other actions that must be scaled, as well?

Quote from: "nulloid"
Make an sf::View, and set it's width and height 192 and 160. And sf::View will scale the graphic in it to the size of the window.


That idea seems like it might work for what I'm aiming for. I'll try and implement something with that and I'll get back to this forum to let y'all know if it works.

Thanks to both of you for your help. :]

47
Graphics / Graphics/Window Scaling
« on: May 03, 2010, 01:50:20 pm »
Hello, everybody :]

I have a question. I'd like to make little games with SFML as I start off which look like Atari and NES games of old. The only problem is that resolutions these days are much higher than those ancient resolutions, and as such it's hard to get the games to look as if they're from that era with so many pixels to operate on.

Is there a way I can work with the correct-resolutioned buffer behind the scenes (Atari, I believe, is 192 x 160) and then scale the final display image to something four times that size that I can play on my computer? I understand that if I play with 192 x 160 unscaled, it'll be tiny and virtually unplayable. There was some way this could be done with SDL, I believe, but I don't remember how it was done and how it would translate over to SFML.

I hope my question doesn't make me sound mentally incompetent, but I'm just beginning to get into games programming and there is much, much, much that I do not know and would like to learn from you kind people. :] Thank you very much for your time.

Colton

48
Graphics / Multiple Key Inputs
« on: May 01, 2010, 10:31:16 pm »
Quote from: "4ian"
Use sf::Input instead of sf::Event for real-time event handling. ( Check the tutorial for more information : http://www.sfml-dev.org/tutorials/1.6/window-events.php )


Thank you very much, 4lan. It's no wonder now :p

49
Graphics / Multiple Key Inputs
« on: May 01, 2010, 09:35:50 pm »
Hello, everybody :]

I'm trying to get used to 2D game programming using the SFML library. My latest little tester program is just a skeleton at this point to enable one to shoot a little dot in four directions, depending on the last direction they moved in was.

I've noticed that when I move, I can only move in one direction at a time and it will also lock up sometimes if I press more than one key. I would like to know how I can change my code (or what I can add to it) to enable me to move in more than one direction and also to be able to move and fire my bullet at the same time. Below is the code for the part of my program that accepts input for the player structure:

Code: [Select]

void getInput(int &x, int &y, bool &shot, int &timer, int &direc)
{
   App.GetEvent(Event);
   
   if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Up))
   {
      y--;
 if (!shot)
    direc = 1;
   }
   if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Right))
   {
      x++;
 if (!shot)
    direc = 2;
   }
   if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Left))
   {
      x--;
 if (!shot)
    direc = 4;
   }
   if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Down))
   {
      y++;
 if (!shot)
    direc = 3;
   }
   
   if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Space))
   {
      if (timer <= 0)
 {
         shot = true;
timer = 500;
 }
   }
}


I would greatly appreciate any help in figuring out how to fix this. Thank you very much.

Colton

50
Window / 2 mouse event questions
« on: October 26, 2009, 02:40:25 am »
I tested Ceylo's code on my Macbook, with my Trackpad's scrolling speed set to 8 out of 10. The result was that I got events triggered fairly easily; here's sample output of me moving my finger slowly down the pad from the top to the middle (about 5 seconds):

Code: [Select]

wheel move : -1
wheel move : -1
wheel move : -1
wheel move : -1


Here's the same length of the pad, but done more quickly (about 2 seconds):

Code: [Select]

wheel move : -7
wheel move : -6
wheel move : -8
wheel move : -8
wheel move : -8
wheel move : -6
wheel move : -7
wheel move : -7
wheel move : -8


And lastly, here's me using the program and taking about a quarter of a second to slide my finger down the entire thing:

Code: [Select]

wheel move : -36
wheel move : -29
wheel move : -18
wheel move : -15
wheel move : -39
wheel move : -17
wheel move : -28


Going fast enough at times, I can get the program to spit out deltas higher than 100.

Hope this helps at all. Haven't tried it with a mouse with a scrolling wheel.

Colton[/code]

51
General / SFML from Command Line Mac OS X
« on: October 02, 2009, 09:42:52 am »
Hello, everybody. I tried getting SFML to work on my Macbook with OS 10.5 running, however it would not work with XCode for reasons that Ceylo explained had to be related to me not installing the code properly. I was wondering if anyone could explain to me how I could compile a .cpp file using SFML from the Command Line. I know how to compile straight C++ code like this:

c++ sfmltest1.cpp -o sfmltest

I tried making a program with Allegro and there was something I had to add at the end after that to link it with the library (forgot what it was, though). Anyways, I would appreciate help in this very much. :]

Colton

52
General / Mac OS X 10.5 Executable Problem
« on: September 30, 2009, 09:31:00 am »
Ceylo,

If sending you an email wouldn't be too much trouble, I would like to do so. I don't have any account with a file hosting server of any sort, though I should probably get one.

53
General / Mac OS X 10.5 Executable Problem
« on: September 29, 2009, 08:59:06 am »
Hello, everybody. I just discovered SFML the other day and decided to set it up on my Macbook, which is running OS X 10.5. I am using XCode 3 to create the program, and I followed all of the instructions on the tutorials page as far as setting up frameworks and the like. I tried to build the example in the threads tutorial on the website, the first one shown, as a Command Line Utility. It says that it built successfully; however, once I try to Build and Go, it says that there's no executable found at path /Users/coltonogden/testapp/build/Release/testapp. I did a check on it, and I found that there was indeed no folder called Release where it should have been located.

Does anyone know how I can fix this problem, or whether there's something I haven't done or have done incorrectly? I would greatly appreciate the help. :]

Colton

Pages: 1 2 3 [4]
anything