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

Pages: [1]
1
General / Re: Deciding on a language
« on: August 11, 2014, 03:40:52 pm »
Quote
I'm planning on writing a graphical program using SFML for the first time. The only language I know is javascript, so I have to learn a new programming language for this project. I want something simple and efficient, so Golang and Python both look appealing to me.
From your post I suspect you are very new to programming, so forgive me if my assumption is incorrect.

You shouldn't be worrying (too much) about efficiency, it is unlikely to be a limiting factor in any program a beginner would write. If you find your code is slow, a poorly written algorithm will be the culprit 99% of the time unless you are doing something very ambitious. As an aside, python is quite a slow language (although very elegant).

I would also strongly recommend against learning go-lang. As a new language it lacks the learning materials (books, tutorials, source-examples) that more established languages have. Picking something more mainstream will make your life easier.

Quote
I'm wondering about performance, because I will most likely be rendering 3D graphics and doing physics math.

SFML doesn't support 3D, and you would be better off starting with 2D games anyway. Don't underestimate how challenging they can be. If you don't believe me, try and make a polished clone of a popular 2d game like super mario bros.

Python is my favourite language and for simple games it will suffice. However, it isn't well suited to hardcore graphics/physics programming which is more the domain of c++.

C# is a good in-between, very modern, and has some great engines in xna/monogame and unity.

Good luck with whatever you choose :)

2
General / Re: Help installing THOR and SFGUI.
« on: July 31, 2014, 12:12:28 pm »
When you are a beginner you lack the language to articulate your problems. I wouldn't have had a clue which terms to google. At least in my opinion, the tutorials were not comprehensive, nor did they explains things properly.
All this may be obvious to experienced developers like yourselves, so I don't expect for you to relate. Or maybe I am just an idiot. I still haven't been able to get anything to work. I really am thankful for your attempts :(

3
General / Re: Help installing THOR and SFGUI.
« on: July 31, 2014, 10:59:41 am »
Again, not working.

Quote
Inside thor.xcodeproj, there should be multiple targets: thor, INSTALL and ZERO_CHECK.
There is THOR, ZERO_CHECK and ALL_BUILD, but no install. I assume ALL_BUILD is what you meant?
As stated previously I compiled this. Is that all that needs to be done for this step? Where did it install the library on my computer?

Quote
So you created an empty project, wrote some code involving thrd-party libraries and thought it would work automagically, without configuring anything? :P
Yeah haha I'm such an idiot right? I told you I didn't understand the process, you failed to mention critical instructions and yet i am supposed to automagically have read your mind? :P

Quote
When you use a library, there are generally 3 steps to follow:
- add its header path to the compiler include search paths (if not in a standard path), so that it can resolve your #include statements
Have I done that already in previous instructions? If not, how do I do it?
Quote
add its libs path to the linker search paths (if not in a standard path), so that it can find the library
Have I done that already in previous instructions? If not, how do I do it?
Quote
add the library name to the linker input
Have I done that already in previous instructions? If not, how do I do it?

Please stop skipping instructions! You tell me: 'do x, then do y' without saying how to do them.

Quote
This process is VERY important to understand, you'll have to repeat it everytime you'll use a library.
All this stuff is explained in detail in the SFML tutorials... rtfm
None of this stuff is explained in the tutorial, which *as I stated earlier* I had read.

I appreciate the help.

4
General / Re: Help installing THOR and SFGUI.
« on: July 31, 2014, 08:50:22 am »
Quote
So for you, this translates to: "open the generated XCode project and compile it".
Done. I had to checkout an older thor build to get it to compile.

Quote
To install the library: compile the project named "INSTALL"; CMake should have created one for you.
Is this a separate instruction from the previous? There was no project named "Install", only thor.xcodeproj.

Quote
What project settings did you change to say "my project should link to the Thor library"?
None, nobody mentioned project settings until now. Is this what you meant by linking? I stated several times that I didn't understand the process, please don't skip important steps.
How do I link the project to the thor library?

5
General / Re: Help installing THOR and SFGUI.
« on: July 31, 2014, 07:35:38 am »
Ok I read some stuff about the compilation process but still can't get things to work and could not find any good sources on library installation. The tutorial skips a lot of steps and does not mention linking.

Quote
First you get the source code; either by simply cloning the git repository or by extracting some archive file (zip file, tar+gz file or whatever).
Done.

Quote
Then you use cmake (with appropriate options) to generate build files (nmake files, make files, Visual Studio Project files or whatever) that suit your environment/compiler.
Done. (see attached screenshot)

Quote
Then you use your native build tools to build the library according to the files cmake just generated for you. Once the library is compiled, you install it - again using your native toolchain in combination with the build files that cmake already generated.

Ok - here's what I did. First I tried the following commands (from above post):
make
sudo make install

Nothing happened. Next I tried the following: opened the newly created xcode project file and tried to build.
This step fails with the following error:
"Invalid operands to binary expression sf::Time and sf::Time.
float getElapsedRatio(const Particle& particle)
{
        return getElapsedLifetime(particle) / getTotalLifetime(particle);
}

float getRemainingRatio(const Particle& particle)
{
        return getRemainingLifetime(particle) / getTotalLifetime(particle);
}
 

I also tried including it in another project with the following:

#include <Thor/..>

Quote
I asked because it looks like you just forgot a -l flag or chose the wrong one. Thus again, how are you linking Thor?
-l flag? Re - Linking thor. I explained above. If not, could you be more specific? Terse explanations filled with jargon are not helpful...
------------------------------------------------------------------------------------------------------------------------

If I have omitted anything let me know.

6
General / Re: Help installing THOR and SFGUI.
« on: July 30, 2014, 02:04:29 pm »
Again, thanks to everybody for trying to help me out.
Quote
This is equally wrong for any library. You cannot link to source or object files*.
Heh?

Quote
How are you linking Thor? Are you really sure that you follow every step in the tutorial?
From my previous post:
1) downloaded the source from github
2) used cmake to build files
3) went into repository and typed 'sudo make install' into terminal

