Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7650151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:10:44+00:00 2026-05-31T11:10:44+00:00

Just very curious about this, from my own experience , all the graphic programming

  • 0

Just very curious about this, from my own experience , all the graphic programming seems to C or C++ related. Like the Direct10X. Does functional programming language provide some sort of graphic library to develop video game?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T11:10:45+00:00Added an answer on May 31, 2026 at 11:10 am

    You can use functional languages to do graphics/game programming just as in any other language.

    It’s only a simple game, but I wrote Ironclad: Steam Legions in Clojure as an exercise in functional programming for game development.

    Here are some lessons I learnt / general observations on using Clojure for game programming:

    • You need to be careful about performance as games can be very demanding and functional languages do impose some overheads. Clojure is certainly “good enough” for most games, but you need to know the tricks to keep your code optimised. For example, functional languages can get a bit GC-heavy producing a lot of temporary objects. You need to learn the tricks to avoid this (for example, using reduce in a way that avoids creating new sequence objects, or leveraging primitive artithmetic)

    • Mutability is useful in games. For example, if you are doing anything with physics or smooth animation you often have a lot of objects with constantly changing locations. You can simulate this with functional/immutable data structures but if you care about performance it’s not a good idea. Hence it’s worth finding out how to get mutable data in your functional language even if it isn’t idiomatic (e.g. in Clojure you will probably want to make use of Java arrays)

    • Immutable persistent data structures actually turn out to be very useful in games as well. In Ironclad, the entire game state was stored in a single immutable data structure. This allowed for some cool tricks like efficiently snapshotting the game state / instant undos / running backwards in time.

    • Clojure is awesome for game scripting. The dynamic nature coupled with runtime compilation and the ability to define arbitrary DSLs with macros is a massive win. In fact, even if I was writing a game in an OOP language like Java I would seriously consider using Clojure (or another Lisp) for scripting.

    • Clojure is awesome for interactive development. I often found myself running the game in one window while hacking the running code in a REPL alongside. It’s fun to alter game data structures and immediately see the effects! This awesome video also gives you a taste of what’s possible with Clojure-style development.

    • In Clojure at least you will often want to use the Java libraries for graphics, e.g. Swing for 2D or LWJGL for 3D. In some cases wrappers for these already exist, however I found it easy enough to use them directly from Clojure. After all, Java interop is as simple as (.methodName object arg1 arg2)

    In conclusion, I think functional languages are perfectly good choices for game development, with the exception of very performance-intensive games where you are still likely to be better with C/C++ in order to have more direct control over the hardware.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is mostly a theoretical question I'm just very curious about. (I'm not trying
Just wondering about the performance impact of copying very large php variables. For example
I just started out with C and have very little knowledge about performance issues
Just curious about jQuery/Javascript and referring to options within variables. So, I wrote a
Just an academic question. I'm curious what version of this code is better (faster)
Just curious: sure, we all know that the general case of type inference for
I understand that this is a very broad question, but I was very curious
I have very little experience in web development, so this may be a very
I just saw something very interesting in vk.com Basically in profile page the right
I've just fixed a very subtle bug in our code, caused by slicing of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.