Can I make a SDL game with Intel Fortran?

Can I make a SDL game with Intel Fortran?

It's been a long time since I've done anything with Fortran, but I've been missing it lately. Trouble is all I do these days is make casual games with SDL on Ubuntu Linux . SDL is a C library. Can I work with it in Fortran. Better still would anyone be able to provide a snippet or two of code and perhaps provide a sample of how to compile. Are there any Linux IDE's I could use to write Fortran code. All I use is Code:Blocks which has nothing to offer.

Other than probably math, are there any other areas that modern Fortran compilers accelerate at that could be beneficial for a game programmer?

I have done some googling on this subject and it appears Fortran is not popular as a game programming language. I thought I'd post something to see if anyone here writes games. Maybe share a success or horror story with me?

Thanks!

9 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Quoting - lawcoperamail.com

It's been a long time since I've done anything with Fortran, but I've been missing it lately. Trouble is all I do these days is make casual games with SDL on Ubuntu Linux . SDL is a C library. Can I work with it in Fortran. Better still would anyone be able to provide a snippet or two of code and perhaps provide a sample of how to compile. Are there any Linux IDE's I could use to write Fortran code. All I use is Code:Blocks which has nothing to offer.

Other than probably math, are there any other areas that modern Fortran compilers accelerate at that could be beneficial for a game programmer?

I have done some googling on this subject and it appears Fortran is not popular as a game programming language. I thought I'd post something to see if anyone here writes games. Maybe share a success or horror story with me?

Thanks!

what kind of game are they? You are indeed a brave man to plough into modern games with FORTRAN. if you know C why not use it?

you can call C stuff from FORTRAN, just google it (calling C from FORTRAN) and you'll find a bunch of links.

Ricardo Reis
'Non Serviam'
@ http://www.lasef.ist.utl.pt
@ http://www.radiozero.pt
@ http://rreis.tumblr.com
@ http://www.flickr.com/photos/rreis

Quoting - rreis

Quoting - lawcoperamail.com

It's been a long time since I've done anything with Fortran, but I've been missing it lately. Trouble is all I do these days is make casual games with SDL on Ubuntu Linux . SDL is a C library. Can I work with it in Fortran. Better still would anyone be able to provide a snippet or two of code and perhaps provide a sample of how to compile. Are there any Linux IDE's I could use to write Fortran code. All I use is Code:Blocks which has nothing to offer.

Other than probably math, are there any other areas that modern Fortran compilers accelerate at that could be beneficial for a game programmer?

I have done some googling on this subject and it appears Fortran is not popular as a game programming language. I thought I'd post something to see if anyone here writes games. Maybe share a success or horror story with me?

Thanks!

what kind of game are they? You are indeed a brave man to plough into modern games with FORTRAN. if you know C why not use it?

you can call C stuff from FORTRAN, just google it (calling C from FORTRAN) and you'll find a bunch of links.

Well, I usually stick to the casual classics, like Tetris, Pong, etc. Yeah, I know my way around C/C++ pretty good. I guess I've just become bored with it. I wish I knew why game programmers seem to avoid Fortran. It seems to have all ya need. What could possibly go wrong? Ahhh, I guess I'll have to try it out for myself one day if I find an IDE.

Yeah, I googled that quite a while ago and got confused. If I remember right, there's a new spec for frotran 2000/2003 that allows easy integration of c/c++ headers. I thought I read Intel's frotran is 95. Which lead me to believe it would be somewhat of a hack to include c headers like SDL.h.

Thanks for the reply. It seems I'm gonna have google up some more info on this. I was really hoping to hear from anyone that has been there done that.

Quoting - lawcoperamail.com

If I remember right, there's a new spec for frotran 2000/2003 that allows easy integration of c/c++ headers. I thought I read Intel's frotran is 95.

All maintained Fortran compilers have incorporated Fortran 2003 iso_c_interop for the last year or so. The fact that most compilers have only partial support for f2003 needn't discourage you from using it, unless you insist on backward compatibility with old compilers.
Fortran doesn't give full C++ interoperability. iso_c_interop depends in the use of extern "C" in C++ source code, but you said you were using a C library, so that shouldn't be an issue.

Quoting - tim18

Quoting - lawcoperamail.com

If I remember right, there's a new spec for frotran 2000/2003 that allows easy integration of c/c++ headers. I thought I read Intel's frotran is 95.

All maintained Fortran compilers have incorporated Fortran 2003 iso_c_interop for the last year or so. The fact that most compilers have only partial support for f2003 needn't discourage you from using it, unless you insist on backward compatibility with old compilers.
Fortran doesn't give full C++ interoperability. iso_c_interop depends in the use of extern "C" in C++ source code, but you said you were using a C library, so that shouldn't be an issue.

Humm. Yeah I had a good look around, and it seems like it could be done. Since I can't find any FORTRAN source code from anyone using SDL for anything I'll file FORTRAN game dev away in my long list of things to do before I die! It could be fun in my spare...spare time, but it seems like a lot of work for nothing.

Thanks for playing along! I always apreciate the input.

I know of several games coded in Fortran, including the classic ADVENTURE.

Steve - Intel Developer Support

pls can you provide any source code or site where 2 find it ... I am learning 2 make games in Fortran, for now only "math" I did make (it is something like +,-,*,/ game) and now trying 2 make hangman game. there is not much any kind of code for fortran that work with characters, so not much help.

as well if anyone have experience in makeing games in fortran pls let me know I would like 2 learn and hear from others they experience

Thanx

ftp://ftp.lysator.liu.se/pub/misc/fortran-games.tar.gz

1 or 2 are Fortran 77, some even run in a Windows cmd box; most in dialects such as IBM 360.

There's even a sample of legacy C in case you want clues about bridging the gap between 40 and 20 years ago, still using text graphics.  It runs with 1 minor edit in 64-bit cygwin gcc.

This one uses DEC Fortran (not Fortran 77):

$ ./party

.........

 Enter the number that corresponds to your terminal:
 1 - Hazeltine H1500                     4 - Televideo 914 (default)
 2 - ADM 3A                              5 - Perkin Elmer 550
 3 - ADDS (Regent series)                6 - DEC VT 100

anyone have working open source emulator for one of those?

xterm is a superset of vt220 and if you set your TERM to vt100 you should get what you want.  Another option is eterm, which is a vt102 terminal emulator.

Leave a Comment

Please sign in to add a comment. Not a member? Join today