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

Pages: 1 ... 3 4 [5] 6
61
SFML wiki / Re: sfeMovie project [v1.0 RC1 available]
« on: May 03, 2012, 06:43:41 pm »
If I understood correctly, you want to display a looping animation that has an alpha channel, but no audio? As for exact pixel coordinates, I think any player is ok, this shouldn't be a problem.

well, alpha is not strictly needed as I said, but yes... video .. . or at least a sequence of sprites that play like a video with no sound is what I am looking for.

But for what you want, I think you can find simpler solutions :
- adapt a GIF player
- make or use an existing animation player : basically, they load several image files and display them sequentially, or load one sprite sheet and display a different subrect of the image for each frame. You can find sample codes or even projects about this available on the SFML forum.

thank you I will look into these .. much appreciated.. I'll find a way to use your thing though.. maybe a logo tumble at the start on application load or something :)

62
General / Re: SFML and video?
« on: May 03, 2012, 09:16:28 am »
SFML doesn't support videos natively, but you can have a look at this project.

thanks I'll check it out.. though with out looping video implemented I do not think i can use this :( It is still on the todo list... Any other libraries you might no of that can do these kind of things? Maybe I could run alongside SFML in the same way you may use openGL if you like?

I'm using SFML to make a small 2D project and was wondering what options there are for playing videos at exact pixel coordinates. So say your game window is 1280x720 and you have a few videos one is say 100x100 pixels to make your still image background look like the fountain is running... stuff like that

63
SFML wiki / Re: sfeMovie project [v1.0 RC1 available]
« on: May 03, 2012, 09:14:06 am »
dose this have the abilities to use masks, either as a black and white video that plays at the same time acting as a mask or a embed channel of some kind. I know quicklime can embed a alpha channel.. I am sure there are other formates as well that can.

I'm using SFML to make a small 2D project and was wondering what options there are for playing videos at exact pixel coordinates. So say your game window is 1280x720 and you have a few videos one is say 100x100 pixels to make your still image background look like the fountain is running... stuff like that.

All (heh I say this like it would be nothing) would be to be able to loop seamlessly and just play from an exact pixel location.. either have an alpha channel or just overlay ontop of it a 2d bitmap masking out the parts you do not want.. that might be easier as you wouldn't need a video alpha but could get near the same results in most cases (unless you wanted something to move behind teh video.. scene design could make this not needed i guess.

64
General / SFML and video?
« on: May 03, 2012, 08:41:13 am »
Dose SFML support video at all? Alpha mats on videos to mask areas stuff like that?

65
SFML projects / Re: Tiny Bomber - a game for Ludum Dare #23
« on: May 01, 2012, 12:23:23 am »
very cool stuff. I enjoyed this game a lot. I found it very fun.. in a "throw away" kind of way.. but i guess that is how casual games are aren't they? All in all I am impressed. . I have been hanging out in the SFML forums for only a short time and seen a lot of impressive demos and code snip its.. but this is the first practical sfml game I have seen that is not only playable but feels like a complete project. I think you should be really proud man.. gratz.. I have forward this thread to all myt mates that might be interested.. so you should know your game is getting played by a lot of people right now. .(well at least 10 :)

66
General / Re: General Game Programming Advice
« on: May 01, 2012, 12:17:39 am »
Write Games, Not Engines.

