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

Pages: [1]
1
General / Error: Can't find the specified file?
« on: April 11, 2013, 03:08:29 am »
I opened SFML build in Visual Studio and try to run the Pong demo.

I get error: \vc2008\sfml-audio\Debug static\sfml-audio.lib'.
The system cannot find the file specified.

Am I supposed to do something like tell it where the files are?

Sorry I'm also new to VS..

2
General / C++: Advice for creating a 'screen' and 'object' system
« on: April 09, 2013, 01:37:51 pm »
Hi all, I am thinking to create a system for screens and objects.

Screens are just the pages in the application. eg. When the app loads you see the 'welcome' screen, then after that you see the 'menu' screen.

Objects are just things that store data and do stuff which you put inside your screen.

Now, I'm guessing both screens and objects will be 'classes'. The screen class will get details about its size, color, etc.

After creating the objects (which is just a blueprint), I would then 'add' the object to a particular screen. Then when the screen loads by gotoScreen(screenName) the screen would create instances of those objects and those objects would begin to do stuff.

How I might do it: I'm thinking maybe a linked-list in the screen class that stores what objects that screen will need to create. But how do I do that? Do I need to pass a pointer of the object to the linked list? And then how would the screen class then use that pointer to 'create' an instance of that object?

And then if say I wanted to 'clear' the screen after I go to the next screen (deleting all of the object-instances/data/etc being used by the previous screen - except the blueprints of course - as I may want to load that screen again), how do I do that??

Objects are also capable of 'creating' instances of objects as well as new variables that allocate memory. Those would also need to be destroyed when the screen gets cleared.

Any advice on the best way to go about this?

Thanks,
Tom.


3
General / Loading fonts to a custom surface?
« on: April 09, 2013, 12:44:33 pm »
If I make my own surface (a 2D pixel array), is it possible to draw text to that surface instead of directly to the window?

Or if I could at least get the pixel information about the 'text' then I could just place it on-top of my surface myself?

For example, if I'm using DirectX and have my own surface that gets sent to a backbuffer (to be displayed onto the screen), if I wanted to draw text on the screen I would either have to make sure SFML can draw text ontop of the backbuffer (unlikely if I had to guess since SFML is OpenGL), otherwise I was hoping SFML can read font files and text and provide the pixel info so I can place the text ontop myself.

Thanks in advance,
Tom.

4
General / C++: Two functions with same name dilema
« on: April 09, 2013, 07:24:23 am »
I want to make my own library that has functions. I'm very particular about function names, but heres the thing, some of the function names I want to use are already used in another library/file that is included in the program.

Thing is, I don't want to modify included libraries that are not mine or affect how they work (since I will need to use their version of the function too).

In a nutshell it's like this (example!):

External Library has a round() function (for rounding numbers).
My Library also has a round() function which USES the round() function from the external library (mine uses it, but works slightly differently)!

.. and then, in my main.cpp program, if I call round() I want it to know I'm referring to MY library (not the other 'External' library). And I don't want to have to refer to my functions using long/additional tags like:  myLibrary::round().

If I do use namespace tags etc, anywhere in my code, I'd rather it be for the External library functions. But remember, I don't want to edit their library or cause it to not work anymore (since I'm guessing their library (and maybe several other libraries also makes use of that functions without knowing of any changes/additions in namespaces!). Basically I don't want to screw all the other libraries up which aren't mine.

How can I overcome this??

Thanks in advance,
Tom

5
(C++ question) I need to be able make a compiled code (like a .dll?) which other programmers can use on linux, win,, mac, etc.

The compiled code would simply do calculations and spit out an answer in memory.

I need it to have certain functions that they can easily call and understand (without actually seeing the source).

Does anyone know if this is possible and how?

Thanks in advance,
Tom.

6
Is it good practice (maximum efficient) to load data from a HDD file using the standard file loading function and a for loop? Or is there a faster way to load (especially if you're going to be loading large chunks of data in sequence from the HDD)?

7
General / Will clients need anything to run my EXEs?
« on: March 29, 2013, 01:03:46 pm »
If I make a program that uses SFML is there any chance it won't run because they don't have something installed? i.e. They won't need .NET, or OpenGL, etc.?

8
General / Parallel processing?
« on: March 27, 2013, 06:26:31 am »
Does anyone know of an easy way to get the computer to do something like: 4 completely separate tasks (assuming you have 4 cores), for each core?

i.e.

core_1( *task_1() )
core_2( *task_2() )
core_3( *task_3() )
core_4( *task_4() )

I know with parallel processing there are usually problems like collisions, but what if you give the different cores completely separate tasks with separate memory that won't collide?

Sincerely,
Tom

9
Hi everyone,

I have sequences of images (BMP or PNG) on my HDD and need to 'play' them as if they were a video.

Does anyone know the fastest way to:

1) Read file data from the HDD and store contents into a pixel array
2) Display that pixel array on the screen
... so that I can get up to 60 FPS with frames that are 2000x1000 resolution?

Any ideas or advice?

Pages: [1]