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

Pages: 1 2 [3] 4 5
31
SFML projects / Ultimate Zombie Fighters
« on: August 08, 2010, 06:10:15 am »
Quote from: "priomsrb"
Ahh. You must be using 64-bit linux am I right? There was a small bug that I just noticed from your compile output. I just fixed it and uploaded a new source package. You can get it from here. Please test it out again to see if it works.

Thanks a lot for reporting the error. I wouldn't have realised it if you didn't report your problem.
Yes I'm using 64 bit. You seem to have not completely fixed it. Another error (same):
Code: [Select]
[ 62%] Building CXX object src/CMakeFiles/uzf.dir/Scenes/Test/LevelGraph.cpp.o
/cache/home/recruit0/downloads/uzf-0.1-1-source/src/Scenes/Test/LevelGraph.cpp: In member function ‘sf::Vector2f LevelGraph::getGridPositionFromState(void*)’:
/cache/home/recruit0/downloads/uzf-0.1-1-source/src/Scenes/Test/LevelGraph.cpp:66: error: cast from ‘void*’ to ‘int’ loses precision
/cache/home/recruit0/downloads/uzf-0.1-1-source/src/Scenes/Test/LevelGraph.cpp: In member function ‘virtual float LevelGraph::LeastCostEstimate(void*, void*)’:
/cache/home/recruit0/downloads/uzf-0.1-1-source/src/Scenes/Test/LevelGraph.cpp:134: error: cast from ‘void*’ to ‘int’ loses precision
/cache/home/recruit0/downloads/uzf-0.1-1-source/src/Scenes/Test/LevelGraph.cpp:138: error: cast from ‘void*’ to ‘int’ loses precision
/cache/home/recruit0/downloads/uzf-0.1-1-source/src/Scenes/Test/LevelGraph.cpp: In member function ‘virtual void LevelGraph::PrintStateInfo(void*)’:
/cache/home/recruit0/downloads/uzf-0.1-1-source/src/Scenes/Test/LevelGraph.cpp:200: error: cast from ‘void*’ to ‘int’ loses precision
make[2]: *** [src/CMakeFiles/uzf.dir/Scenes/Test/LevelGraph.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/uzf.dir/all] Error 2
make: *** [all] Error 2

32
SFML projects / Ultimate Zombie Fighters
« on: August 03, 2010, 02:26:54 am »
Tried and failed building it on Fedora Linux.

Code: [Select]
./build.sh
-- Configuring done
-- Generating done
-- Build files have been written to: /home/recruit0/downloads/uzf-0.1-source/build
[  1%] Building CXX object src/CMakeFiles/uzf.dir/include/micropather.cpp.o
/cache/home/recruit0/downloads/uzf-0.1-source/src/include/micropather.cpp: In member function ‘unsigned int micropather::PathNodePool::Hash(void*)’:
/cache/home/recruit0/downloads/uzf-0.1-source/src/include/micropather.cpp:357: error: cast from ‘void*’ to ‘MP_UPTR’ loses precision
/cache/home/recruit0/downloads/uzf-0.1-source/src/include/micropather.cpp: In member function ‘void micropather::MicroPather::GoalReached(micropather::PathNode*, void*, void*, std::vector<void*, std::allocator<void*> >*)’:
/cache/home/recruit0/downloads/uzf-0.1-source/src/include/micropather.cpp:515: error: cast from ‘void*’ to ‘MP_UPTR’ loses precision
/cache/home/recruit0/downloads/uzf-0.1-source/src/include/micropather.cpp: In member function ‘int micropather::MicroPather::Solve(void*, void*, std::vector<void*, std::allocator<void*> >*, float*)’:
/cache/home/recruit0/downloads/uzf-0.1-source/src/include/micropather.cpp:703: error: cast from ‘micropather::PathNode*’ to ‘MP_UPTR’ loses precision
/cache/home/recruit0/downloads/uzf-0.1-source/src/include/micropather.cpp:703: error: cast from ‘micropather::PathNode*’ to ‘MP_UPTR’ loses precision
make[2]: *** [src/CMakeFiles/uzf.dir/include/micropather.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/uzf.dir/all] Error 2
make: *** [all] Error 2

33
Feature requests / Text Caret
« on: July 29, 2010, 10:04:46 pm »
I'm trying to make a text box class and the caret typically blinks... but the blinking rate is set by the OS. Not that big of a deal but would be good to use already defined settings rather than making it up.

34
Feature requests / Mutex islocked?
« on: July 26, 2010, 11:05:43 pm »
I don't think SFML should include threading support built-in. It should focus on media specifically and "outsource" threading to another library.

On second thought... I'm not sure this is feasible with respect to windows.  :? Would take more looking into.

