Sign in to follow this  
ISDCaptain01

How hard would it be to...

Recommended Posts

Convert win32 and fixed function directx code to Allegro 5/fixed function OpenGL? I wanna read "Programming Role Playing Games with DirectX" by Jim Adams but def do not want to use the outdated Win32/DX8 code.

Share this post


Link to post
Share on other sites

Does it matter? It's a book, I'm assuming that means you're using it for learning. In that case it seems like in order to actually learn the lessons the book teaches you should at least follow along what the code is doing logically, even if you don't feel like testing it yourself.

 

If you really want to convert the code for whatever reason, the question is still a bit illogical, were you going to not do it if its hard? If anything trying to convert it would probably be a very good way to reinforce the concepts, but, I personally wouldn't do it because on the other hand it will be a massive distraction to be looking up and converting all the code to try and recreate everything.

 

Converting it to allegro would probably involve, if anything, dropping most of the win32 code since I believe allegro wraps window creation like most other basic frameworks do, you'd probably just have to deal with getting input and such from allegro instead of the pure message queue. Converting to opengl would be.. a bit more challenging, it'd take a lot of reading unless you're already familiar with the graphics concepts and know what you need to look for the equivalent of in opengl.

Share this post


Link to post
Share on other sites

"How hard is it"? Is that what you're really asking? Nothing is easy!


Of course Tom. But I want to know if its feasible for a relatively inexperienced person like me

Share this post


Link to post
Share on other sites

Shouldn't be that hard. With graphics libraries, the terms are the same but the implementation is different. So if he uses a term that's alien to you, just google "[term] Allegro 5" and see what comes up. It will be tedious, though. Good luck.

Share this post


Link to post
Share on other sites

What's your general level of experience with programming? Do you know any OpenGL or Direct3D (any version) currently?

 

I'm not familiar with the book, so I don't know how well the author has separated the game logic from the rendering code. If they've done a decent job at that, then the systems should be relatively easy to extract (e.g. movement, scripting, UI, Inventory) if not essentially copy-paste-able. For rendering, you probably need at least some familiarity with both APIs in order to re-map concepts from Direct3D to OpenGL. If they've done a poor job at separating rendering, it's probably not worth trying to port the code, but the book might still hold some value from a general standpoint of illustrating the kinds of engine components and RPG requires, and how they fit together.

 

You'll also face some other issues due to the age of the book: Most pressingly, fixed-function in general is dead (not just for DirectX), and the C++ language has moved on. If you want to learn modern best-practices, you might be better off picking up a modern C++ text, a modern OpenGL/DirectX text, and using the RPG book mostly for ideas on how to build the game logic. But all that probably requires a fair bit of grounding in programming.

Share this post


Link to post
Share on other sites

Hi,

 

 

You have many other more important things to learn at these stages of your learning and game development.  In my opinion this is worse than a bunny trail.  This is really wandering from other things that should be getting your hard work and long hours at this time.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this