Prolog - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Prolog

Hi. I have run into the programming language named prolog. If you know about it maybe you could give me some advice. I am a game programmer and I like the way that you programm in prolog and I think that it would be perfect for games. The only thing I don't know about is how to do the graphics. So, I went searching on the internet and found a prolog developing enviroment which could be linked to a Java program which does all the graphics. So, to get to my question, would doing the logic of a game in prolog and then doing the graphics part in a different language like Java be a good way to go??? Please reply if you can help. Thanks alot!!!

--Ben

Comments

  • alantangcsalantangcs Posts: 5Member
    Hi,

    Unless you are making a game with very complicated AI on a very simple environment, I wouldn't opt for prolog. The only thing I can think of are board games where you probably want to search through 10 levels of possible moves and return the best move. If you are writing an action game where enemies must respond to the player's current position and what the player is doing, this might get complicated in Prolog and, I think, very impossible for 3D games. Of course, if you are good with Prolog (I never was and I barely passed Logic-Programming), then you can give it a try.

    Then there is the speed of interpreting Prolog code. And also, Java is not the fastest of languages so combining the two won't be too good. If the AI is simple you can probably do the whole game in pure java and leave the AI as a separate class with lots of static methods. It all depends on what sort of game you want to write. If it's complicated, you can consider using Threads.

    As for other parts of game logic (physics), you'd probably want to do that in a procedural language. Sorry if it seems my argument is one-sided but I didn't really like Prolog but if you really insist, you can give it a try and maybe it'll work for you.


    Alan

    : Hi. I have run into the programming language named prolog. If you know about it maybe you could give me some advice. I am a game programmer and I like the way that you programm in prolog and I think that it would be perfect for games. The only thing I don't know about is how to do the graphics. So, I went searching on the internet and found a prolog developing enviroment which could be linked to a Java program which does all the graphics. So, to get to my question, would doing the logic of a game in prolog and then doing the graphics part in a different language like Java be a good way to go??? Please reply if you can help. Thanks alot!!!
    :
    : --Ben
    :


Sign In or Register to comment.