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

Pages: [1] 2
1
Graphics / sf::RenderImage::Create extremely slow
« on: July 21, 2011, 12:04:50 pm »
Ah thankyou, that's a really neat idea. :)

Would I run into any problems with texture size limits, like 512x512 on Intel?

2
Graphics / sf::RenderImage::Create extremely slow
« on: July 16, 2011, 01:14:10 pm »
Would the SFML library have to be profiled when compiled or could the compiler manage itself.

There isn't a great deal of code in the Create() function, so it may just be unfeasible to make this any faster, the calls to the libraries SFML relies on may just be a tad slow. =[

3
Graphics / sf::RenderImage::Create extremely slow
« on: July 16, 2011, 12:46:09 pm »
I made two important mistakes, running it once with the created object included in the time.

Even so 45-90ms is still quite high. Not sure what's involved but if it could be made more efficient or maybe a Resize() function. (Assuming it could be designed to do the job in a smaller time frame). Would be extremely beneficial.

Sure this shouldn't be run every frame, but it is a real fps killer.

4
Graphics / sf::RenderImage::Create extremely slow
« on: July 15, 2011, 09:22:19 pm »
I think It's time to reincarnate this topic.

Extremely slow may be an understatement, calling create took nearly close to half a second. Doing that during runtime would be very slow. Would it not be possible to reduce this time for creating or adding a resize function to do so?

Tried this with MinGW on a quite high spec laptop, can take a few seconds on older hardware.

5
Graphics / RenderImage.Clear(...) issue
« on: July 10, 2011, 10:22:42 am »
I'm using the RenderImage class due to the surface like nature of it. Also am unsure whether this is a bug or misuse.

I create the image like so:
Code: [Select]
sf::RenderImage surface;
surface.Create(512, 512);


And believe the clear function can take:
sf::Color(255, 0, 0, 255)
sf::Color::Red
...

Red looks like a preset copy of the latter. You can see I'm testing this by making the image completely red.

Code: [Select]
surface.Clear(sf::Color(0, 255, 0, 255));
window.Draw(surface);


The result is a 512x512 black block.

Then I thought maybe it will clear the area in the view, not sure if the 2.0 documentation is outdated with this class but I tried this:

Code: [Select]
sf::View view;
view.Reset(sf::FloatRect(100, 100, 400, 200));

sf::RenderImage surface;
surface.SetView(surface);  //No function in class SetView()


Am I going about clearing the RenderImage with a specific colour?

Kris

6
General / wxWidgets and SFML2 Issues
« on: June 24, 2011, 09:04:46 am »
2.8 Strangely on another computer it worked, occasionally. Which is strange, most of the time it just opens and closes, bit unreliable.

7
General / frame based animation program
« on: June 23, 2011, 05:55:40 am »
What kind of formats would go in? .swf, .avi, .gif?

I did something similar with .gif, load them in and output a animation sheet. Might be some spriters utilities which may achieve this.

8
General / Questions about game programming
« on: June 23, 2011, 05:23:20 am »
I'm working on a similar project, quite a complex thing the design of a mmo.

By your questions you sound somewhat clueless about designing and programming a mmo. These aren't the sort of things you should be worrying about first. May be going about this the wrong way. =/

Quote
1)Character can wear various types of weapons, how can I "stick" image of for example sword into hand of character?

Paperdolling, drawing different parts of a person at certain positions. Eg, helmet, armour, legs, arms, weapon.

Quote
2)What about weather effect like snow,rain,desert storm. Should I use particle system?

What ever you find easiest, would be client sided.

Quote
3)When shaders can be useful?

When you need some effects and/or need processing power, they will be rendered with your hardware. Optimized for performance and quality.

Quote
4)What about lights and shadows in SFML?

Can do these using sources/emitters of light and obstacles. Suggest using a lighting engine or algorithm for use with cubes.

Quote
5)What about collision detection, should I only mark some terrains as "nonclickable" and other as "clickable"

Up to you, engine design, I'd say yes. But I do not see what relation clicking has to do with obstacles!?

Quote
6)How should I maintain multiple clients? I think spawning 100 threads for 100 clients is a bit of performance waist?

Client pools when your waiting on data, eg account server, receiving information. Connected clients can exist in an array, vector, list whatever suits you.

Quote
7)About optimization I think drawing only what is visible and sending data about things that are in player's field of view

I'm using tile synchronization, server sends whats in view, client shifts what has been sent and receives new portions of tile data in view.

Quote
8 )I need simply GUI system, which GUI made in SFML can You recommend and why? I need simple buttons, entryboxes for single lines of text and windows.

I'll be working on one as none of the ones made with SFML are suited or lacking for a games interface. They are generally poor to non existant functionality, creators have spent all their time recreating parts of win32 components, poor performance.

--

I think you better think of your design ground up, a small but core chunk of my engine has been design on over 35 pages of notepad. The design makes all the games content loaded externally. (Scripts, images, effects, map.. you name it) It's just an engine ;). Entirely server sided, very efficient, cross platform (thanks to SFML) and well structured.

It's taken a lot of consideration and attention, to design and refine all the various elements which make up a mmo, It's a tiresome and cumbersome task.

If you really are mad and want to go ahead with this, I suggest you design things from a engine up point of view, than a visual design point of view. Work out class designs, learn and research SFML, and other libraries functionality you will need and go from there.. If I were to loose my work, I wouldn't go back to making a mmo. It's such a full on project.

9
Graphics / Re: Tile based theory
« on: June 10, 2011, 08:36:36 am »
Why don't you just have an array of your tile data structure, the game grid could consist of say, uint_8, pertaining to the id of the tile at that position.

Resources are loaded once into memory and may occur many times. I'm using tile spanning, chopping up a large texture into many smaller tiles (40x40) and drawing in view the tiles spanning in order.

Also maintaining all your data in a single location allows easier management, you could say, change a sprite assigned to a tile on demand, each tile would be affected.

10
General / wxWidgets and SFML2 Issues
« on: June 10, 2011, 05:15:31 am »
~Bump~

The example source is definitely broken with this version, I'm trying to get this working once again.

[Edit]
Oh nvm, I'll just use QT.

11
Ohail Laurent. :oops:

Just out of curiosity, is it possible to draw textures directly from ram with opengl?

12
Oh right, thanks for clearing that up, I now see what the issue could have been.

[Possible bug]
When giving an image to the sprite constructor and then change to a smaller one. If the first image was a larger image than your video card can handle, it will crash on drawing. Seems to remember something from the constructor, maybe just size of image?

13
Currently I am unaware of any method to load an image larger than the restrictions of the video card.

It may not be suitable for compatibility with many classes or maybe even performance wise, but it would be enough to extract the resources off, into much smaller images.

Since it is generally unsafe to load an image larger than 512x512, it would be great for compatibility during the loading stage. Many old and some Intel chips crash at any higher.

It would be an extremely beneficial feature. If only to allow you to copy sections of the image.

14
General / Tutorial - Getting started - SFML and Visual Studio
« on: April 20, 2011, 05:16:47 am »
Did you remember to define SFML_STATIC?

15
General / Getting SFML 2.0 to work in Linux
« on: April 19, 2011, 07:55:42 am »
Just changed, didn't make a difference.

Although accidentally adding the path "/usr/lib" as a linker directory magically somehow made it now work. I have no idea why this is the case, as Windows doesn't seem to require it there.

And thanks for the change in naming ;D, It's good to know changes are so frequent, I assumed it wouldn't have changed in a week since I compiled the Windows version.
:oops:

Pages: [1] 2
anything