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

Pages: 1 ... 35 36 [37] 38 39 40
541
Graphics / [Solved] This Looks Right to Me, but Obviously Not...
« on: February 02, 2011, 12:55:05 am »
Code: [Select]
if (Window.GetInput().IsKeyDown(sf::Key::Up) && Shift == true)   MainView.Zoom(1.005f);
        if (Window.GetInput().IsKeyDown(sf::Key::Down) && Shift == true) MainView.Zoom(0.994f);


Zooming is like a scale, your passing values realy close to 1, that should mean almost no change, if any!

If you want to double zoom, use 2, if you want half the zoom, use 0.5, i hope it clarifies it for you.

542
SFML projects / ParabolaEngine - 2D Game Framework
« on: February 01, 2011, 11:15:02 pm »
Thanks man, i will haste in having something to show : )

Last night i finished the first usable version of the localization system, to give an idea of how it works:

You can simply open notepad, and make one or more files with your languages. Just note you should save as a UTF-8 file, for the unicode support.

You write languages like this example:


Code: [Select]

# test.lang
# This is comment
[Language="English"]
TOKEN="Token Sentence"
MENU_OPTIONS="Options"

[Language="Portuguese"]
MENU_OPTIONS="Opções"


Then it is really use these in the application:

Code: [Select]
LocalizationSystem::LoadLanguageFile("test.lang"); //read all files you want with this, the engine will even allow you to iterate a directory and load automaticly the found languages files.

LocalizationSystem::SetLanguage("English"); //Can be any language defined in the files

cout<<LocalizationSystem::ToString("MENU_OPTIONS")<<endl; //This outputs Options because the language is English, if i change the language and re-run the function, the output is different.


ToString function will be a normal std::string representation, not unicode, even tough there is a way to do that.

This is an alpha version of the localization system only. More to come later.

543
Graphics / Default Code Problem, trying to use a RenderWindow as arg
« on: January 31, 2011, 11:53:04 pm »
That is not what referencing means!


Just use your previous code, and change this:

Code: [Select]
void Update(sf::RenderWindow App)

to this:

Code: [Select]
void Update(sf::RenderWindow &App)

Should work.

544
SFML projects / ParabolaEngine - 2D Game Framework
« on: January 31, 2011, 11:39:24 pm »
So, i am working in a 2D Game Framework to support my game development. I really think my work means more if i share it with everyone. So i do!

Website: http://parabolaengine.comlu.com/
Forums: http://parabolaengine.comlu.com/forum/

Overview:

Language: C++
Platform: Windows, Linux and Mac planned in the long run
Release: 0.2
Description: Allows you to build games easily, under a controlled environment, that supports multiple games, such as a Android OS. Allows physics simulations(Box2D), HTML/CSS alike GUI(libRocket), Scripting(AngelScript and the intern script tools) and a lot more. Stay tuned!

Samples:
Kinesis sample 1 - http://www.mediafire.com/?p9ct4sa8ycpqp39

The important part:

The engine isn't ready at all, but it should be usable already to make a few things! I am trying to do things the right way. There is a downloadable package with the framework, a website, a forum, a wiki and a api reference. Even though this is all in baby steps, this should be the starting point into turning this into something specially good.

So, i invite everyone and anyone that would gladly pick the engine and try do something with it! If you take a look at it, you don't like anything, but still make a constructive comment on it, it helps. If you can take it and try to make something with it, like a little testbed,
and help me make it grow with the help of your experience, even better!

I will be actively developing it, taking suggestions and implementing new stuff. There isn't a lot of documentation yet, but I am working on it, specially on the WiKi. I am available to support each one of you always i can, so you won't feel abandoned with this! Counting on you guys :)

Any help is appreciated, even discussing the piece of software in the forum!

Thanks everyone!

545
Graphics / Drawing form custom class lags the program up...
« on: January 31, 2011, 09:39:04 pm »
Code: [Select]
sf::RenderWindow App(sf::VideoMode(800, 800, 32),"Editor");
ImageHolder vImageHolder;
//Our test map.
map curMap(&vImageHolder);
while(App.IsOpened())
{
//Event Handler(We don't need this now...)
sf::Event Event;
while (App.GetEvent(Event))
{
/*if(getKeyPressed(256))
{
App.Close();
}*/
}


//Draw functions
curMap.drawMap(&App);
App.Display();
}


Uh, it does work fine for me, dont know whats wrong for you, you do need to handle events or the window will be screwd :D

546
Window / Game engine object "owning" a window?
« on: January 30, 2011, 11:15:01 pm »
my_window.Create() method is the way

547
C / Images In Executable
« on: January 30, 2011, 10:12:16 pm »
My engine uses a package system, a file that contains other files, you could do something like that, just copy all the files into one in brute, and add a header so you know what is what ;D

