• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
xdc

linux ncurses

8 posts in this topic

what is underneath ncurses?
what is the 'win32' eqivalent in linux?

i want to program at the OS level in linux

any help, thanks
0

Share this post


Link to post
Share on other sites
>> what is underneath ncurses?
What is underneath is a rather complex library that handles hundreds of different raw terminal types.

>>what is the 'win32' eqivalent in linux?
The Unix world is fundamentally different from the Windows world. The Unix world revolves around networking, connections, terminals, and connectivity sessions. The Windows world generally revolves around a single graphical desktop per session.

There is [url="http://gnuwin32.sourceforge.net/packages/ncurses.htm"]ncurses for Windows[/url] if you are interested in providing the same text-based experience on the platform.

>> i want to program at the OS level in linux
The OS level -- the operating system level -- is the level for operating the hardware systems. Sure, you can do it. The kernel source and nearly every major driver source is available to you. What hardware do you want to operate? Or did you mean something else with that?
0

Share this post


Link to post
Share on other sites
so the kernel has console fuctions like, setconsolecursorposition, etc?

i dont want to learn any libraries,wraps,etc, i want to be able to develop them.
I was originially learning win32, but it isnt open source
0

Share this post


Link to post
Share on other sites
No, the Linux kernel does not have quite that kind of functionality.

Think more in terms of escape codes across serial connections and writing directly to video memory.

The kernel talks to hardware. It provides an abstraction so programmers don't need to know about every video card's memory layout or every TTY's escape codes, they can simply have a virtual terminal with a cursor position and text color and such.

If you are really interested in it, the source isn't too hard to find. Go to kernel.org and download the source tree.
0

Share this post


Link to post
Share on other sites
There is a level somewhat between curses and the kernel which is occupied by [url=http://en.wikipedia.org/wiki/Termcap]termcap[/url] and [url=http://en.wikipedia.org/wiki/Terminfo]terminfo[/url] if you want to implement your own curses like library without drilling all the way down to the kernel.
0

Share this post


Link to post
Share on other sites
Please don't do this. You're about to get sucked into a disaster of tears and pain.

"i want to program at the OS level in linux"

No you don't. Really, really, really, you don't. The only people who do this are people who are working on the OS. Everyone else uses the abstraction layers so they don't go insane and they do actually get some work done.

ncurses is good enough for people who implement shells, terminal media players, rogue-likes, interactive fiction games, tetris clones and a hundred others. It means their software runs reliably on thousands of configurations. It has had decades of development and debugging work by hundreds if not thousands of people.

Why would you give up all that? Because you imagine a performance gain? Painting a 1000 character display? Every screen refresh perhaps? On modern machines which are quite capable of repainting million-pixel displays at 50 or 60hz?

Why is this place so full of people who want to spend their time re-implementing these sorts of layers? Is it really just misguided masochism? Why do people want to faff about doing things like this instead of writing actual games?
1

Share this post


Link to post
Share on other sites
[quote name='Katie' timestamp='1351961350' post='4996897']
Why is this place so full of people who want to spend their time re-implementing these sorts of layers? Is it really just misguided masochism? Why do people want to faff about doing things like this instead of writing actual games?
[/quote]

I don't think it's masochism. It's a combination of being new (to programming) and being young. Quite a few of the people starting like that will get shell-shocked and give up programming. Others will learn when to pick their battles and not try to reinvent every wheel and tiny cock and gear in the future. Some will decide that they like the fiddly engineering bits more than the game programming and we get people to work with the fiddly engineering bits. It's win-win for everyone. Well, except for the people completely giving it up.

I think it's fair to give people warning what they are about to get into, but if they want to dive head-first into the water, I'm not going to stand in their way. I did so too when I was much younger. It makes you appreciate having a mature and well-tested library for a boring task that still needs to be done. Edited by BitMaster
0

Share this post


Link to post
Share on other sites
[quote name='hit' timestamp='1351922078' post='4996781']
so the kernel has console fuctions like, setconsolecursorposition, etc?
[/quote]
The kernel does not support concepts like consoles or cursor positions, at least not directly.

The way it works in a POSIX system like Linux is a display (whether it's a physical terminal connected over an RS-232C serial port or a virtual terminal rendered on a video card, what Windows parlance calls a 'console') is represented by a special file called a 'device,' and more particularly a 'character special device.' You open the device, read from it, write to it, close it, and sometimes perform out-of-band control functions on it (the [font=courier new,courier,monospace]ioctl()[/font] system call).

The specifics of which device you use and what control codes you send vary from target device to target device (and OS to OS, but assuming you're using a recent Linux kernel, you're probably targeting a /dev/tty* device).

There are libraries ([font=courier new,courier,monospace]man termcap[/font]) that help hide some of the device-specific peculiarities. You can also read the source of the built-in TTY driver in the kernel itself if you want to do fun things with the 'system console'. Read the manual on [font=courier new,courier,monospace]ioctl()[/font] for some addition hints, and hardware manuals for the various hardware or emulated hardware of a terminal window.
2

Share this post


Link to post
Share on other sites
Bregma's post above is probably the most relevant. I wanted to add that, if you don't want to use ncurses, you can get some of its functionality by using [url="http://en.wikipedia.org/wiki/ANSI_escape_code"]ANSI escape codes[/url].
0

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  
Followers 0