Skip to main content

Posts

Showing posts with the label GUI

Creating 2d games with golang and gontuz/prototype

Golang was created as server language. But with the time and curiosity of people, golang has covered GUI application and game development as well. I am sharing here one of the available golang library, on top of which you can create 2d games. Its gonutz/prototype . Sample video Gonutz/prototype is very small and easy to learn library. It's cross-platform , that means the game your are creating in one platform will be able to run on other platforms without any change in code ( in normal case ).  This package currently supports windows , mac and linux. gonutz/prototype features Support for keyboard input Support for mouse input Support for 2d drawing Support for image and sprite-sheets Support for sound  Want to learn more about this package.  Follow my youtube video playlist "2d game development in golang" Video tutorial playlist:   https://www.youtube.com/playlist?list=PLub5C2vM5SjJIF0f561mAON7nFG2nKHD9

Packfolder : archive your resource of sciter based application

Packfolder packfolder is utility provided as part  sciter-sdk . It compresses resources folder under a single file of the format of your choice ( should support by packfolder ).  Currently, the supported output formats are Syntex, [path]\packfolder.exe [resource-folder] [resource-file].[ext] -V [name-of-variable] -[output-format] For example, Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. PS 08-packfolderIntro> .\packfolder.exe res res.go -v resources -go Source Code   08-packfolderIntro

Remove console screen for your gui application written in go

Remove console screen for your gui application written in go Images of appliaction used as example is notepad plus minus. I writen as example. To get details of this program you can visit post " Simple document based application with golang " You write a GUI application and it runs with a console screen behind. It looks pretty weird, right! I mean what is the meaning of a console when console actually not going to interact with the user.  GoLang Gui Application with Console Screen Don't know how this works on Mac or Linux as I have not done this on either Mac or Linux. But for windows, I find a way to compile console-less GUI application for golang.  Just build the application with this argument. go build -ldflags "-H=windowsgui" ldflags used to set build time variable. Now. in the upper statement we are saying golang that current application we are building is windowsgui application so don't create the console with it. J...

Sciter : GUI Application with Golang using HTML/CSS

GUI library for golang sciter This is the words from Sciter's Web site, Sciter brings a stack of web technologies to desktop UI development. Web designers and developers can reuse their experience and expertise in creating modern looking desktop applications. Various GUI frameworks offer different UI declaration and styling languages, such as QML and  XAML (Microsoft WPF) . On the contrary, Sciter allows using time proven, robust, and flexible HTML and CSS for GUI definition and GPU accelerated rendering.   Before using sciter I already tried other alternatives but none of them was satisfactory as an example first i tried andlabs / ui  library   i already have written a post on it. You can read it on post gui programming with golang .  But this library is still under construction and has no support for production apps. Secondly, I go for electron but the problem was my simple calc like the app was of size 150mb....

GUI programming with golang

I am using the  andlabs/ui  library for GUI with golang.  It's quite easy to setup on the mac and Linux.  Video Guide But was not that much straightforward to setup on windows.  It required the  MinGW-w64 [ download from here ] . Make sure you are using the latest version of the MinGW-w64.   Select the appropriate architecture during the installation. Select architecture After installation of the MinGW set to add the path to the bin folder of the MinGW in the PATH variable. Set environment variable Copy the code from the getting started to your favourite editor package main import ( "github.com/andlabs/ui" ) func main() { err := ui.Main( func () { input := ui.NewEntry() button := ui.NewButton( "Click" ) greeting := ui.NewLabel( "" ) box := ui.NewVerticalBox() box.Append(ui.NewLabel( "Label" ), false ) box.Append(input, fals...