Is there any console "graphics" library for .Net? [closed] - c#

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
My basic goal here is writing a .NET remake of Kingdom of Kroz. For those not familiar with the game:
http://www.indiefaqs.com/index.php/Kingdom_of_Kroz
http://www.youtube.com/watch?v=cHwlNAFXpIw
Originally it was supposed to be a quick distraction project to give me a break from all the generic enterprise WCF/WF/LINQ2SQL/etc work projects occupying most of my time lately. While the result of my effort is playable, it looks like absolute arse (even for a console-based game) because of the way I'm redrawing everything in each frame.
I'm aware of some alternate approaches but in the brief tests I've done they still don't offer significant performance or aesthetic benefits. I don't want to resort to a library which 'emulates' a console if I can help it. I'd prefer to work with the proper Win32 console API under the hood, but not to work with it directly if I can help it. Keeping in mind that it's a distinctly niche use case, what would be the 'generally' accepted best approach for this? Are there any particularly optimal console 'drawing' techniques one should be aware of? I don't mind swimming in a sea of PInvoke and marshalling as long as it still ends up with a fast, responsive and efficient console UI.

You could try Curses-Sharp http://sourceforge.net/projects/curses-sharp/ or libtcod https://github.com/chamons/libtcod-net
curses-sharp is a "A full featured, object-oriented, multi-platform C# wrapper for the curses terminal control library. "
and libtcod is "...a free, fast, portable and uncomplicated API for roguelike developpers providing an advanced true color console, input, and lots of other utilities frequently used in roguelikes."

http://msdn.microsoft.com/en-us/library/ms682073(v=VS.85).aspx
Some/many of these functions you might need to use P/Invoke for, but they should do what you need. You can write at arbitrary locations in the buffer and get key-based, non-buffered input. Usually you start with GetStdHandle() to get handles to the console input and output "streams" and then you call one of the appropriate functions from the above list to do something, like WriteConsoleOutputCharacter(), or PeekConsoleInput().
I once wrote a library to create an in-process windowing system using the Windows console and plain Win32 on C. Fun project, but I don't know where it is now.

Consider checking out the pdcurses or ncurses library. I am using it in Visual C++ and while you are specifying C#, it may be of use to you. It is made for console gaming and I am using it in several projects. It will eliminate the need to utilize a callback refreshing the screen as you will be able to move the character (represented as an ASCII character) without refreshing the screen.

Related

Touchscreen App, Do I need to learn a new language? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I'm making a multitouch-screen app that for its function will just have to get positions of objects on the screen, have them ordered, be able to select them and drag them (sounds basic). I will also have to have a kind of history of actions so I could press the typical "Ctrl+z" and get X number of actions undone
The only language I know is C++ and I have made two simple GUI programs for Windows 7 in the past. For the porpoise of my app which is meant to be used by professionals, the screen should be 14inchs or bigger, considering there are 2 O.S. that support touch-screen events: W8 and Android, and how the app needs to be (explained in the first paragraph):
Should I have to learn another language to get this done?
If yes, what should it be: C# or Java? By what reasons?
If no, could you recommend any C++ libraries to: manage touch-events, make the GUI (both libraries should be free for commercial use).
Have you considered using libgdx to write multiplatform stuff: http://libgdx.badlogicgames.com/features.html
there is a C++ plugin for it here:
http://aevumlab.com/libgdx-cpp/
The beauty of libraries like this (and there are quite a lot when you google them) is that if you haven't got the time to learn a new language you can work around it this way. That being said if you see yourself working closely with Android in the future it wouldn't hurtto dip your toe in Java.
First of all, what do you mean there are two operating systems that support touch-screen events? What about iPhone and Blackberry? Or Google Chrome OS?
In any case, I think you've got your question backwards, or I don't understand it. You do not choose a programming language and then decide your target platform. That hardly makes sense. You will usually have requirements by customers dictating the target platform, and only then you start to think about programming languages.
If there are multiple target platforms, then you may choose to reimplement the same application in different programming languages for each system. Or it may turn out better to use shared native C++ or C code which can be reused, at least partially, on several platforms. These are classical software-engineering tradeoffs, and it's impossible to tell you in general what's easier or more efficient.
You've tagged your question as "Android". For an Android app, you will usually want to implement as much as possible in Java and resort to native C++ or C code only if necessary. You do not use C# on Android. Mind that the often-heard assumption that native code is automatically faster is typically wrong and is made by people who do not measure but guess. Native code may be faster, but it may also be slower because of the extra indirection. However, as I said, reusability of native code on other platforms may be an important advantage and beat related disadvantages, such as reduced robustness or harder development.
C# does have some nice support for touch screen, and it is a great next step from C++. Learning an extremely object oriented language such as C# or Java is almost a must these days. Though a touch screen application isn't exactly 'Hello World', making a small, touch-based app is a good way to get into the WPF side of C#.
To get you started, see this MSDN article: http://msdn.microsoft.com/en-us/library/ee649090(v=vs.110).aspx

