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

Pages: 1 [2] 3
16
General / java
« on: October 25, 2008, 01:42:53 pm »
An OpenGL ES backend is actually Very intresting. Both the Android and the iPhone uses this technique for graphics, the iPhone uses OpenAL too (don't know what the android use).

By having these to packages, it wouldn't be too hard to make a binding for Objective-C with packages for the iPhone and Java for the Android, with a modified GL package.

17
General discussions / SFML 1.3 and OS X
« on: October 21, 2008, 10:27:05 pm »
Hey Ceylo, how's it going!?

18
General / Loading the Image in a class?
« on: October 19, 2008, 10:10:29 am »
quasius: This is just a test, i know this is a terrible method of doing it. But i haven't figured out a dynamic way to do it that isn't horrible yet.

Laurent: Ahh, it worked too!. Thanx!

19
General / Loading the Image in a class?
« on: October 18, 2008, 10:34:09 pm »
Hi!

I am trying a bit with dynamic Image loading but i can't get it to work:

Code: [Select]

#include "KillPillar.h"
#include "libs.h"

using namespace std;

class Pillar {
private:
//Pillarinfo
int number;
string name;
int layer;

//SRPITELOADING
vector<sf::Sprite> sprites;
vector<sf::Image> images;
vector<string> names;

public:

bool loadsprite (string filename, string name) {
sf::Image Image;
if (!Image.LoadFromFile(filename)) {
return 0;
}
images.push_back(Image);
sf::Sprite Sprite(Image);
sprites.push_back(Sprite);
names.push_back(name);
return 1;
}

sf::Sprite & fetchSprite (string name) {

for(int i = 0; i <= sprites.size(); i++) {
if(name == names[i]) {
  return sprites[i];
}
}
}

};


int main() {
sf::RenderWindow App(sf::VideoMode(1024, 768), "PILLAR KILLER EXTREME");
const sf::Input& Input = App.GetInput();
Pillar forsta;
if(!forsta.loadsprite("pillar.png", "start")) {
return EXIT_FAILURE;

}

while (App.IsOpened())
{

bool         LeftKeyDown     = Input.IsKeyDown(sf::Key::Left);
bool         RightKeyDown     = Input.IsKeyDown(sf::Key::Right);
bool         UpKeyDown     = Input.IsKeyDown(sf::Key::Up);
bool         DownKeyDown     = Input.IsKeyDown(sf::Key::Down);
bool EnterKeyDown = Input.IsKeyDown(sf::Key::Return);

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

if(RightKeyDown) {
forsta.fetchSprite("start").Move(2,0);
}
// Clear screen
App.Clear();

// Draw the sprite
App.Draw(forsta.fetchSprite("start"));

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

return EXIT_SUCCESS;
}


The screen turns up like this:


The proportions are right of the image but it won't show the actual picture.

I am running the SVN version of SFML, built on Mac OSX 10.5.5

20
SFML projects / Particles!
« on: October 09, 2008, 08:32:59 pm »
#include "Affectorfactory.h"
#include "Random.h"
#include "ConfigData.h"
#include "Variant.h"

Where are these?
They wasn't included in your package!

21
Feature requests / Color Palette Manipulation
« on: October 08, 2008, 05:39:56 pm »
gsauras: GLSL/Shaders is the way for you to go, achieved exact the same effect by using shaders in my project. It is a bit pain to learn, but once you got it, you will find a lot of nice uses for it!

22
Feature requests / C++ (And others too) aliases for functions
« on: October 06, 2008, 10:11:29 pm »
Epic drama?

23
General discussions / Strange problem with MouseMove event in Mac OSX
« on: October 06, 2008, 10:10:28 pm »
Hey agustin, the OSX version on the download page is an old version, if you want to try out the new (that hopefully work), get the SVN and compile it yourself!

Hopefully it will work then.

24
General discussions / SFML 1.3 and OS X
« on: September 25, 2008, 08:40:24 pm »
Hey, if malloc.h isn't used at all, won't you consider removing it from the includes?! :)

EDIT: i uploaded one of my builds.

25
General discussions / SFML 1.3 and OS X
« on: September 25, 2008, 08:36:14 pm »
OH, NICE!!!
You are doing a great work on this port!

Will try it out right now!

26
Graphics / Moving Objects
« on: September 22, 2008, 07:48:22 pm »
Read the tutorial, use the predefined functions like this to set a bool:

    bool         LeftKeyDown     = Input.IsKeyDown(sf::Key::Left);
    bool         RightKeyDown     = Input.IsKeyDown(sf::Key::Right);
    bool         UpKeyDown     = Input.IsKeyDown(sf::Key::Up);
    bool         DownKeyDown     = Input.IsKeyDown(sf::Key::Down);

Then check against the bools instead!

27
Graphics / Layering?
« on: September 22, 2008, 07:25:12 pm »
Hi, in the process of making a game and it became very clear to me that i need to use a heavy amount of layers.

Is there a function for doing this (like moving the objects in 3d space) or do i need to write my own functions like Layer1() Layer2() which them contains app draw and that?

And i wondered if there was an easy way of loading VERY EASY models into SFML (in 3D) or opengl from Blender?

28
General discussions / SFML 1.3 and OS X
« on: September 20, 2008, 02:14:47 pm »
Ah, App.Clear(); solved the problem!

29
General discussions / SFML 1.3 and OS X
« on: September 20, 2008, 02:12:40 pm »
Yeah, these are only for testing purposes. I can throw both release and build.

Anyhow, the problem you saw in my post over this is done with the Release configuration!

30
General discussions / SFML 1.3 and OS X
« on: September 20, 2008, 02:06:27 pm »
Hmm, the first test turned out not to be working. I modified the demo code and stripped it to this:

Code: [Select]
#include <SFML/Audio.hpp>
 #include <SFML/Graphics.hpp>
 #include <SFML/System.hpp>
 
 int main()
 {
     // Create the main window
     sf::RenderWindow App(sf::VideoMode(800, 600), "SFML window");
 
     // Create a graphical string to display
     sf::Font Arial;
     if (!Arial.LoadFromFile("Arial.ttf"))
         return EXIT_FAILURE;
     sf::String Text("Hello SFML", Arial, 50);
 
     // Start the game loop
     while (App.IsOpened())
     {
         // Process events
         sf::Event Event;
         while (App.GetEvent(Event))
         {
             // Close window : exit
             if (Event.Type == sf::Event::Closed)
                 App.Close();
         }
 
         // Draw the string
         App.Draw(Text);
 
         // Update the window
         App.Display();
     }
 
     return EXIT_SUCCESS;
 }


I got this:

Pages: 1 [2] 3
anything