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 - rahul8590

Pages: 1 [2]
16
Graphics / Scrolling Text..
« on: March 17, 2010, 04:40:54 pm »
Voila ... ! It worked ..

But The point is , i want it to scroll it continuously , then wat do i do .
I tried putting that text scroll inside  App.GetEvent

Code: [Select]

Text.Move( 0 ,App.GetFrameTime() * SCROLL_SPEED) ;


and i observed the scroll was in compliance to my mouse action , i mean if my mouse was moving then only the text was scrolling down .

17
Graphics / Scrolling Text..
« on: March 16, 2010, 08:54:37 pm »
Well i have been using SFML for past 3-4 days and have completely fallen in love with it , its awesome .. :)

Well i have uploaded an image and also , text (arial) .
Now , i want the text to be scrolling , how do i do that .. ?

I am attaching the code in here :
Code: [Select]

#include <SFML/Graphics.hpp>
#include<iostream>

 int main()
 {
     // Create the main window
     sf::RenderWindow App(sf::VideoMode(703, 493), "Rahul.Reincarnated ");

     // Load a sprite to display
     sf::Image Image;
     if (!Image.LoadFromFile("image1.jpg"))
         return EXIT_FAILURE;
     sf::Sprite Sprite(Image);

     // Create a graphical string to display
     sf::Font Arial;
     if (!Arial.LoadFromFile("arial.ttf"))
         return EXIT_FAILURE;
     sf::String Text("\t \t Welcome to OpenGL Project \n \t \t \t \t \t \t \t \t \t \t \t By Rahul ", Arial, 50);

    while (App.IsOpened())
     {
         // Process events
         sf::Event Event;
         while (App.GetEvent(Event))
         {
             // Close window : exit
             if (Event.Type == sf::Event::Closed)
                 App.Close();

            if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
                App.Close();

         }

         // Clear screen
         App.Clear();

         // Draw the sprite
         App.Draw(Sprite);

         // Draw the string
         App.Draw(Text);

         // Update the window
         App.Display();
     }

    std::cout<<" thank you for using the program ";
    getchar();

     return EXIT_SUCCESS;
 }



Now , if i want the welcome text to be entering into the window (scroll) is there any way to do that.. ?

18
General / Installing sfml with code block
« on: March 16, 2010, 08:59:12 am »
No , i mean i have used the key events of opengl not sfml . Will that not cause any problem .

19
General / Installing sfml with code block
« on: March 16, 2010, 08:40:59 am »
well .. regarding audio , as of now i am not much concerned about it . But i have a few queries regarding opengl .
The sample program ran and it was great :D  But the problem is , i have also developed a small game in it and it has few window key events , will those still be functional if i run it under sfml , since the sfml has its own way of handling it , i was thinking there should not be any problem.

20
SFML projects / CosmoScroll - space shooter game
« on: March 16, 2010, 08:11:42 am »
Its really a nice game .. i played a lot .
Even i am working on building something similar to it , not as flamboyant like yours , but something analogous on a smaller scale.

I was wondering , if your could provide ur valuable suggestions on how to go about game programming .

Since , i am acquainted with OpenGL , and i have build a normal ball game which i call it as SAve The Ball . i wanted to add some music at the background , i have no idea on how do i go about doing it . i would be glad if you could help me out.

21
General / Installing sfml with code block
« on: March 15, 2010, 07:21:35 pm »
Got partial success .

I finally installed the latest ones  and the basic program  is running , thats is the clock one .
But when i am trying to execute another program which uses AUdio.hpp

where i am passsing test.mp3 as the input , i am getting some reference errors .

Quote

Compiling: C:\Documents and Settings\rahul\Desktop\audio-music.cpp
Linking console executable: C:\Documents and Settings\rahul\Desktop\audio-music.exe
C:\Documents and Settings\rahul\Desktop\audio-music.o:audio-music.cpp:(.text+0x185): undefined reference to `sf::Music::Music(unsigned int)'
C:\Documents and Settings\rahul\Desktop\audio-music.o:audio-music.cpp:(.text+0x1dc): undefined reference to `sf::Music::OpenFromFile(std::string const&)'
C:\Documents and Settings\rahul\Desktop\audio-music.o:audio-music.cpp:(.text+0x2ba): undefined reference to `sf::Music::~Music()'
C:\Documents and Settings\rahul\Desktop\audio-music.o:audio-music.cpp:(.text+0x302): undefined reference to `sf::Music::GetDuration() const'
C:\Documents and Settings\rahul\Desktop\audio-music.o:audio-music.cpp:(.text+0x359): undefined reference to `sf::SoundStream::GetSampleRate() const'
C:\Documents and Settings\rahul\Desktop\audio-music.o:audio-music.cpp:(.text+0x3b0): undefined reference to `sf::SoundStream::GetChannelsCount() const'
C:\Documents and Settings\rahul\Desktop\audio-music.o:audio-music.cpp:(.text+0x407): undefined reference to `sf::SoundStream::Play()'
C:\Documents and Settings\rahul\Desktop\audio-music.o:audio-music.cpp:(.text+0x440): undefined reference to `sf::SoundStream::GetStatus() const'
C:\Documents and Settings\rahul\Desktop\audio-music.o:audio-music.cpp:(.text+0x4c7): undefined reference to `sf::Music::~Music()'
C:\Documents and Settings\rahul\Desktop\audio-music.o:audio-music.cpp:(.text+0x4f4): undefined reference to `sf::Music::~Music()'
collect2: ld returned 1 exit status


22
General / Installing sfml with code block
« on: March 14, 2010, 04:36:20 pm »
Sorry , the one i previously posted isnt my Gcc version . ITs a version for a file compiler.dll
i misunderstood .
The MinGw version is 3.2
I guess thats not that pretty old.

DO i still have to upgrade .. ?

23
General / Installing sfml with code block
« on: March 14, 2010, 04:47:15 am »
The mingW version is 3.1.0  ,
Gcc version is 0.99

24
General / Installing sfml with code block
« on: March 13, 2010, 11:54:52 pm »
-------------- Build: Debug in sfml ---------------

Compiling: main.cpp
In file included from C:/Program Files/CodeBlocks/MinGW/include/SFML/System.hpp:39,
                 from H:/Graphic Program/sfml/main.cpp:1:
C:/Program Files/CodeBlocks/MinGW/include/SFML/System/Unicode.hpp:85: parse
   error before `&' token
C:/Program Files/CodeBlocks/MinGW/include/SFML/System/Unicode.hpp:97: parse
   error before `)' token
Process terminated with status 1 (0 minutes, 0 seconds)
2 errors, 0 warnings

25
General / Installing sfml with code block
« on: March 13, 2010, 10:51:26 pm »
I have installed the sfml according to the instruction given in the site .
Like i have placed the .h files in include folder and also placed the lib files in lib folder.
in ht linker settings . i have linked linked all the e3 in order .
Though i am compiling the normal program , i am getting an error saying

parse
parse

in line 85 and 97 of file Unicode.hpp

Pages: 1 [2]
anything