35
General / Decoupled Engine Architecture
« on: July 26, 2010, 10:56:47 pm »
I'm developing cpGUI and I haven't had any problems encapsulating media functionality (SFML).

36
We're primarily concerned with bug fixes for the old API since we're creating a new one. What features did you add?

37
Graphics / Cover an image except for a little part
« on: July 05, 2010, 06:24:51 pm »
That's called image masking. Basically:

  • You have the "image mask", which is black and white. Say the background's black and the circles are white.
  • You have an image that you want to apply this to.
  • You put the image mask over the viewing image. Any white parts (circles) will be filled with the viewing image (i.e. the white parts become "holes").
There should be tutorials for this. I'm not sure if SFML has this capability built in.

Your method was (obviously) slow because it's doing pixel-by-pixel operations rather than blitting (i.e. throwing everything on at once). Also I think there is hardware that supports image masking operations, but I'm not that familiar with it.

38
Graphics / Arbitrarily split an image?
« on: July 02, 2010, 04:53:17 pm »
You could create a temp image that's blank, then copy whatever the sliced parts are separately to their appropriate locations. Then set the image equal to the temp. I'm not sure SFML has this capability built in though.

I ran through ideas of doing it without extra images but they're more likely to be less efficient (e.g. store (x,y) coordinates for each pixel, then you could pixel plot them) At best, you'd have to use temp images.

39
General / Drawing only part of a string?
« on: July 01, 2010, 11:20:27 pm »
Quote
All SFML windows have an OpenGL context, by the way.
I know but I thought it might have some special code inside that will break it if we start throwing OpenGL commands around without specifically making it an sf::Context (i.e. sf::RenderWindow was a cut down OpenGL context with certain limitations).

EDIT

^_^ It works. Thanks,

Code: [Select]
   glEnable( GL_SCISSOR_TEST );
    glScissor( x, window.GetHeight() - ( y + height ), width, height );
    window.Draw( draw_text );
    glDisable(GL_SCISSOR_TEST);


In case anyone else tries this, it requires linking against libGL (add -lGL to linker options).

40
General / Drawing only part of a string?
« on: July 01, 2010, 11:04:52 pm »
I'm (re)writing a GUI library (cpGUI) for SFML-1.6. Development for SFML 2 won't start until we've finished the new API and SFML2 is released.

Is this functionality (directly) supported in SFML2? If not, I request it.

Quote
In SFML 1.x, the simplest solution is to use OpenGL and its glScissor function
I'm not sure this is feasible in my situation. cpGUI is designed to overlay on top of whatever the user sets up (i.e. the user has control over the window's creation/destruction) Unless it's safe to mix OpenGL commands with a SFML 2D window (i.e. without making it specifically an OpenGL context), which I'm assuming it's not.

Just glancing at the cpGUI reference code, it looks like he manually handled each line to make it draw the whole text box correctly... Seems to work but not an optimal solution.

41
General / Drawing only part of a string?
« on: July 01, 2010, 05:04:16 am »
What would be the best way to draw only part of a string? Basically I want to draw whatever part of a string fits into a box.

I'm guessing I could use a sf::View to clip the string within a region on the screen. Anyone have example code? I'm writing from scratch atm.

EDIT

So far I have:

Code: [Select]
   String draw_text( text );
    const View clip_text( FloatRect( x, y, x + width, y + height ) );
    window.SetView( clip_text );
    window.Draw( draw_text );
    window.SetView( window.GetDefaultView() );

But this isn't the type of view I was thinking about (brief description: it "looks" like it's "scaling" the image). Simply modifying the string length doesn't cut it (the string could span multiple lines of variable width). I need to use a clipping function.

42
General / System Requirements of a Finished Game
« on: July 01, 2010, 04:20:19 am »
I think he means no 3D.

Even a 2D game can have hefty system requirements (e.g. an RTS game). It all depends on how complex the game is.

43
General discussions / Boost C++ GIL
« on: June 29, 2010, 04:39:57 am »
Have you considered using GIL for SFML2?

44
By the looks of it, I guess he's using KDE's GUI dev library attached w/ SFML.

This is interesting though. Interesting to see how it will compare to stuff like Game Maker.

45
General discussions / SFML2 API concerns
« on: June 24, 2010, 09:45:59 pm »
Actually, the question (taken literally) means (to put it bluntly) "what's the difference?"

Someone could of well have asked "what's the purpose of SFML, there's already SDL which has been tried and tested (sort of de facto)" You don't answer that by listing API/etc, people typically spit out "oh it's faster, or oh it does this and this and this" i.e. They're not the same.

e.g. Why make a BMW <model> 2011? There's already a BMW <model> 2010? It's not because it's company policy. Which would be funny if you think about it: "Sir, it's company policy, Section 2 Code A, we have to make a new model every year". XD

Pages: 1 2 [3] 4 5