Jump to content

  • Log In with Google      Sign In   
  • Create Account


Xarles

Member Since 04 Sep 2011
Offline Last Active Mar 31 2012 01:44 PM
-----

Posts I've Made

In Topic: Game Engine *D Design

26 March 2012 - 09:56 AM

The other problem is that it wouldn't be just rendering, Windows, sound and input are all using different APIs. Right now for Window creation I am using Win32/SFML, do you think I should just use SDL?

SFML should handle pretty much all of that for you.


Yea but it seems like it would be cheating to not use Win32 to handle DirectX. It wouldn't seem as natural I guess.

I think that's it. I finally understand it and I did get it working. So, thank you for your help.

In Topic: Game Engine *D Design

20 March 2012 - 09:38 AM

bump?

In Topic: Game Engine *D Design

16 March 2012 - 03:20 PM

You can use factory methods to choose which API at runtime, or preprocessor defines to choose at compile time.

Why "or"? The preprocessor defines means it can compile on Linux by ignoring the DX/Win32 stuff, the factory methods mean that Windows users can choose at anytime between the three. I'm just wondering if you think that it might be a bad idea somehow.

EDIT: If I don't hide the DX11 code stuff when I compile for Windows, then it won't run for XP users right?

The other problem is that it wouldn't be just rendering, Windows, sound and input are all using different APIs. Right now for Window creation I am using Win32/SFML, do you think I should just use SDL?

Also do you think it would be worth the effort (is it a good idea) to put the rendering code into a separate DLL?

EDIT: I have been trying to get it to work. So far it's been working but I have come across a problem:

Window *win = new W32Window(); or Window *win = new SFMLWindow();
That's how it works so far. But when I tried to get the DX11 rendering class to work I found a fault in the design. DX needs a window handle. So I thought I would just make a function to return the handle and pass it to the DX class:
HWND W32Window::getWindowHandle()
{
return hWnd;
}
But the current setup doesn't allow it. Because I am using /Window *win/ instead of /W32Window *win/ I can't use any classes not defined in the base class. But I don't want the base class to have this function because Linux/Mac/anything not Windows, wouldn't know what to do with the type HWND.I could use preprocessor definitions to hide it when compiling for Linux, but won't it start looking ugly when they are all over the place? I could just use W32/SFMLWindow and just manually change between them, but then it's impossible to change at runtime. What should I do?

In Topic: Language for Web Games?

14 March 2012 - 06:06 PM

It depends on what you want. Flash is the current standard for all major browsers. But of course it doesn't work on the iPad/iPhone and won't work on IE10 (Metro). If that is important to you then you can either build directly for that platform or you can certainly use HTML5+JavaScript. You could port your games, but don't underestimate the work that could turn out to be.

If you are more concerned with iPad/iPhone, then directly might be your best bet. HTML5+JavaScript is widely supported but does have its own disadvantages.

In Topic: 3D Model Loading Choices

14 March 2012 - 04:08 PM

I get it now. Thank you for your help.

PARTNERS