It's very frustrating when posters (above) say:
Quote
It is actually quite simple.. use your native build tools to build the library according to the files cmake just generated for you.
Once the library is compiled, you install it - again using your native toolchain in combination with the build files that cmake already generate
You kind of skipped a few steps there mate. "Again using your native toolchain".. what?

You explanation assumes way too much. As I have posted repeatedly, I don't understand how this whole process works. Can someone walk me through this step-by-step? And yes, I have read the tutorial. I know how to search google. I would not be asking if I hadn't put considerable effort into making this work myself first.

7
General / Re: Help installing THOR and SFGUI.
« on: July 30, 2014, 01:07:08 pm »
Quote
It would certainly help to see the list of undefined symbols (should be right below in your compiler output).

Is this what you were referring to?

Undefined symbols for architecture i386:
  "thor::Timer::start()", referenced from:
      _main in main.o
  "thor::Timer::Timer()", referenced from:
      _main in main.o
  "thor::Timer::~Timer()", referenced from:
      _main in main.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Quote
I'm pretty sure that the OS X tutorial for SFML explains a totally different way of installing it. Because this one is wrong ;)
Again, I am not installing SFML (see previous post).

Does anyone have any suggestions?

8
General / Re: Help installing THOR and SFGUI.
« on: July 30, 2014, 11:32:43 am »
Quote
It is by no means "black magic". It is actually quite simple. Let me try to explain:

First you get the source code; either by simply cloning the git repository or by extracting some archive file (zip file, tar+gz file or whatever).
Then you use cmake (with appropriate options) to generate build files (nmake files, make files, Visual Studio Project files or whatever) that suit your environment/compiler.
Then you use your native build tools to build the library according to the files cmake just generated for you.
Once the library is compiled, you install it - again using your native toolchain in combination with the build files that cmake already generated.
Then you use the library.

On a Linux system, the above is usually as simple as:
git clone (or "git pull" if you already have a clone)
cmake
make
sudo make install

Takes all of 5minutes - how much easier do you want it?
The official tutorials even explain it in great detail (much more than I do here).

Do you speak mandarin? It really is quite simple. Why, even millions of little children can do it.
Seriously though, I did as you say yet still get the following error:
>> Undefined symbols for architecture i386:

I will repeat the steps I took:
1) downloaded the source from github
2) used cmake to build files
3) went into repository and 'sudo make install'

Where did I err? For those who linked to the SFML tutorial: I already have SFML installed, I am trying to install other libraries. Thanks for helping.

9
General / Re: Help installing THOR and SFGUI.
« on: July 29, 2014, 11:01:46 am »
Thank you for your response.

>> Concerning Thor, have you read the tutorial?
>> You should probably install the libraries, not just copy the files.

I followed the tutorial but it didn't work: xcode could not recognise the #includes until I dragged the files in manually. I don't really know where to begin because the entire process feels like black magic to me: calling out incantations found on internet tutorials and hoping. Is there a straightforward way of installing c++ libraries that 'just works'?

10
General / Help installing THOR and SFGUI.
« on: July 29, 2014, 09:20:44 am »
Hi there,
I'm having trouble getting the thor and sfgui libraries to work. I'm using latest versions of SFML and both libraries. Xcode recognises that these libraries exist (autocomplete works), but whenever I try and compile a project I get the message:

>> Undefined symbols for architecture i386:

I think I must have done something wrong during installation. I ran cmake on both libraries with settings copied from their respective tutorials. I then dragged the .o and src files to usr/local/lib and the headers to usr/local/include.

Can anyone guide me through the installation, or link me information to help demystify the process?
Please be patient if I forgot to mention something.

11
General / Re: #include Puzzle
« on: June 21, 2014, 07:43:04 am »
The order of #include statements shouldn't matter and are a sign you are doing something wrong somewhere. Could you edit the OP with the contents of your header files? That might make the issue clearer, although I suspect this:
http://en.wikipedia.org/wiki/Forward_declaration
might be helpful reading.

12
SFML projects / Re: Guess The Number
« on: May 22, 2014, 05:12:23 am »
Hi there :) Really nicely done.
Any chance of releasing the source..?

Pages: [1]