FIFE forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

FIFE 0.4.0 has been released on 15th of January, 2017!

Author Topic: C++ project  (Read 5905 times)

apokalypsadestroyer

  • Newbie
  • Posts: 1
    • View Profile
C++ project
« on: July 09, 2009, 07:36:22 pm »

hi, im new to this engine, but after studiing wiki & looking on forums, i didnt found any tutorial or sample how to use Fife engine only in c++ project (MSVC) totaly without Python language, i dont like python, but i want to use fife (it looks realy good ;) )
Logged

mvBarracuda

  • Administrator
  • Sr. Member
  • *
  • Posts: 411
    • View Profile
Re: C++ project
« Reply #1 on: July 10, 2009, 12:48:20 am »

There you go:
http://wiki.fifengine.net/Frequently_answered_questions#Bindings

Short version: it's possible but it will be quite some work. If you don't know how you could tackle it, it will prolly be easier getting familiar with Python and use that instead.
Logged

vtchill

  • Developer
  • Full Member
  • *
  • Posts: 206
    • View Profile
Re: C++ project
« Reply #2 on: July 13, 2009, 06:35:26 pm »

I am trying to work on some tutorials for people that want to develop in c++. Before I could write the tutorials however I had to write the map loader (since it is currently an engine extension written in python). I am still planning to do the tutorials, but the c++ version of the map loader I wrote is not in the main trunk as it is still being developed and debugged. I will try and keep this thread up to date with the c++ tutorial work. Keep checking back and feel free to mess with it on your own.
Logged

Alastriona

  • Newbie
  • Posts: 2
    • View Profile
Re: C++ project
« Reply #3 on: July 28, 2011, 07:56:51 pm »

Hey there, any progress on this yet? I would like to use FIFE, but I don't know python and I much prefer C++ over anything else I've ever used.

I tried following:

http://code.google.com/p/fife-tutorials/wiki/GettingStarted

But I get stuck at step 2. I'm using windows 7 64-bit and Visual studio 2008 (which is version 9 iirc), but it says there are files missing and it opens an empty solution. Anyway to fix this? (I've tried Code::Blocks for windows as well).
« Last Edit: July 28, 2011, 07:59:26 pm by Alastriona »
Logged

vtchill

  • Developer
  • Full Member
  • *
  • Posts: 206
    • View Profile
Re: C++ project
« Reply #4 on: July 28, 2011, 08:41:32 pm »

Hey there Alastriona and welcome!

I am the maintainer of the google code project you linked to. The tutorials at the google code site have been tested and work with the latest release of the fife engine (0.3.2r2 release)

Can you post the exact files it says are missing?

The basic setup for using these tutorials is to first download and install the fife engine. When you download the fife engine code you will need to run the <fife>/build/win32/update_project_files.bat script and that should generate the fife.proj and then when you open the fife_engine.sln it will include that project.

If you want another site to reference building fife look here: http://wiki.fifengine.net/Building:Win32:VisualStudio

The instructions for building fife for c++ are the exact same exact that you need to change the build configuration from Debug_python to Debug_static (or Release_python to Release_static) before executing the build.

Feel free to post back here or catch us on IRC and ask questions there.
Logged

Alastriona

  • Newbie
  • Posts: 2
    • View Profile
Re: C++ project
« Reply #5 on: July 29, 2011, 05:38:14 am »

Hey there Alastriona and welcome!

I am the maintainer of the google code project you linked to. The tutorials at the google code site have been tested and work with the latest release of the fife engine (0.3.2r2 release)

Can you post the exact files it says are missing?

The basic setup for using these tutorials is to first download and install the fife engine. When you download the fife engine code you will need to run the <fife>/build/win32/update_project_files.bat script and that should generate the fife.proj and then when you open the fife_engine.sln it will include that project.

If you want another site to reference building fife look here: http://wiki.fifengine.net/Building:Win32:VisualStudio

The instructions for building fife for c++ are the exact same exact that you need to change the build configuration from Debug_python to Debug_static (or Release_python to Release_static) before executing the build.

Feel free to post back here or catch us on IRC and ask questions there.

Alright, it was pretty late last night, but I tried again and realised I read over this:

Quote
Unpack / install the FIFE Win32 DevKit to Folder.png <FIFE>\build\win32\

Opening the project works now.  :-[

I am getting linker errors however, I thnk this relates to linking libs built with different versions of the compiler:

Quote
Il mismatch between 'P1' version '20080116' and 'P2' version '20070207'

Googling tells me I shouold install VS2008 SP1 so i'm doing that atm.

EDIT: It worked, installing SP1 fixed it. Just wondering how to progress from here. What headers should I incude? Is there a header that includes the entire engine for me or will I need to manually include all pieces of the engine by importing their headers?

EDIT2: Okay, I suspect including controller\engine.h would be the way to start. It's however complaining it can't find includes for external libraries, I'll need to fix that somehow.
« Last Edit: July 29, 2011, 07:04:27 am by Alastriona »
Logged

vtchill

  • Developer
  • Full Member
  • *
  • Posts: 206
    • View Profile
Re: C++ project
« Reply #6 on: July 29, 2011, 08:44:26 am »

Glad you got the setup/build working, i will try to make a note about the VS2008 SP1 requirement and add that to the wiki instructions.

The original purpose of the C++ tutorials was actually to serve 2 purposes:

1) Help people use the current engine implementation by providing a simple demo
2) Help steer engine development to be more friendly to C++ game creators by stumbling over missing features

To date there has not been a game created in C++ using fife even though the whole engine is written in C++. What this means to potential C++ game creators is that there will probably be some bumps in the road. For instance we do not have a single header file that includes all the engine headers so you will need to include individual files where you need them for the time being. This is not a huge road block but it is one of those little things that we should be able to alleviate in the near future.

On the python side we did not really have to worry about this because when you build fife for python it generates a single fife library that can be imported once to get all functionality.

If you checkout the C++ tutorial from the Trunk of the google code repository and open build/msvc2008/fife_tutorials.sln you can look at the project properties for tutorial_1 to see what needs to be linked against to get it to run.

Post back with any other questions and I would suggest trying to get the C++ tutorial code to run properly with the fife engine. We are also on IRC which I see you have logged into and tried to talk unfortunately we have missed each other there so far. We will be on most of the day today.
Logged