Is there picture based game under linux terminal?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Is there picture based game under linux terminal?
# 8  
Old 08-26-2011
Quote:
Originally Posted by vistastar
I mean graphics inside terminal.

Maybe it will be better to understand if I call it pixel based game.
Video doesn't work that way. Text mode is text. Byte 'a' in 0xb800:0000 (if my memory serves me correctly) shows an 'a' in the very upper left of your screen, messing with the contents of byte 0xb800:0001 will change that one letter's color. You don't have finer grained control than that, except perhaps by changing the meaning of 'a' in the video card's character set, and that's extremely limited.

To draw graphics in DOS you had to talk to the video card itself and change the video mode. Then the way the video hardware interprets the contents of memory would change. In mode 13 -- 320x240 resolution 8-bit color -- the first byte in video memory would be the very upper left pixel, the second would be a pixel one to the right of it, and so on. (This is also how svgalib works, though controlling the video card in UNIX is much less direct than in DOS.)

If DOS itself was stuck in a video mode that wasn't text, it could still print text, but only because it used small programs embedded inside the BIOS itself to do so. Very slow, but works in nearly any video mode.

Quote:
They can not execute any more.
Why not?

Perhaps if you were more specific about your goal here? not "how to do graphics in text", which doesn't make much sense no matter how you explain it. But what problem you're trying to solve with graphics, on what kind of system.

It'd also help to know what you mean by "terminal". A raw text console of some sort, or a terminal running inside an X server, or what?

Last edited by Corona688; 08-26-2011 at 01:10 AM..
# 9  
Old 08-26-2011
I see. Thank you.

These SVGALIB programes need old linux kernel and some sole lib files. I can't event compile them.
# 10  
Old 08-26-2011
Compile them in what? What is your system?

svgalib has changed along with everything else in Linux as time goes by, ancient svgalib-using programs may no longer work with modern svgalib. But svgalib definitely still exists. There's also alternatives like console framebuffer, and (I think) directfb.

libSDL is a graphics library that can be built to support svgalib, console frame buffer, and tons of video libraries/methods I've never even heard of. (all of them optional. It can be built without video support entirely, though it'd be pretty useless without it...) Games use SDL the same way no matter what video backend SDL is built with. And there's lots and lots and lots of SDL games, new and old. If you can get SDL and framebuffer working on your system you might find a world of games. Heck, even X11 itself can be built to use an SDL backend these days.

Not using an X server backend for SDL means the video almost certainly won't be hardware-accelerated, though.
# 11  
Old 08-26-2011
In the old days the game Hack and later NetHack used ASCII glyphs to represent game elements "graphically" - not sure if you consider that picture based.
# 12  
Old 08-26-2011
My system is
Code:
Linux Arch 2.6.33-ARCH #1 SMP PREEMPT Thu May 13 12:06:25 CEST 2010 i686 Pentium(R) Dual-Core CPU E5300 @ 2.60GHz GenuineIntel GNU/Linux

I haven't find a SDL game can compile on my system.
PS: my system doesn't have X.
# 13  
Old 08-26-2011
It might, just might, help if you installed SDL first Smilie

It'd also really help if you got framebuffer or something working for SDL to use.

It'd also really help if you described in what way things "couldn't x". Errors? Which errors? Something wouldn't work? Which something? And on, and on, and on. You really never gave us a straight answer on what you wanted, I had to deduce it from clues, and it's still possible that I'm wrong.
Quote:
Originally Posted by vistastar
My system is
Code:
Linux Arch 2.6.33-ARCH #1 SMP PREEMPT Thu May 13 12:06:25 CEST 2010 i686 Pentium(R) Dual-Core CPU E5300 @ 2.60GHz GenuineIntel GNU/Linux

That tells me what kernel you're using. The kernel is the 3-meg file that loads on boot. About absolutely everything else on your system, I still know utterly nothing.
# 14  
Old 09-01-2011
I just want a small pixel based game that can run in a TTY terminal.
I mean I don't have X installed, and I don't want it installed, so no error with it.
Also I have libSDL installed.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Creating a text based game using shell script.

Hello guys I'm new to shell scripting and I need to make a game using shell script. I want to know if it is possible for me a total noob to shell scripting to make this game. The game concept is simple: First thing when you launch the script you get a menu in which you select if you want to... (3 Replies)
Discussion started by: Othmane
3 Replies

2. Shell Programming and Scripting

Proper distribution of cards in terminal based crazy8's game in bash script

When I run the following script at the bottom it say cards remaining=44...It should be=35. Can anyone tell me what I'm doing wrong. I've spent hours trying to get this to work and I can't go any further until this part works. thank you in advance Cogiz #!/bin/bash # Date="November, 2016" #... (2 Replies)
Discussion started by: cogiz
2 Replies

3. Shell Programming and Scripting

Tetris Game -- based on a shell script (new algorithm)

GitHub - deepgrace/tetris: Tetris implementation in all kinds of Programming Languages Usage: bash Tetris_Game ] ] ] ] Range: #!/bin/bash # Tetris Game // The Art Of Shell Programming box0=(4 30) box1=(4 30 4 32) box2=(4 30 5 32) box3=(4 28 4 30 4 32) box4=(4 28 4 30... (69 Replies)
Discussion started by: complex.invoke
69 Replies

4. News, Links, Events and Announcements

Eulora, a Linux-based MMORPG, holds first game event.

This Sunday, June the 7th, players in attendance will be given unique items engraved with their name. The items can be used to generate free in-game currency on a daily basis, which is particularly notable because the game's currency is bitcoin. I can't post a link yet; if you're interested, engage... (0 Replies)
Discussion started by: danielpbarron
0 Replies

5. UNIX for Dummies Questions & Answers

[Solved] Making a text based game

Hello, I am looking to make a text based game, that runs in the command window, or a window similar. I will only need to use 1 window. I read somewhere that there is libraries for this kind of thing? But I can't remember the name of them.. Can anyone point me in a direction? I will be... (2 Replies)
Discussion started by: murphy
2 Replies

6. Shell Programming and Scripting

Shell Text Based Game, This Error Makes NO sense. Please help

Okay so I'm making a simple text based game that branches into different scenarios. By branching I mean branching off into whole different files with that part of the game in it. I got tired of working on scenario 1 so I'm working on scenario 2. As I get started and try to test it, I get an... (3 Replies)
Discussion started by: lemonoid
3 Replies

7. Shell Programming and Scripting

Making a Text based game. Need help.

Okay so Zork sparked my interest in this. I have been learning to program for the last year and a half. I've dabbled in everything from Java to Ruby to PHP & XHTML & SQL, and now I'm on bash. I really like bash scripting. Its easy and fun. I just started two days ago. Pretty much I've been writing... (1 Reply)
Discussion started by: lemonoid
1 Replies

8. UNIX for Dummies Questions & Answers

text based football game?

Is there a textbased football game (American) that I can download through ubuntu server edition? (1 Reply)
Discussion started by: dadoprso
1 Replies
Login or Register to Ask a Question