Designing a textual user interface using ncurses. - ncurses

I'm planning to write a utility using ncurses. That is menus and panels on Unix.
Is there any way of designing my TUI to see how it looks and feels before I do the actual coding?
Are there any utilities for this, or some articles, links, etc.?

I'm a huge fan of ncurses but I don't know of any tool like this. You can try just doing pencil and paper or Balsamiq mockups. Probably, the best thing to do is to write a slimmed down version of your UI without all the business logic and see how it feels from there.

It seems that the question is no longer relevant, but still ..
I make a cell of the same length and width in LibreOffice Calc, and draw lines interface

Related

Can I use Sketchapp to design entire website

I am a freelancer who wants to start using Sketchapp to make more trendy websites (slanted and curved line backgrounds, UI assets that have shadows, assets that go over 2 divs (see examples). Can and do freelancers (do both their own design and code) use Sketchapp to create the entire site for everything (including text) as their normal best practice and to speed up workflow and then just export everything to text editor and then tweak? Below are 2 examples that I aspire to be able to create.
Example 1 from Pinterest
Example 2 from Pinterest
The answer is Yes and No. The first example is highly using textures and graphics which is hard to do in Sketch. But for that you need to use Photoshop. For the second example is more flat and not using much graphical effect. its minimal and flat. Sketch is really fasten up your working flow to create something like that.
Hope this helps.
You definitely could create both designs in sketch but it won't be the only program you have to use to finish this job. At least if you produce each used graphic yourself.
In the first design for example you have quite a lot gradients an brush technics between the sections. Here you would need to use brushes in Photoshop to achive this look. After this you could export the layers as PNGs with transparent background and import those into sketch...
Sketch is perfect to use with SVG. I would say wen you work with SVGs you can almost only use sketch.
Hope this answer helps!
to speed up workflow and then just export everything to text editor and then tweak
First you create the website design in Sketch and then you start writing the HTML/CSS code by hand. This is how the web development process goes.
You could also use helper tools like Desech Studio to import the Sketch file and then adjust the html/css faster.
Unfortunately it's not possible to create a website in the design stack like Sketch, and also work in the web stack. These 2 stacks are different in how they work.
Alternatively you could start designing the website directly in HTML/CSS and skip the design stack completely, but you will be slower and it will be harder to make changes, compared to the design stack.

SharpDX multi-threading inside the game toolkit

I'm looking for an example of multi-threading implementation inside the game toolkit? I have the MultiCube example, but that is for WinForms and I use WPF, and I can't use the game toolkit tools from Direc3D11 because I need an instance of the GraphicsDevice. The MultiCube example is not displaying anything but a black screen, I tried it on several computers. My video card doesn't support command lists, don't know if that has anything to do with it. I was wondering how many models can SharpDX handle, because I have to draw hundreds of small
scaffold couplers, and after adding about a 100 on the default GraphicsDevice, the application slows down and gets locked. Any help would be appreciated.
Regards,
Haris
I was looking for the same thing but I couldn't find any examples. I tried converting the MultiCube example to use the toolkit and got it basically working, still very messy at the moment and needs optimizing, but at least it renders.
https://github.com/PlehXP/SharpDX-Samples/tree/MultiCubeToolkit/Toolkit/WindowsDesktop/MultiCube

VB6 Game Development

I am developing a game in VB6 (plz don't ask me why :) ).
The storyboard is ready and a rough implementation is underway.
I am following a "pure-software-rendering" approach. (i.e. no DirectX, no openGL etc.)
Amongst many others, the following "serious" problems exist:
2D alpha transparency reqd. to implement overlays.
Parallax implementation to give depth-of-field illusion.
Capturing mouse-scroll events globally (as in FPS-es; mapping them to changing weapon).
Async sound play with absolute "near-zero-lag".
Any ideas anyone. Please suggest any well documented library/ocx or sample-code.
Plz do suggest solutions with good performance and as little overhead as possible.
Also, anyone who has developed any games,
and would be open to sharing her/his code would be highly appreciated.
(any well-acknowledged VB games whose source-code i can study??)
UPDATE: Here is a screen shot of GearHead Garage.
This picture ought to describe what i was attempting in words above... :)
(source: softwarepod.com)
EGL25 by Erkan Sanli is a fast open source VB 6 renderer that can render, rotate, animate, etc. complex solid shapes made of thousands of polygons. Just Windows API calls – no DirectX, no OpenGL.
(source: vbmigration.com)
VBMigration.com chose EGL25 as a high-quality open-source VB6 project (to demonstrate their VB6 to VB.Net upgrade tool).
Despite that, and despite my opinion that VB6 is often criticised too harshly, I can't help thinking there must be better options for game development in 2010?
You may want to check out the Game Programming Wiki -- it used to be "Lucky's VB Game Site" (and we're talking a LONG time ago) but all of the content (VB5/6 centric) moved to the Wiki with the addition of other languages.
It appears that much of the legacy VB6 content is still available on the site.
Have a look at DxIce : http://gamedev.digiapp.com/
I think you will find no well-acknowledged written games in VB6 for precisely the reasons you state above.
It was not designed to be a high performance language. For that you NEED to use the graphics libraries (DirectX, OpenGL) you said you didn't want to use unless you want to BitBLT everything yourself using API calls which is probably not going to get what you need.
VB6 is interpreted, outdated, and I'd be surprised if it runs on Windows 7.
I think you need to seriously re-evaluate the methodology here.
For audio playback, I have used http://www.fmod.org/ in the past. This, and other libraries like BASS, are only free for non-commercial use. I also suggest avoiding the built-in multimedia playback object.

What would you recommend to do simple 2D Graphics?

I want to build a program that will (as part of what it's doing) display lines organically growing and interacting horizontally across the screen. Here's a sample image, just imagine the lines sprouting from the left and growing to the right:
The lines would look like the lines used on Google Maps Transit Overlay or OnNYTurf's transit pages.
It's a personal project, so I'm open to just about any language and library combination. But I don't know where to start. What have you used in the past to create graphics that are similar to this? What would you recommend? I want it to run on Windows without any extras needed (.Net is fine), and it doesn't have to run elsewhere. I needs to run as an actual program, not javascript in the browser.
There's obviously no 'right' answer to this, but the purpose isn't to start an argument about X better than Y but rather just find a list of graphics toolkits that do simple 2D graphics that people recommend because of their ease of use or community or whatever.
Processing may be just the tool for you.
Like you said, there are many ways to tackle this problem. Me personally, being it is a windows based project, I would go with the .NET based implementation utilizing WPF. There are tutorials on how to use the 2D drawing feature out there ( http://www.wpftutorial.net/DrawOnPhysicalDevicePixels.html for one ) Again, there is no right answer here. I might also pick some new technology and let your project be a mechanism to learn something new, providing you do not have a looming deadline.

Is there a visual two-dimensional code editor?

Let me explain what I mean by "two-dimensional code editor": imagine of using Inkscape or Gimp in a big canvas (say infinite). The "T - add text" tool is used to write the code. Additionally, all function definitions will be framed and links will connect the called functions.
In other words: you have a very large sheet of (virtual) paper where you can write.
It would be really useful. I don't want to write code as a long list of lines, especially now that big monitors are cheaper.
Is such a code editor out there?
What's your opinion? Would you use a 2d code editor?
I've written 3 or 4 visual editors and my second one worked like this, that was for java and c++ (never published, though I did use it for some published research work)
I still don't like much to write my code 'as a long list of lines'. My point is, after trying a system like this, I tried a windowed system (class outlines in windows, right click to open code editors), then a tree based system...
in the long run (I wrote several apps using all of those), the tree based system with non overlapping windows felt at once most scalable (to different monitor sizes) and foremost, most productive, because dragging the text boxes and links and/or windows in the first version was necessary, without adding much to the programming experience, so it felt wasteful.
If you want to try some of this stuff out, you can google antegram for java (java only) antegram for web (javascript/php/actionscript) and ee-ide (on oogtech.org). I'm not sure if I could dig up the original c++/java textbox + links editor (which could collapse graphs as well, and had an infinite canvas, so pretty close to what you describe).
I'm not working on this as much as I used to as few programmers ever seemed to like it except me, but if you like working the tree way, or feel like adding stuff for your own purposes, ee-ide would be the way to go, as it's nicely modular and easy to extend compared to the rest.
On the commercial side, you can configure visual studio to work with UML-like diagrams. I have a feel it might be a little too heavy (although it's definitely more coding than UML oriented), but I'm not sure, I haven't really tried yet.
This probably doesn't answer your question exactly, but anyway.
Have a look at the NodeBox beta . It is a visual programming environment mostly for creating generative graphics. You can program and edit the nodes with python code, connect and reuse them in multiple ways. (Windows and Mac OS)
Also worth mentioning (in terms of concept) is Field . It is for programming performances and arranges bits of code on a stage/timeline. Very interesting but also very confusing. (Mac OS only)
Third one is vvvv. It is used a lot by graphical artists to create realtime 3d visuals. Node based. (Windows only)
NodeBox and Field are open-source, so if you are looking to create something yourself you can see how it's done there.
Check this out. I came across it today and remembered this question.
Code Bubbles
Developers spend significant time
reading and navigating code fragments
spread across multiple locations. The
file-based nature of contemporary IDEs
makes it prohibitively difficult to
create and maintain a simultaneous
view of such fragments. We propose a
novel user interface metaphor for code
understanding and maintanence based on
collections of lightweight, editable
fragments called bubbles, which form
concurrently visible working sets.
The essential goal of this project is
to make it easier for developers to
see many fragments of code (or other
information) at once without having to
navigate back and forth. Each of these
fragments is shown in a bubble.
A bubble is a fully editable and
interactive view of a fragment such as
a method or collection of member
variables. Bubbles, in contrast to
windows, have minimal border
decoration, avoid clipping their
contents by using automatic code
reflow and elision, and do not overlap
but instead push each other out of the
way. Bubbles exist in a large,
pannable 2-D virtual space where a
cluster of bubbles comprises a
concurrently visible working set.
Bubbles support a lightweight grouping
mechanism, and further support
connections between them.
A quantiative user study indicates
that Code Bubbles increased
performance significantly for two
controlled code understanding tasks. A
qualitative user study with 23
professional developers indicates
substantial interest and enthusiasm
for the approach, despite the radical
departure from what developers are
used to.
http://www.cs.brown.edu/people/acb/codebubbles_site.htm
At one point, LabView had a programming mode like this. You connected program blocks together in a graphical way.
It's been so long since I've used LabView that I don't know if it is still the same.
For me, the MVVM pattern means that there's no code behind the UI controls anyway. The logic is all in a class with properties.
The properties use WPF databinding to update the UI controls. For example, on the form or window, page, whatever, MySearchButton.IsEnabled is bound to ViewModel.MySearchButtonIsEnabled property. So the app logic runs in the ViewModel class and just sets its own properties and the UI updates automatically.
Although this is specific to MS WPF the pattern actually stems from SmallTalk and is found across the development field as MVP. Without WPF one would need to write the databinding or 'presenter' logic, which is common.
This means the UI can be torn off and a new one pasted-in really quickly and with little code knowledge from the UI guy - who, in an ideal world, is a crack creative guy that drives a 70s Citroen.
So my point is that, although it sounds like a neat innovation, a 2D editor like this would be assisting a coding style that is no longer considered optimal.

Resources