If you wish to develop for Android, it uses Java (or to be PC a derivative language very similar to Java in every way but as it doesn't provide the entire Java library it is definitely not Java at all except for being it in nearly every way).
http://developer.android.com/guide/index.html

The iOS (iPhone, iPad, iPod Touch) uses Objective-C.

The Windows Phone uses Silverlight (So can be written using almost any .NET language), and for games it's recommended you use XNA which means you also have the potential to support Xbox and PC.

You can compile code from other languages for the Android and iOS, but you need to create the bindings. For iOS create Objective-C bindings. For Android you use the NDK to make Java bindings. For Silverlight, whilst you can mix C#, VB, F# and so-on you can't use C++/CLI from what I know. You can still mix it with XNA but that limits you to just targeting the PC.

There are tool sets and "languages" created which you can actually compile to Android and iOS, and some even have Windows Phone and even HTML5 compilation as well.

SFML uses OpenGL and so the actual library won't travel over to any of these since even the ones that use OpenGL (iOS and Android) use the Embedded Systems version. So if you really wish to make something for Android, you have questions like if you want to limit yourself to just Android or all mobiles or android and pc or...

SFML, java2d, OpenGL ES, DirectX, Allegro, the graphical parts XNA...they are all at their core rendering APIs. None of them teach you anything about game development the others will not. It's making games that teaches you game development ^^

If just Android, stick to Java. The NDK is a pain in the arse to use and usually not worth it.

(Damnit I nerd sniped myself with that link to the android page and you posted before me xD)

I know this is an old topic.. but I thought I would necro it rather than start a new one...

My question is as SFML is not (for now at least) compatible with these modern platforms.. namely iOS for iPhone and iPad and Android and that windows one I know nothing about.. what would people recommend. Is there a universal sfml type thing I can look to with out heading int oa cross platform engine like Unity or Shiva or w/e?

I am curious what more serious coders think about developing for all these diffrent platforms.. I mean it is a lot more than just PC and Mac and Linux now....

67
SFML projects / Re: Global Nuclear War - Assessment 2 (04/212)
« on: April 24, 2012, 12:14:23 am »
yes, I realize that it was kinda like using a F1 to drive to the shops using SFML in a console app, but as I said I am only a beginner and I haven't made anything but console apps so far in the course of working though the amazon book.

I plan to use GFX next time though.. assuming I can get it to work. I am currently working though the "game from scratch"

68
Well... it is assessment time at UNI and here is my new game!! Woot-a-loot-a-lot!!!

This is a Pac-Man Clone called NOM!.... hope you guys like it.. as before this is a windows binary but I will eventually make a Mac and Linux version as I have time.. I am in the middle of assessments at the moment so not much time unfortunately.

I'm pretty happy with this one there are some small problems still and it isn't very memory efficient and lacks some polish but as a learning project I think it came out pretty well in the few weeks we had to work on it.

Big thanks again to the various people who hang in IRC and are foolish enough to speak tor me!

As with all our assignments we are required to make a "Rolling Demo" so here it is.. though They always look kinda lame to me..



Nom! V1.1 (Windows)

Source @ BitBucket - (Warning a fucking mess)

=====================================================================

Ok I'm back... well I nvr left.. big thanks to the forum members as well as though foolish enough to respond when I spoke in IRC. I couldn't have done this with out you all.

This is my 2nd ever program I have ever written and I think it came out really well considering. This is a assessment to hand in for marks, and I have 2 other assessments for other subjects due and just have to call it quits here bugs and all.

Still check it out and any comments would be welcome.  I used Thor Animation for all the animations btw.

ArkBreaker (windows), (linux)


This should be cross platform and I plan to build a Unix (ubuntu) and a Mac version when I get time after my mid term assessments are all done.

Anyway.. bit thanks to those that helped and I'll see you for Assessment 3... witch I already know what it will be... a Pac-Mac clone!

See ya!!

Oh part of the Assignment was to make a rolling demo.. so here it is!



=====================================================================

Hi there.

I have been learning programming recently. Been at it about 6 weeks now slowly working though some book from amazon, some PDFs I was given, google, http://cplusplus.com, http://en.cppreference.com/w/ and ##C++-Basic@freenode.

I tell you this so you understand I am a beginner, as in a real beginner I hadn't programmed a line of code in my life until a little over a month ago. I feel I have done pretty well..

There is still a occasional bug that crashes it but I feel that fixing this one bug is not a major concern,  for me as I'm not trying to produce anything just learn. The project got a little out of hand for me and the once neat code block design degenerated into a real mess. I feel that if i trashed it all and started again I would do a lot better, including range checks on my vector accesses.. witch is the error here, and going though and putting them all in is not teaching me anything but a exercise.

I feel I will be better served by trying to incorporate my lessons into my new project rather than "fix" up this one.

Still I had a lot of fun and SFML once I got it kinda working was a real nice way to add some spice to the game. I intend to keep using it for my next project witch will be a similar simple type of thing but this time I will use 2D gfx powered by SFML!

--== Download == --
http://www.mediafire.com/download.php?bopbkhrxknipte0 (PC ONLY)

If you get a DLL error you may need to install
Microsoft Visual C++ 2010 Redistributable Package (x86)

Or
Microsoft Visual C++ 2010 Redistributable Package (x64)


Again, thanks for the help of those on this forum and I'll chat to you all again soon!

--aNewHobby

69
Audio / Re: Sound Class help please
« on: April 19, 2012, 03:45:55 pm »
SetBuffer

sfxERROR.SetBuffer(Buffer);

Thanks guys!

70
Audio / Re: Sound Class help please
« on: April 19, 2012, 03:37:30 pm »
Define the variable as member of the the class and it should work.

Isn't that what I am doing in the 1st example...

#ifndef SFX_H
#define SFX_H

#include <SFML/Audio.hpp>
#include "GeneralHeaders.h"

class sfx{
        sf::SoundBuffer Buffer;
public:
        sf::Sound sfxERROR;
        sf::Sound sxfHIT;
        sfx();
        void sError();
};

#endif

#include "sfx.h"
using namespace std;
using namespace sf;

sfx::sfx(){
/*
        if (!Buffer.LoadFromFile("Resource/Sound/error.ogg"))
        {
                cout << "File not Found - Press enter to Continue..." << endl;
                cin.ignore(10000, '\n');
        }
        sfxERROR.ResetBuffer();*/

}

void sfx::sError()
{
        if (!Buffer.LoadFromFile("Resource/Sound/error.ogg"))
        {
                cout << "File not Found - Press enter to Continue..." << endl;
                cin.ignore(10000, '\n');
        }

        // Display sound informations
        std::cout << "error.ogg :" << std::endl;
        std::cout << " " << Buffer.GetDuration()      << " sec"           << std::endl;
        std::cout << " " << Buffer.GetSampleRate()    << " samples / sec" << std::endl;
        std::cout << " " << Buffer.GetChannelsCount() << " channels"      << std::endl;

        sfxERROR.GetBuffer(); //????
        sfxERROR.Play();
}

but I can not work out how to do the Sound thing.. like the buffer test thing works.. as it shows all the info from the buffer... I just can not work out how to put it into the variable?
I have tried

sfxERRROR.getbuffer();
sfxERRROR.getbuffer(Buffer);

Sound sfxERROR(Buffer) doesn't work as it is declared in the class....

Any ideas?


71
Audio / Re: Sound Class help please
« on: April 19, 2012, 10:50:29 am »
also tried this

#include "sfx.h"
using namespace std;
using namespace sf;

sfx::sfx(){}

void sfx::sError()
{
        SoundBuffer Buffer;
        if (!Buffer.LoadFromFile("Resource/Sound/error.ogg"))
        {
                cout << "File not Found - Press enter to Continue..." << endl;
                cin.ignore(10000, '\n');
        }

        // Display sound informations
        std::cout << "error.ogg :" << std::endl;
        std::cout << " " << Buffer.GetDuration()      << " sec"           << std::endl;
        std::cout << " " << Buffer.GetSampleRate()    << " samples / sec" << std::endl;
        std::cout << " " << Buffer.GetChannelsCount() << " channels"      << std::endl;

        sf::Sound sfxERROR(Buffer);
        sfxERROR.Play();
}

void sfx::sHit()
{
        SoundBuffer Buffer2;
        if (!Buffer2.LoadFromFile("Resource/Sound/hit.ogg"))
        {
                cout << "File not Found - Press enter to Continue..." << endl;
                cin.ignore(10000, '\n');
        }

        // Display sound informations
        std::cout << "hit.ogg :" << std::endl;
        std::cout << " " << Buffer2.GetDuration()      << " sec"           << std::endl;
        std::cout << " " << Buffer2.GetSampleRate()    << " samples / sec" << std::endl;
        std::cout << " " << Buffer2.GetChannelsCount() << " channels"      << std::endl;

        sf::Sound sxfHIT(Buffer2);
        sxfHIT.Play();
}
 

If i just put the code in main they play..

72
Audio / Sound Class help please
« on: April 19, 2012, 10:38:35 am »
Hi, I am a new at programming.. I hope you can help such simple questions :) Oh well we all gotta start somewhere.

