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 - Santa-Claus

Pages: [1]
1
SFML website / Re: Tutorial board
« on: April 05, 2014, 05:27:20 pm »
Ok tnx,
I thought all tutorials on wiki were the official but apparently there are a lot of tutorials on there :o

2
SFML website / Tutorial board
« on: April 05, 2014, 05:22:19 pm »
Hello everyone,

Maybe an idea to improve the forum is to add a board for tutorials,
this would be where everyone can share tutorials for all things related to sfml and all supported languages by sfml.

Kind Regards,
Santa-Claus,

3
General / Re: cycled class
« on: April 05, 2014, 04:05:53 pm »
You better first learn the basics from a book then ask every little question....

4
General / Re: Need some help with structs or classes.
« on: April 05, 2014, 03:26:56 pm »
And i am actually reading a book atm :p
Just don't find how to do this
I'm actually not looking for enums :(
That's more for item rarity or tile attributes or anything like that.

I think i'm gonna use classes :)

Code: [Select]
class Inventory {
public:
Inventory();
struct slot
{
int ItemNumber;
int Amount;
};
private:
int Max_Slots;
};

€dit: found it.

King Regards,
Santa-Claus,

5
General / [SOLVED]Need some help with structs or classes.
« on: April 05, 2014, 02:42:13 pm »
Hello everyone,

So i have a question how would i be able to do something like the following in C++ (using structs or classes) (Code example is visual basic)
Code: [Select]
Private Type BankRec
    Item(1 To MAX_BANK) As PlayerInvRec
End Type
I'm pretty new to C++ and used to use visual basic..... but in visual basic you don't have all the same possibilities and especially not in VB6.0

Kind Regards,
Santa-Claus,

6
Graphics / Re: Little problem with textures
« on: April 04, 2014, 10:01:25 am »
This was really a fail of me i used a shape and wanted to make a sprite sorry for that :/

7
Graphics / [SOLVED]Little problem with textures
« on: April 04, 2014, 08:43:57 am »
Hello everyone,

So i'm having a problem with the texture loading in my application.
The error:
Code: [Select]
None, just not loading also no error that it's not finding the file or anything
Some codes:
in Game.cpp
Code: [Select]
, mTexture()
Code: [Select]
mPlayer.setTexture(mTexture);in void Game::render() (in Game.cpp)
Code: [Select]
mWindow.draw(mPlayer);In Game.hpp
Code: [Select]
sf::Texture mTexture;
Kind Regards,
Santa-Claus,

8
General / Re: Problem with file loading.
« on: April 02, 2014, 07:38:52 pm »
Thank you very much
Also thank you for the fast reply
It's Fixed :)

9
General / Problem with file loading.
« on: April 02, 2014, 07:31:06 pm »
Hello everyone,

So i'm having a problem with loading files, it's loading perfectly outside my IDE (Visual Studio 2013) but inside the IDE it can't find the files, is there any configuration in the project settings or anywhere where i have to change something to make it work?

Kind Regards,
Santa-Claus,

10
DotNet / Re: Help needed with music
« on: March 24, 2014, 11:45:35 am »
Ok fixed it.

11
DotNet / [SOLVED]Help needed with music
« on: March 23, 2014, 04:12:52 pm »
Hello everyone,

So i'm having problems with my music it's playing and stuff but my window kinda starts bugging.
If i set the music in my gameloop then the window isn't usable anymore.
I haven't tested to draw anything on it so that could still be possible but the close open and minimize button no longer work and when i overlay another program over it, then i can no longer open it.

static void Main()
        {
            // initialize the form
            System.Windows.Forms.Form form = new System.Windows.Forms.Form(); // create our form
            form.Text = Variables.General.GameName;
            System.Drawing.Icon ico = new System.Drawing.Icon("icon.ico");
            form.Icon = ico;
            form.Size = new System.Drawing.Size(Variables.GameScreen.ScreenWidth, Variables.GameScreen.ScreenHeight); // set form size to 600 width & 600 height
            form.Show(); // show our form
            DrawingSurface rendersurface = new DrawingSurface(); // our control for SFML to draw on
            rendersurface.Size = new System.Drawing.Size(Variables.GameScreen.ScreenWidth, Variables.GameScreen.ScreenHeight); // set our SFML surface control size to be 500 width & 500 height
            form.Controls.Add(rendersurface); // add the SFML surface control to our form
            rendersurface.Location = new System.Drawing.Point(0, 0); // center our control on the form

            // initialize sfml
            SFML.Graphics.RenderWindow renderwindow = new SFML.Graphics.RenderWindow(rendersurface.Handle); // creates our SFML RenderWindow on our surface control

            // drawing loop
            while (form.Visible) // loop while the window is open
            {
                System.Windows.Forms.Application.DoEvents(); // handle form events
                renderwindow.DispatchEvents(); // handle SFML events - NOTE this is still required when SFML is hosted in another window
                renderwindow.Clear(SFML.Graphics.Color.Black); // clear our SFML RenderWindow
                renderwindow.Display(); // display what SFML has drawn to the screen
                GameLoop.Running();
            }
        }
 

/// <summary>
        /// Play a music
        /// </summary>
        public static void PlayMusic(string path, bool loop)
        {
            // Load an ogg music file
            Music music = new Music(path);

            // Play it
            music.Volume = 50;
            music.Play();
            music.Loop = loop;

            // Loop while the music is playing
            while (music.Status == SoundStatus.Playing)
            {
                // Leave some CPU time for other processes
                Thread.Sleep(100);
            }
        }
 

class GameLoop
    {  
        public static void Running()
        {
            SoundEngine.PlayMusic("DataFiles/Music/Main.wav", true);
        }
    }
 

Kind regards santa,

Pages: [1]
anything