548
Graphics / Drawing form custom class lags the program up...
« on: January 30, 2011, 09:46:27 pm »
Jpg sucks : ) I dont know what the problem is, but really, if you use PNG for everything you will be well-served. PNG does great! ;D

549
General / "Absorving" SFML into one DLL - MSVC
« on: January 30, 2011, 06:06:30 pm »
EDIT: Everything seems allright, thanks for the help

550
General / "Absorving" SFML into one DLL - MSVC
« on: January 30, 2011, 05:52:17 pm »
I dont recall doing that in SFML1.6, is it new? ;D

551
General / "Absorving" SFML into one DLL - MSVC
« on: January 30, 2011, 05:01:08 pm »
Release preprocessor:

WIN32
_WINDOWS
NDEBUG
SFML_STATIC
_CRT_SECURE_NO_DEPRECATE
SFML_EXPORTS
GLEW_STATIC
STBI_FAILURE_USERMSG
CMAKE_INTDIR=\"Release\"

552
General / "Absorving" SFML into one DLL - MSVC
« on: January 30, 2011, 04:42:12 pm »
For sure, i have all libraries compiled for sfml2, debug and release, static and release, just like sfml 1.6 used to be!

But the static ones aren't working for some reason:

 
Code: [Select]
error LNK2001: unresolved external symbol "__declspec(dllimport) private: virtual bool __thiscall sf::RenderWindow::Activate(bool)" (__imp_?Activate@RenderWindow@sf@@EAE_N_N@Z)
1>hey.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: virtual void __thiscall sf::RenderWindow::OnResize(void)" (__imp_?OnResize@RenderWindow@sf@@EAEXXZ)
1>hey.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: virtual void __thiscall sf::RenderWindow::OnCreate(void)" (__imp_?OnCreate@RenderWindow@sf@@EAEXXZ)
1>hey.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual unsigned int __thiscall sf::RenderWindow::GetHeight(void)const " (__imp_?GetHeight@RenderWindow@sf@@UBEIXZ)



a lot of those, even in a test project with REALLY minimal code.

Code: [Select]
#include <SFML/Graphics.hpp>

#pragma comment(lib, "sfml-system-s.lib")
#pragma comment(lib, "sfml-window-s.lib")
#pragma comment(lib, "sfml-graphics-s.lib")

int main(int argc, char **argv){
sf::Clock clocly;
sf::RenderWindow windowly;
return 0;
}

553
General / "Absorving" SFML into one DLL - MSVC
« on: January 30, 2011, 04:06:14 pm »
You were right, i was including SFML 1.6 by mistake from a old build directory.

Now i have another problem, a lot of unresolved externals when using sfml-graphics-s.lib, but it works with sfml-graphics.lib... Weird

Like the sfml-graphics-s.lib isnt recognized or something

554
General / "Absorving" SFML into one DLL - MSVC
« on: January 30, 2011, 02:29:11 am »
I've got a problem and i am not sure where it is coming from...

I am building an engine, that engine is one DLL file, so when i build my project, i use it from the applications linking against engine.lib and then putting engine.dll in the same directory.

Now the problem: when i build, i link the DLL against sfml2 static libraries, and i get unresolved externals.
Code: [Select]

1>PerceptionDisplay.obj : error LNK2001: unresolved external symbol "private: virtual void __thiscall sf::Window::OnEvent(class sf::Event const &)" (?OnEvent@Window@sf@@EAEXABVEvent@2@@Z)
1>PerceptionDisplay.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall sf::RenderTarget::Draw(class sf::Drawable const &)" (?Draw@RenderTarget@sf@@UAEXABVDrawable@2@@Z)
1>VisionPrimitives.obj : error LNK2001: unresolved external symbol "public: unsigned int __thiscall sf::Shape::GetNbPoints(void)const " (?GetNbPoints@Shape@sf@@QBEIXZ)


I am not sure what is causing this, in theory i can simply make my dll swallow all the static .lib it depends on, right? So the end user only uses engine.lib and engine.dll, without the need to know anything about sfml..And still have the sfml api exposed if he wants to use it.

I think i may be missing some knowledge on how to work with DLL's, if anyone could brief me shortly i'd appreciate.

Other issue is when i export a class which has a vector or string member, i get a compiler warning, and when i compile sfml, which does the same thing here and there, no warnings... What am i doing wrong? :O
Code: [Select]
needs to have dll-interface to be used by clients of class 'pE::PackageHeader'

Thanks

555
General discussions / Lua and C++
« on: January 29, 2011, 03:49:08 pm »
Hey! thanks for the tips! LuaBind sounds really great, im only wondering if boost will have any negative impact at all in my engine and games, you know, because sometimes too much middleware starts being annoying
:)


Still, i think i will try to implement that : )

Pages: 1 ... 35 36 [37] 38 39 40