I know this isn't working.. and IU have tried many other thigns. this code is ment to explain what I want to do with it or how I think it should work...

#ifndef SFX_H
#define SFX_H

#include <SFML/Audio.hpp>
#include "GeneralHeaders.h"

class sfx{
        sf::Sound sfxERROR;
        sf::Sound sxfHIT;
        sf::SoundBuffer Buffer;
public:
        sfx();
        void sError();
        void sHit();
};

#endif
 


#include "sfx.h"
using namespace std;
using namespace sf;

sfx::sfx(){
        if (!Buffer.LoadFromFile("Resource/Sound/error.ogg"))
        {
                cout << "File not Found - Press enter to Continue..." << endl;
                cin.ignore(10000, '\n');
        }
        sfxERROR.GetBuffer(Buffer);

        if (!Buffer.LoadFromFile("Resource/Sound/hit.ogg.ogg"))
        {
                cout << "File not Found - Press enter to Continue..." << endl;
                cin.ignore(10000, '\n');
        }
        sfxHIT.GetBuffer(Buffer);


}

void sfx::sError()
{
        sfxERROR.Play();
}

void sfx::sHit()
{
        sxfHIT.Play();
}
 

int main(){

sfx SoundTest;

SountTest.sError();
SoundTest.sHit();

cin.ignore(10000, '\n');
}
 

