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.


Topics - JeZ-l-Lee

Pages: 1 [2] 3
16
General / Joystick not working - using SFML 1.4+SVN Win32...
« on: February 15, 2009, 04:18:49 pm »
Joystick not working - using SFML 1.4+SVN Win32...

Hi,

I am not getting anything for the X/Y axis
on my joystick using SFML 1.4+SVN on Windows.

I have a unique setup:
- Windows Vista SP1 32bit
- Super Dual Box Pro (dual PlayStation2 joystick USB adapter)
(have one PS2 joystick plugged into port "Player 1")

Here is my test source:

Code: [Select]
const sf::Input& InputTest = visuals->App.GetInput();

sprintf(visuals->VariableText, "%f", InputTest.GetJoystickAxis(0, sf::Joy::AxisX));
visuals->DrawTextOnScreenBuffer(visuals->VariableText, 22, sf::Color(255, 255, 255, 255), sf::Color(0, 0, 0, 255), true, 5, 525, TextLeft);

sprintf(visuals->VariableText, "%f", InputTest.GetJoystickAxis(0, sf::Joy::AxisY));
visuals->DrawTextOnScreenBuffer(visuals->VariableText, 22, sf::Color(255, 255, 255, 255), sf::Color(0, 0, 0, 255), true, 5, 550, TextLeft);


I tried different things, but nothing seems to be working on my side.
Any help you can offer me would be appreciated...

17
General / App.Close();//Does it free memory used by resources?
« on: February 13, 2009, 06:02:20 pm »
App.Close();//Does it free memory used by resources?

Just want to be clear as to what "App.Close();" does.

Thanks....

18
General / Minimum Windows OS & Hardware Requirements ???
« on: February 12, 2009, 08:25:12 pm »
Minimum Windows OS & Hardware Requirements ???


Hi,

What are the minimum system requirements under Windows for SFML?
- Minimum Windows OS version
(95, 98, 2000, Me, XP, 2003, Vista, 2008, 7)
- Minimum graphics card and GPU memory

Also, what is the minimum OpenGL version supported by SFML?

Thanks!


My team and I make this game using SFML now:

19
General / What to set sf::Randomizer::SetSeed( ) too ??
« on: February 12, 2009, 01:04:17 am »
What to set sf::Randomizer::SetSeed( ) too ??

Need answer that is cross-platform...

Thanks...

20
Graphics / class MyPicture - Copying Image to Sprite...
« on: February 10, 2009, 04:35:25 pm »
class MyPicture - Copying Image to Sprite...


Hi,

I am trying to use this class to copy an Image to a Sprite:

Quote
You have to be particularly careful when manipulating images. A sf::Image instance is a resource which is slow to load, heavy to copy and uses a lot of memory.

A lot of people, especially beginners, will just put an instance of sf::Image wherever they have an instance of sf::Sprite, because it may seem the simplest way to draw something. The fact is that it's generally a bad idea. The most obvious problem is when copying such objects (just putting them into an array generates copies) : the sprites will most likely appear white. The reason is that a sprite only points to an external image it doesn't own one, so when the image is copied the sprite has to be updated to point to the new copy of the image. This is quite easy to handle, you just have to define a copy constructor for such classes holding (or deriving from) a sprite and an image :


Code: [Select]
class MyPicture
{
public :

    // This is the copy constructor
    MyPicture(const MyPicture& Copy) : Image(Copy.Image), Sprite(Copy.Sprite)
    {
        // This is the trick : we setup the sprite
        // to use our image, instead of the one of Copy
        Sprite.SetImage(Image);
    }

    // ... a lot of useful functions ...

private :

    sf::Image  Image;
    sf::Sprite Sprite;
};


I am a beginner C++ coder and do not know how to properly call:
MyPicture(const MyPicture& Copy) : Image(Copy.Image), Sprite(Copy.Sprite)

Any help you can offer me would be appreciated!
Thanks...

21
Graphics / .SetCenter(float CenterX, float CenterY);
« on: February 10, 2009, 03:24:55 am »
.SetCenter(float CenterX, float CenterY);


The above does not work on a previously scaled Sprite.

What am i doing wrong here?

It works on a Sprite of scale 1 only...

Trying to make my game and have wasted hours on this already...

22
General / How do I build SFML from SVN on Win-Code::Blocks
« on: February 07, 2009, 10:23:53 pm »
How do I build SFML from SVN on Win-Code::Blocks


Hi,

I'm using 1.4 version now, but there is a serious bug where the program wont start if a USB joystick is plugged in.

I successfully downloaded the SVN branch of SFML.

How do I build it now?

Using Microsoft Vista OS and Code::Blocks is the C++ IDE.

Any help you can offer would be appreciated...

23
Graphics / How do I center a Sprite while rotating and scaling Sprite ?
« on: February 07, 2009, 09:39:32 am »
How do I center a Sprite while rotating and scaling Sprite ?

Code: [Select]
void Visuals::DisplaySpriteOntoScreenBuffer(uint16_t spriteIndex, float spriteX, float spriteY, bool centerX, sf::Color color, float scaleX, float scaleY, float rotation)
{
Sprites[spriteIndex].SetScale(scaleX, scaleX);
Sprites[spriteIndex].SetRotation(rotation);
Sprites[spriteIndex].SetCenter( (Sprites[spriteIndex].GetSize().x / 2), (Sprites[spriteIndex].GetSize().y / 2) );

if (centerX == true)
{
Sprites[spriteIndex].SetX(320); // Screen size is 640x640...
}
else  Sprites[spriteIndex].SetX(spriteX);

Sprites[spriteIndex].SetY(spriteY);

Sprites[spriteIndex].SetColor(color);

App.Draw(Sprites[spriteIndex]);
}