Is there a Model Checking software (like Java Path Finder) but for C#? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
<EDIT>
About this question being off-topic and too opinion-based, I'll try to be more clear. My goal was to undestand if such a tool existed, I was not interested in opinions about what was the best one. At the time I wrote this question I spent quite a good amount of time searching the internet and found just old dead projects but such a tool for java existed and I couldn't belive there were nothing for c#.
I think this question is related to programming (code verification), and it is not really asking for an opinion. Also, it's still not easy to find this information and I think my answer could help saving someone's time.
That said, I'm not an expert of stackoverflow, if you still think the question/answer does not fit the site feel free to delete it.
</EDIT>
I've found Moonwalker http://fmt.cs.utwente.nl/tools/moonwalker/ but the last update has been done in 2009 and i don't think it supports .net4.5 (and it's poorly documented).
The answer to this question propose CodeContracts as a model checking tool Model checking tool c# but I've tried using it and I don't think it really is a model checker, not in the same way Java Path Finder for Java is. Im i worng? Can it be used like JPF?
I need to be able to known if a certain part of code is designed in a way that can deadlock. Let's say it's a school thing and even if I'm sure my code is working I must model check it. (Yes we are allowed and encouraged to look on the internet).
As the user #HighCore said, and after lot of searching i can say that a mature and up-to-date tool like the one I described does not exist.
Model checking refers usually to explicit methods, however symbolic methods are equally advanced and arguably more capable for establishing properties of actual code.
For a Turing complete language, the verification problem is undecidable, so model-checking tools usually accept a less powerful language as input. This implies having to convert your problem to that language, before checking. This is why you have not come across any "C# model checking tool".
Have you looked at Boogie and the C#-like Dafny ? These are (essentially) for annotating with Hoare logic.
Alternatively, you can consider model checking your C# solution after (manually) translating it to Promela, then using SPIN.
Related tools (e.g. C-to-Promela translators) are listed here.

NoSQL FREE alternative (alternative to ravendb) for C# development [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I discovered raven-db and I liked it but then I saw the license... GPL or Pay
So I'm looking for good free for closed-source C# development raven-db alternative.
Seems like MongoDB and Berkley are GPL too.
And it's much better for me to find an embedded solution.
If I understand you correctly, then you can safely use MongoDB with it's double core/driver license model.
And one more thing, AFAIK unless your code released to a "world" you can do whatever you want.
Like RavenDB and MongoDB, CouchDB is a document store noSQL database with REST Api (so you can used with any language).
But CouchDB is under Apache 2.0 that can be used on commercial/closed project
https://github.com/mcintyre321/PieDb is a very basic MIT-licenced embedded document db wot I wrote
It
writes objects to app_data using json.net serialized documents
uses Lucene.Net.Linq to provide basic IQueryable support
optimistic concurrency
requires no configuration
It would be nice to get some other developers behind it, as it's only had about a weekend of work on it, but it works for simple cases as a RavenDb replacement.
iBoxDB.net is a lightweight embeddable nosql database with transaction support.
it can embed in net application, windows phone, mono application, unity3d, node.js
Being GPL doesn't mean you can't use it in a closed source project, unless you plan on modifying the source.
EDIT: To be clearer - the key thing here is the distribution of any changes. You can use GPL software and do whatever you like to it in-house, but you cannot distribute binaries of these changes without also making the source available (unless you have reached an agreement with the copyright holder).
I don't know anything about raven-db, but I imagine it boils down to one of the following scenarios:
Your application interfaces directly with the source. If your application cannot build without the GPL project, then either your application must be licensed under the GPL, or you need permission from the copyright holder. LGPL is different, but you stated GPL in your question.
Your application can build without the GPL software, but needs it to run. This would be like me building an application on top of MySQL, and instructing customers to configure a MySQL instance themselves.

C# Library for SSH and Telnet [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'm looking for a C# library that provides access to both SSH and Telnet under the same interface. What would be a good choice?
I recommend Granados for SSH stack. It has been used in many products.
I recommend this code project page for telnet stack.
You can also download Poderosa terminal emulator. It's using Granados as the SSH stack and it has its own implementation of telnet stack.
Poderosa is very pluggable. It provides a good abstraction layer on the network stacks. If you don't have time to write your own unified interface, you should really check out their work. It provides access to both SSH and Telnet under the same interface like what you want. Unfortunately, it's written by Japanese engineers. All the inline comments are written in Japanese. It may take you some time to understand the codes.
You may also like to check out the terminal emulation library as well. Since you are going to process the data returning from the remote terminals, most terminals return escape character sequence for device control commands, font color/style or cursor movement commands.
You may not notice that even in a simple command "ls -al", the returned content may also involve some escape character sequences. Those escape sequences are to make the directory name and file name shown in different colors.
Again, for terminal emulation, the best C# library I can find is Poderosa. If you don't have to use C# library, PuTTY has the best terminal emulation support. It can recognize almost all escape character sequences I have seen so far.
Although I highly recommend you to look at Poderosa and Granados, please be aware that these projects seem to be no longer active. Well.. even so, it's still the best I have seen.
Making the SSH work with C# is indeed very tricky and most of the implementations are either buggy or too slow. When we were making SmarTTY, we struggled with SharpSSH and SSH.Net a lot, and then finally decided to make our own C# wrapper around libssh2.
Although SmarTTY is not open-source, if you want to use its SSH library in your project, feel free to drop me an email. If there's a great demand for a library like that, we might release it as a separate product.
This link might help you C# Telnet Library
Minimalistic Telnet
telnetcsharp.codeplex.com
xpresslearn
thoughtproject.com
dotnettelnet
I couldn't find anything that provides identical (or even similar APIs) for both telnet and ssh, sharpSSH is a little library that nicely abstracts SSH.

Business Workflow Software [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Any recommends here? I need something that can take a set of processes and batch them together. For example, I need to:
1) execute some sql
2) run C# snippets
3) have checkpoint steps with human interaction (i.e. send off an email at step X and wait for a user to review a result and click continue etc...)
If you are using C#, you might as well use the Windows Workflow Framework that's part of 3.5. That is pretty much exactly what it's used for.
I use Captaris Workflow for that. Quite expensive but it works really well.
Depends on how much you're willing to code vs how much you're willing to pay. You could code it all in "plain" .NET code for "free". Next step up would be using Windows Workflow, though you'd still need to code the "human interaction" steps. Slightly more expensive would be a tool like FinalBuilder or Automiser, which would mean less code for you to write, and a more visual workflow designer. Even more expensive- but allowing for potentially no code- would be an enterprise system like BizTalk, MetaStorm, K2, etc.

Categories