Thanks in advance... I would also like ot be able to call this object global some how so I can call a soudn from anywhere in my progrema....

The idea is to have a class, and the constructor load into a variable all the sounds I need, and then have a simple way to play them from anywhere...

Am i completely about his wrong.. suggestions would help..

basically I have a game it is pretty simple and just want to add spots to play sounds..

73
Audio / Re: Strange Music Behaviour (using demo code)
« on: April 14, 2012, 09:31:02 am »
oh right.. .  :-\

I feel sily now.. yeah of course. .I just moved "sf::Music Music;" into the class definitions and it now works..

class MySounds{
        sf::Music Music;
public:
        MySounds();
        void music();
};

74
Audio / Strange Music Behaviour (using demo code)
« on: April 14, 2012, 09:18:01 am »
Hi there,

I have been playing around and found a strange problem when i tried to use the Music.Play();  in a practical situation.. after much confusion I found a strange problem and it happens even in he  demo code in the tutorial section .. so I guess I am just not using it correctly?

I recorded the problem here do you can have a look
http://screencast.com/t/SLYFFtSfke

Basically this is the  exact code form the tutorial... I have jus tremoved somne of it.. but I am not sure why this would make a difference...

Here is my

MySounds.cpp - http://ideone.com/36yr1
MySounds.h - http://ideone.com/3HZOI

I call the class in main as "MySounds Sound;"

The plan is to add the audio to this class and use it to play things and stuff. I addedthe music to the constructor so it start as I declare the object I'll also add a few effect sounds that will always be live.

Anyway.. am i doing this all wrong? Why woudl i need a cin.get after the Music.Play() to make the sound come out?

75
Audio / Re: Play 2 sounds?
« on: April 14, 2012, 03:14:46 am »
ok, thanks for your help, I know I am noobish. I have only started learning programming... I appreciate your patience with such a low level user.

Pages: 1 ... 3 4 [5] 6
anything