Above code compiles and links with zero warnings and zero errors...

Any ideas on how to make this work?
(code is from a C++ Class called "Visuals")

24
Graphics / Is There A Function To Draw A Single Pixel ??
« on: February 06, 2009, 07:01:51 pm »
Is There A Function To Draw A Single Pixel ??

Hi,

I am making a 2-d space shooter game now.

I would like to have moving stars in the background.
How would I draw a single pixel at (x,y) in a certain color to screen buffer?

Thanks

You can track the progress of this game at this URL:
http://www.silentheroproductions.com/LastDefense100PerceT.htm

25
General / Having trouble setting icon...App.SetIcon(32, 32, Icon);
« on: February 06, 2009, 05:27:01 pm »
Having trouble setting icon...App.SetIcon(32, 32, Icon);

Code: [Select]
sf::Image Icon;
if (!Icon.LoadFromFile("data/graphics/Icon.bmp"))
return EXIT_FAILURE;

App.SetIcon(32, 32, Icon);


What I do wrong?
Thanks...

26
General / Release Date Of S.F.M.L. Version 1.5
« on: February 06, 2009, 05:05:01 pm »
Release Date Of S.F.M.L. Version 1.5


Hi,

I have the I.Q. of a tomato.
I do not understand how to build SFML from SVN.

When will SFML version 1.5 be released?

Thanks...

27
Audio / 1/2 Second Delay in Sound playing... Any Ideas ???
« on: February 06, 2009, 04:00:59 am »
1/2 Second Delay in Sound playing... Any Ideas ???

Platform is Windows Vista 32bit

Code: [Select]
// Load a sound effect to play...
sf::SoundBuffer Buffer;
if (!Buffer.LoadFromFile("data/sound/Click.wav"))
return EXIT_FAILURE;

sf::Sound Sound;
Sound.SetBuffer(Buffer); // Buffer is a sf::SoundBuffer

//...

Sound.Play();


Here is the sound effect file:
http://silentheroproductions.com/files/Click.wav

28
LastDefense 100%™
Open Source 2d Space Shooter Game Using SFML
[UPDATED_08-19-2009]

--------------------------------------------------------------------------
I could use some help with testing this on various platforms!
Email me at SLNTHERO@aol.com if interested in helping.

--------------------------------------------------------------------------

DIRECT URL TO WINDOWS OS BETA:
http://www.silentheroproductions.com/files/LD100_Setup.exe
(PC Windows XP/2003/Vista/2008/7)
--------------------------------------------------------------------------

DIRECT URL TO SOURCE AND DATA:
http://www.silentheroproductions.com/files/lastdefense-linux.zip
(Builds and runs on Windows XP / Vista / 7 and ubuntu Linux - maybe OS X too)
NOTE: There was some problems on Linux - I fixed that now so should be ok now, sorry
--------------------------------------------------------------------------

Hi, I am the Autistic game designer/programmer JeZ+Lee...

My small independent video game design studio:
Silent Hero Productions(R)
www.SilentHeroProductions.com
Has completed a new game called:
LastDefense 100%™
(2-d Space Shooter)
Platform: Windows, Linux, Mac OS X
Technology: S.F.M.L. (1.5)
License: Open Source Freeware
Status: Beta version 0.99 100%

Click below for official web page URL:
http://www.silentheroproductions.com/LastDefense100PercenT.htm








29
General / JeZ+Lee is Autistic game designer, sorry...
« on: February 05, 2009, 12:39:30 am »
JeZ+Lee is Autistic game designer, sorry...

My last project using SDL game engine library:
TetriCrisis 100% Version 5.9 Remix
for PC Windows computers

http://www.silentheroproductions.com/TetriCrisis100PercenT.htm

I can make a pretty good game, but only with help from others like you!

I am a game designer with some basic C++ programming skills

Again, sorry for my stupidity - I am disabled and am just trying to make a new game for people to play and enjoy!!!

30
General / Trying to center horizontally a String on screen...
« on: February 04, 2009, 08:34:15 pm »
Trying to center horizontally a String...

Here is the code:
Code: [Select]
void Visuals::DrawTextOnScreenBuffer(char text[256], float size, sf::Color textColor, sf::Color textOutlineColor, float screenX, float screenY, uint16_t xJustification)
{
sf::String textToDisplay(text, Arial, size);

if (xJustification == TextLeft)
{
//do nothing..
}
else if (xJustification == TextCenter)
{
screenX = ( 320 - (textToDisplay.GetCenter / 2) ); //<-ERROR
|

for (float outlineY = screenY - 3; outlineY < screenY + 3; outlineY++)
for (float outlineX = screenX - 3; outlineX < screenX + 3; outlineX++)
{
textToDisplay.SetX(outlineX);
textToDisplay.SetY(outlineY);
textToDisplay.SetColor(textOutlineColor);
App.Draw(textToDisplay);
}

textToDisplay.SetX(screenX);
textToDisplay.SetY(screenY);
textToDisplay.SetColor(textColor);
App.Draw(textToDisplay);
}


Does not compile - see ERROR
Please help, thanks

Pages: 1 [2] 3