Awesome  Rust

Awesome Rust

1656134160

Coffee: An Opinionated 2D Game Engine for Rust

Coffee

An opinionated 2D game engine for Rust focused on simplicity, explicitness, and type-safety.

Coffee is in a very early stage of development. Many basic features are still missing, some dependencies are experimental, and there are probably many bugs. Feel free to contribute!

Features

And more! Check out the examples to see them in action.

Usage

Add coffee as a dependency in your Cargo.toml and enable a graphics backend feature (opengl, vulkan, metal, dx11, or dx12):

coffee = { version = "0.4", features = ["opengl"] }

Rust is quite slow in debug mode. If you experience performance issues when drawing hundreds of sprites, enable compiler optimizations in your Cargo.toml. I recommend level 2 optimizations in order to stay closer to --release performance:

[profile.dev]
opt-level = 2

Coffee moves fast and the master branch can contain breaking changes! If you want to learn about a specific release, check out the release list.

Overview

Here is a minimal example that will open a window:

use coffee::graphics::{Color, Frame, Window, WindowSettings};
use coffee::load::Task;
use coffee::{Game, Result, Timer};

fn main() -> Result<()> {
    MyGame::run(WindowSettings {
        title: String::from("A caffeinated game"),
        size: (1280, 1024),
        resizable: true,
        fullscreen: false,
        maximized: false,
    })
}

struct MyGame {
    // Your game state and assets go here...
}

impl Game for MyGame {
    type Input = (); // No input data
    type LoadingScreen = (); // No loading screen

    fn load(_window: &Window) -> Task<MyGame> {
        // Load your game assets here. Check out the `load` module!
        Task::succeed(|| MyGame { /* ... */ })
    }

    fn draw(&mut self, frame: &mut Frame, _timer: &Timer) {
        // Clear the current frame
        frame.clear(Color::BLACK);

        // Draw your game here. Check out the `graphics` module!
    }
}

Browse the documentation and the examples to learn more!

Implementation details

Coffee builds upon

  • winit for windowing and mouse/keyboard events.
  • gfx pre-ll for OpenGL support, based heavily on the ggez codebase.
  • wgpu for experimental Vulkan, Metal, D3D11 and D3D12 support.
  • stretch for responsive GUI layouting based on Flexbox.
  • glyph_brush for TrueType font rendering.
  • gilrs for gamepad support.
  • nalgebra for the Point, Vector, and Transformation types.
  • image for image loading and texture array building.

Contributing / Feedback

I am quite new to Rust, systems programming, and computer graphics. I am learning along the way as I build the engine for a game I am currently developing. I am always glad to to learn from anyone.

If you want to contribute, you are more than welcome to be a part of the project! Check out the current issues if you want to find something to work on. Try to share you thoughts first! Feel free to open a new issue if you want to discuss new ideas.

Any kind of feedback is welcome! You can open an issue or, if you want to talk, you can find me (and a bunch of awesome folks) over the #games-and-graphics channel in the Rust Community Discord. I go by @lone_scientist there.

Credits / Thank you

  • ggez, an awesome, easy-to-use, good game engine that introduced me to Rust. Its graphics implementation served me as a guide to implement OpenGL support for Coffee.
  • Kenney, creators of amazing free game assets with no strings attached. The built-in GUI renderer in Coffee uses a modified version of their UI sprites.

Download Details:
Author: hecrj
Source Code: https://github.com/hecrj/coffee
License: MIT license

#rust #rustlang #game #wgpu

Coffee: An Opinionated 2D Game Engine for Rust
Awesome  Rust

Awesome Rust

1656034500

How to Use The Wgpu Crate To interface with GPU From A Desktop Apps

Introduction

This guide demonstrates how to use the wgpu crate to interface with your GPU from a desktop application.

It will teach you the basics of graphics programming in the sense that you will know how to draw objects on the screen. However this guide doesn't cover actual graphics programming techniques, such as loading a 3D model or adding realistic lighting to a scene. It is structurally based off and has paragraphs copied from tomaka's Vulkano guide https://github.com/vulkano-rs/vulkano-www

If you have any problems the book is on GitHub, so open an issue. You can also join the Rust Programming Community Discord and say stuff in the #games-and-graphics channel.

WebGPU

When you create a program (either in Rust or any other programming language) and run it, the program's instructions are executed by the CPU (Central Processing Unit).

But some computers also usually have a video card plugged in them. This video card has its own microprocessor called the GPU (Graphics Processing Unit) or the graphics processor. It can be seen more or less as a secondary machine within your main machine. Your monitor is generally plugged in to your video card if you have one.

WebGPU is a web API that the browsers are currently implementing. It is lower level than the existing webgl API, as engine developers are always after more control of the GPU. However unlike the other new low level graphics APIs (Vulkan/Metal/DX12) it is memory safe for obvious security reasons.

Dawn

Dawn is Google's open source implementation of WebGPU, written in C++, it will be used by chrome/chromium.

It's worth knowing it exists, but there is no need to discuss it further.

wgpu

wgpu is another open source implementation of WebGPU, this time written in Rust, and likely to be used in Firefox. It is split into two crates:

  • wgpu-native crate - wgpu repo - The actual implementation, provides a C API so firefox can use it as its WebGPU implementation.
  • wgpu crate - wgpu-rs repo - Wraps wgpu-native to provide a rusty API. Currently only usable for desktop applications but the idea is to allow targeting the web via this crate as well.

You might notice the github repo naming doesn't match up with the crate names. This will be resolved when wgpu-native is moved to Mozilla Central (the firefox repository).

In this guide we'll only be using the wgpu crate.

Starting a new project

First, create a new crate: cargo new learn-wgpu

And then add the wgpu dependency to your Cargo.toml: wgpu = { version = "0.3", git = "https://github.com/gfx-rs/wgpu-rs", rev = "17077f49b5a5c0ee65c9733e8fb262036cf5d706" }

I use a recent git commit for this tutorial and recommend you use the same commit to avoid any differences in the API. If you start to notice differences in the API, check back here, maybe I updated the commit.

Initialization

Request adapter

The first step is to create an Adapter. The adapter corresponds to a specific physical GPU in your computer. We specify a PowerPreference allowing us to give preference to the type of GPU we are given access to. e.g. PowerPreference::LowPower would likely give us an integrated GPU. While PowerPreference::HighPerformance would likely give us a discrete GPU.


let adapter = wgpu::Adapter::request(&wgpu::RequestAdapterOptions {
    power_preference: wgpu::PowerPreference::Default,
    backends: wgpu::BackendBit::PRIMARY,
}).unwrap();

Request device

You can now use your adapter to create a Device. The Device represents an open channel of communication with the physical device (the Adapter). Most of the wgpu API is accessed via various methods on the Device, so every part of your graphics code will likely need to access it.


let (device, _queue) = adapter.request_device(&wgpu::DeviceDescriptor {
    extensions: wgpu::Extensions {
        anisotropic_filtering: false,
    },
    limits: wgpu::Limits::default(),
});

This also returns a seperate queue object which you will submit commands to.

Creating a buffer

When using wgpu, you will very often need the GPU to read or write data in memory. In fact there isn't much point in using the GPU otherwise, as there is nothing you can do with the results of its work except write them to memory.

In order for the GPU to be able to access some data (either for reading, writing or both), we first need to create a buffer object and put the data in it.


let numbers = [4u32, 13];
let staging_buffer = device
    .create_buffer_mapped(
        numbers.len(),
        wgpu::BufferUsage::MAP_READ
            | wgpu::BufferUsage::COPY_DST
            | wgpu::BufferUsage::COPY_SRC,
    )
    .fill_from_slice(&numbers);

TODO: Give definition, so I can refer to arg names.

We have to indicate several things when creating the buffer. The first parameter is the how many elements will be in the buffer. This means the total number of bytes of the buffer will be length * the size of the data type being stored.

The second parameter indicates which purpose we are creating the buffer for, which can help the implementation perform some optimizations. Trying to use a buffer in a way that wasn't indicated in its constructor will result in an error. It is always valid to use BufferUsage::all() to allow any type of usage, however this will be much slower than specifying its exact usages.

create_buffer_mapped only returns a CreateBufferMapped, we then have to call fill_from_slice on it to store our data and get back a Buffer.

Make sure you specify the data type in your array otherwise you will be left with whatever datatype rust gives your array and any offsets you give in later code about the array may be wrong.

Note: In a real application you shouldn't create buffers with only 4 bytes of data. Although buffers aren't expensive, you should try to group as much data as you can in the same buffer.

From_data and from_iter

In the example above we create a buffer that contains the values 4 and 13, which are of type u32. But you can put any type you want in a buffer, there is no restriction. You can, for example, write this:


struct MyStruct {
    a: u32,
    b: bool,
}

let data = MyStruct { a: 5, b: true };

let buffer = CpuAccessibleBuffer::from_data(device.clone(), BufferUsage::all(),
                                            data).unwrap();

Note: While you can put any type you want in a buffer, using a type that doesn't implement the Send, Sync and Copy traits or that isn't 'static will restrict what you can do with that buffer.

While it is sometimes useful to use a buffer that contains a single struct, in practice it is very common to put an array of values inside of a buffer. You can, for example, put an array of fifty i32s in a buffer with the CpuAccessibleBuffer::from_data function.

However in practice it is also very common to not know the size of the array at compile-time. In order to handle this, CpuAccessibleBuffer provides a from_iter constructor that takes an iterator to the data as last parameter, instead of the data itself.

In the example below, we create a buffer that contains the value 5 of type u8, 128 times. The type of the content of the buffer is [u8], which, in Rust, represents an array of u8s whose size is only known at runtime.


let iter = (0 .. 128).map(|_| 5u8);
let buffer = CpuAccessibleBuffer::from_iter(device.clone(), BufferUsage::all(),
                                            iter).unwrap();

You now know how to create a CpuAccessibleBuffer. Keep in mind that from_data and from_iter are specific to the CpuAccessibleBuffer. Each type of buffer has its own constructors, sometimes similar but sometimes different.

Reading and writing the contents of a buffer

Once a CpuAccessibleBuffer is created, you can access its content with the read() or write() methods. Using read() will grant you shared access to the content of the buffer, and using write() will grant you exclusive access. This is similar to using a RwLock.

For example if buffer contains a MyStruct (see above):


let mut content = buffer.write().unwrap();
// `content` implements `DerefMut` whose target is of type `MyStruct` (the content of the buffer)
content.a *= 2;
content.b = false;

Alternatively, suppose that the content of buffer is of type [u8] (like with the example that uses from_iter):


let mut content = buffer.write().unwrap();
// this time `content` derefs to `[u8]`
content[12] = 83;
content[7] = 3;

Just like the constructors, keep in mind that being able to read/write the content of the buffer like this is specific to the CpuAccessibleBuffer. Other kinds of buffers (for example the ImmutableBuffer) do not provide such methods.

Link: https://rust-tutorials.github.io/learn-wgpu/buffer-creation.html

#rust #rustlang #game

How to Use The Wgpu Crate To interface with GPU From A Desktop Apps

How to Develop an NFT Gaming Platform From Scratch?

In general, developing an NFT gaming platform from scratch is similar to creating any blockchain application. Still, there are some unique aspects of NFT game development that make them worthy of mentioning in a step-wise order. The steps below give you a glimpse of building an NFT gaming platform from scratch.

  • Initially, one must plan all the facets of an NFT game. This includes technology, gameplay nature, blockchain(s) to work, market, target audience, competitors, and business plans. A road map should be drawn based on the observations.
  • Now, design the gameโ€™s prototype and get it tested with limited users. Based on the feedback, you can shape the game's front-end by designing all the in-game aspects.
  • Then, create the backโ€“end features for the NFT gaming platform. Here, you should also integrate blockchain(s), smart contracts, and native tokens of your game.
  • Now, test the NFT gaming platform extensively for bugs and debug any errors that might be present.
  • At last, launch the NFT gaming platform for public use. Get gamer feedback and implement them in future updates to stay competitive in the gaming world.

If you want to create an NFT gaming platform, consider approaching a development firm that can help you realize your ideas.

#nft #game-development #games #gaming #game app development #nftmarketplace #blockchains 

 

How to Develop an NFT Gaming Platform From Scratch?
Lawson  Wehner

Lawson Wehner

1650771780

Doddle: Amazing Magical Doodle Drawing Game Provide A Creative Doodle

 doddle - (become an artist in a minute)

Amazing magical doodle game provide a creative doodle world for you!

๐Ÿ’šAccurate detailed divination reader : To know your life, moods, and relationships at tomorrow
๐Ÿ’œDoodle Glow ๐Ÿ–Œ: The glow art game full of pleasant surprise.
๐Ÿ’›Simplest doodle way : Create glow mandala and magical kaleidoscope patterns.๐ŸŒธ
๐Ÿ’šPlayback the painting process as a cartoon video clip. ๐Ÿ“ฝ๐ŸŽž

app ScreenShot

drawingdrawingdrawingdrawing
drawingdrawingdrawingdrawing

Doddle Features

  • inApp sharing to social media.
  • saving high-quality image.
  • create mandala painting
  • draw with powerful symmetrical lines
  • advanced color picker
  • magical brushes picker
  • symmetrical line picker
  • Playback the painting process as a cartoon video clip.
  • undo.
  • redo.
  • many magical brushes.
  • high-quality lines
  • apply filters on the image(future feature).
  • Google Ads.
  • inApp Purches(future feature). and many more . . .

Naser Elziadna

#sketch #drawing #symmetricall #mandala

some of my work of art

drawingdrawingdrawingdrawing
drawingdrawingdrawingdrawing
drawingdrawingdrawingdrawing
drawingdrawingdrawingdrawing
drawingdrawingdrawingdrawing
drawingdrawingdrawingdrawing
drawingdrawingdrawingdrawing

Current To Do (fell free to take part in this)

  •  publish project on githup ๐Ÿ’“
  •  start new drawing application
  •  make it draw with fingers
  •  add symmtrical feature (360 / symmetrical lines) = (360 / 4 = 90)
  •  add bloc pattern
  •  add bottom sheet toolkit
  •  make the canvas zoomable
  •  add share image feature (not visible in the app)
    •  redo tool
    •  undo tool
    •  clear canvas
    •  brush types (didn't apply to ui)
      •  noraml line
      •  glow line
      •  dotted line (not visible in the app)
      •  eraser
  •  create draw controller

 varibals

  •  List of points
    •  Offset
    •  paint
  •  List of stamp (layer of canvas)
    •  Image
  •  Current Color
  •  Is Random Color
  •  GlobalKey
  •  Symmetry Lines

 method

  •  save image to gallery
  •  take stamp of the canvas
  •  add gallery page
    •  all saved work
    •  edit a saved work
    •  delete a saved work
    •  share a saved work
  •  Playback the painting process as a cartoon video clip
  •  symmetry line picker

My Goal App

drawing

Author: NaserElziadna
Source Code: https://github.com/NaserElziadna/doddle 
License: GPL-3.0 License

#dart #flutter #games #canva 

Doddle: Amazing Magical Doodle Drawing Game Provide A Creative Doodle
lakshya world

lakshya world

1649915425

Top 5 Teen Patti Game Development Company

Teen Patti is the most popular Indian and European card betting game. This game is among the most common and famous variations of the poker games. When it comes to gambling games, Teen Patti secures a favourable spot among the sports lovers by entertaining them highly.

Top 5 Teen Patti Game Development Company

BR Softech -

BR Softech is the trusted name in online Teen Patti Game Development. We have been working with Mobile, PC and Web clients since 2008 to help them create online game applications that increase income opportunities and drive customer loyalty. Our Teen Patti games are built with the highest standards of quality to ensure maximum entertainment and involvement from our players.

Duplex Techno Pvt. Ltd. -
 

Duplex Techno Pvt. Ltd. is a leading and experienced teen patti game development company based in Lucknow, India. We have a highly efficient team of expert game developers who are best at developing a game that provides the user with an extraordinary gaming experience. If you are too looking to develop an amazing game app for your business then our professional developers will be highly beneficial for you.

Orion Infosolutions -

Orion Infosolutions offers the best services amongst Teen Patti Game developers in India. We are passionate about using high-grade technologies and equipment for creating games that are played globally. We have a large player base and assist our clients with great marketing research to make the games more profitable than ever before.

Artoon Solutions Pvt. Ltd. - 



 

Artoon Solutions Pvt. Ltd. a leading Software development company in India, develops card game software for its international clients through its established Artoon technologies. This exclusive Teen Patti is their latest invention and combines the classic card game with online gaming to enjoy it with multiple players. For more information about our presence in this segment.

Capermint Technologies -

Capermint Technologies has developed numerous Real Money Teen Patti Games, and all the games incorporate advanced features that attract millions of players worldwide. We make sure that your requirements are met in the game, and with our experienced designers we develop games with exciting features. Our trained developers use the latest technology to create the most advanced Teen Patti Game.


#game-development #game #gaming #games #developer #gamedeveloper 

Top 5 Teen Patti Game Development Company
Sean Robertson

Sean Robertson

1649840070

iced: A cross-platform GUI library for Rust, inspired by Elm

iced

A cross-platform GUI library for Rust focused on simplicity and type-safety. Inspired by Elm.

 

Features

iced is currently experimental software. Take a look at the roadmap, check out the issues, and feel free to contribute!

Installation

Add iced as a dependency in your Cargo.toml:

iced = "0.3"

iced moves fast and the master branch can contain breaking changes! If you want to learn about a specific release, check out the release list.

Overview

Inspired by The Elm Architecture, iced expects you to split user interfaces into four different concepts:

  • State โ€” the state of your application
  • Messages โ€” user interactions or meaningful events that you care about
  • View logic โ€” a way to display your state as widgets that may produce messages on user interaction
  • Update logic โ€” a way to react to messages and update your state

We can build something to see how this works! Let's say we want a simple counter that can be incremented and decremented using two buttons.

We start by modelling the state of our application:

use iced::button;

struct Counter {
    // The counter value
    value: i32,

    // The local state of the two buttons
    increment_button: button::State,
    decrement_button: button::State,
}

Next, we need to define the possible user interactions of our counter: the button presses. These interactions are our messages:

#[derive(Debug, Clone, Copy)]
pub enum Message {
    IncrementPressed,
    DecrementPressed,
}

Now, let's show the actual counter by putting it all together in our view logic:

use iced::{Button, Column, Text};

impl Counter {
    pub fn view(&mut self) -> Column<Message> {
        // We use a column: a simple vertical layout
        Column::new()
            .push(
                // The increment button. We tell it to produce an
                // `IncrementPressed` message when pressed
                Button::new(&mut self.increment_button, Text::new("+"))
                    .on_press(Message::IncrementPressed),
            )
            .push(
                // We show the value of the counter here
                Text::new(self.value.to_string()).size(50),
            )
            .push(
                // The decrement button. We tell it to produce a
                // `DecrementPressed` message when pressed
                Button::new(&mut self.decrement_button, Text::new("-"))
                    .on_press(Message::DecrementPressed),
            )
    }
}

Finally, we need to be able to react to any produced messages and change our state accordingly in our update logic:

impl Counter {
    // ...

    pub fn update(&mut self, message: Message) {
        match message {
            Message::IncrementPressed => {
                self.value += 1;
            }
            Message::DecrementPressed => {
                self.value -= 1;
            }
        }
    }
}

And that's everything! We just wrote a whole user interface. iced is now able to:

  1. Take the result of our view logic and layout its widgets.
  2. Process events from our system and produce messages for our update logic.
  3. Draw the resulting user interface.

Browse the documentation and the examples to learn more!

Implementation details

iced was originally born as an attempt at bringing the simplicity of Elm and The Elm Architecture into Coffee, a 2D game engine I am working on.

The core of the library was implemented during May 2019 in this pull request. The first alpha version was eventually released as a renderer-agnostic GUI library. The library did not provide a renderer and implemented the current tour example on top of ggez, a game library.

Since then, the focus has shifted towards providing a batteries-included, end-user-oriented GUI library, while keeping the ecosystem modular:

iced ecosystem 

Troubleshooting

GraphicsAdapterNotFound

This occurs when the selected built-in renderer is not able to create a context.

Often this will occur while using iced_wgpu as the renderer without supported hardware (needs Vulkan, Metal or DX12). In this case, you could try using the iced_glow renderer:

First, check if it works with

$ cargo run --features iced/glow --package game_of_life

and then use it in your project with

iced = { version = "0.3", default-features = false, features = ["glow"] }

NOTE: Chances are you have hardware that supports at least OpenGL 2.1 or OpenGL ES 2.0, but if you don't, right now there's no software fallback, so it means your hardware doesn't support Iced.

Contributing / Feedback

Contributions are greatly appreciated! If you want to contribute, please read our contributing guidelines for more details.

Feedback is also welcome! You can open an issue or, if you want to talk, come chat to our Discord server. Moreover, you can find me (and a bunch of awesome folks) over the #games-and-graphics and #gui-and-ui channels in the Rust Community Discord. I go by lone_scientist#9554 there.

Download Details: 
Author: iced-rs
Source Code: https://github.com/iced-rs/iced 
License: MIT
#rust #elm #programming 

iced: A cross-platform GUI library for Rust, inspired by Elm
lakshya world

lakshya world

1649484281

Top 7 Game Development Company

Game development is much more than just programming or coding. It is the art of making something special for someone by blending a good story, design, sounds, programming, development, release and everything in between. It is not as easy to develop as it seems. But trusting a top game development company India can change the way one interacts with the games as they help to enhance the gaming experience keeping the user experience in the center.There are many mobile apps that are designed for making payments over the counter. Many of them offer a facility to load money onto the app and use it to pay as & when you need it'. But there is often a problem with usability of such apps. They can not be used for making payments over the counter at multiple locations.


Start A Video Game Development Company  By Considering These Following Steps:

 

If you want to implement your business idea and start a video game development company, you must know and follow the legal obligations of running a business. Starting a business and registering it are two separate processes that must be done separately, but for a successful and profitable business.

#1 Have Proper Plan For Your Business

#2 Naming Your Business

#3 Create a Legal Entity

#4 Register for All Taxes

#5 Business Credit Card & Bank Account

#6 Business Accounting

#7 Have Necessary Licences and Permits

#8 Insurance of Business

#9 Establish the Brand

#10 Have a Strong Web Presence


Top 7 Video Game Development Company -
 

 Most of the game development companies these days are literally trying their best to make games a prominent part of people's daily life. Some are doing exceptionally well in this category and thereby leading the trend. In case you have been looking for some such game developing companies, this report presents you with the details about 7 such companies that we consider top rated video game development companies.
 

1.BR Softech - 

BR Softech started its game development journey in 2008br and since then, it has been delivering quality games and apps to clients. BR Softech is a combination of elite professional app developers who have worked with the top-notch leading companies like Adobe, Nike and Microsoft. Being an award-winning company, the company has created 2D & 3D games for iOS, Android, Windows Phone and HTML5. Hyperlink InfoSystem is 100% pure quality!

2. Zensar Technologies

Zensar Technologies is a premier global digital solutions provider based out of UK and India. Serving clients in over 20 countries, Zensar provides integrated digital solutions in mobile app development, web development, AI, Cloud Infrastructure and Automation.

3.The NineHertz

NineHertz are experienced in making Video Games for clients. Our team of game designers, developers and programmers produce high quality, custom gaming apps that are highly reliable and intuitive, adhering to industry standards and meeting clients' individual needs.

4.iTechArt

 iTechArt is a creative group whose forte is all things tech. By leveraging our unique tech-gadget design and development expertise, as well as our extensive portfolio of innovative games, we can help you define your identity, appeal to your audience and succeed in the competitive gaming industry.

5 Zero Games Studio 

Zero Games Studio is founded by senior game developers. It provides services in Unreal Engine development, mobile development, and games for serious gamification as well as advertising. It works on PC, console and mobile platforms.

6.Electronic Arts

EA is a leading global interactive entertainment software company. EA develops, markets, and delivers games, content and online services for Internet-connected consoles, personal computers, mobile phones and tablets.

7.Nintendo

The Nintendo company was founded in 1889 as a company that created handmade hanafuda playing cards. After changing its focus multiple times through the years, it became a video gaming company in 1977. The company's main offices are now in both Washington and California.

#game-development #gamer #game #games 
 

Top 7 Game Development Company

Excalibur: an Easy to Use 2D HTML5 Game Engine Written in TypeScript

Excalibur is a free game engine written in TypeScript for making 2D games in HTML5 canvas. Our goal is to make it easier for you to create 2D HTML/JS games, whether you're new to game development or you're an experienced game developer. We take care of all of the boilerplate engine code, cross-platform targeting (using browserstack ๐Ÿ˜Ž), and more! Use as much or as little as you need!

Excalibur is an open source project licensed under the 2-clause BSD license (this means you can use it in commercial projects!). It's free and always will be. We welcome any feedback or contributions! If you make something with Excalibur, please let us know!

API Reference

Visit the API Reference section for fully-annotated documentation of the API.

Questions

Samples

Compiled examples can be found in the Excalibur Samples collection.

Contributing

Please read our Contributing Guidelines and our Code of Conduct. Whether you've spotted a bug, have a question, or think of a new feature, we thank you for your help!

Writing Documentation

We love when people help improve our documentation. You can contribute to the docs in this repository.

Environment Setup

The Excalibur.js team primarily uses Visual Studio Code as a platform agnostic editor to allow the widest contributions possible. However, you can always use your own preferred editor.

Testing

Browserstack

Excalibur is committed to supporting the latest 2 versions of popular desktop and mobile browsers. We leverage browserstack automated testing to ensure that Excalibur is automatically tested as thoroughly as possible on all our supported platforms.

Prerequisites

After cloning the repository, run:

npm install

You can then run the npm tasks for various purposes:

# Run compilation, linting, and all unit & visual tests
# Recommend to do this before finalizing pull requests
npm run all

# Run engine core compilation only
# Useful for quick checks to ensure everything compiles
npm run build

# Run engine tests only (does not run compile task)
# Useful to run tests ad-hoc
npm test
npm run test

# Start Storybook-based sandbox
# Used for creating interactive visual tests and examples for docs
npm run sandbox

# Compile API docs
npm run apidocs

# Build a nuget package and specify a version
npm run nuget -- 1.1.1

Get Started

Our user documentation is at https://excaliburjs.com/docs (and you can contribute to the docs at https://github.com/excaliburjs/excaliburjs.github.io)

โ— Note:  Excalibur is still in version 0.x, which means this project and its associated plugins may be a little rough around the edges. We try to minimize API changes, but breaking changes will occur in new released versions. Excalibur is a labor of love and the product of many hours of spare time. Thanks for checking it out!

Author: Excaliburjs
Source Code: https://github.com/excaliburjs/Excalibur 
License: BSD-2-Clause License

#typescript #games #gamedev 

Excalibur: an Easy to Use 2D HTML5 Game Engine Written in TypeScript
Lakshya BR

Lakshya BR

1648272925

Racing Game Development Process

1. Bring a Unique Game Idea: โ€“ Fabricating the blueprint of the gaming app is one of the most vital parts of the complete process. The unique game idea is the foundation of the success game development process. If the foundation is solid, there is a greater chance of success. To make a better foundation you must bring a unique and engaging idea. The whole idea is to bring your concept to fruition.

2. Make It Impressive: โ€“ To make your user retain your video game app, you must make it impressive. There are around millions of gaming app available on play store, however, only a few of them are performing well. To beat the competition, you must launch a brilliant game, bursting with loads of existing. Develop the game concept to share it with players and allow them to play the game in the most refined way.

3. Should Be Addictive: โ€“ Addiction is the key to make your game successful. There are millions of apps out of which, many of the apps are uninstalled in the very first week. Therefore, it is must bring the addictive element into play. To make the game addictive you must make the character fun and easy to understand, Create various levels depending on time span, offer alluring content like coins and extra lives, increase the difficulty level and, not to forget free rewards it attracts the players more.

4. Choose the Platform Wisely: โ€“ Choosing the platform is one of the most vital parts. It is a significant step to make up your mind on the platform you want to launch the game app. Online Racing Game Development can be processed using various platforms like iOS, Android, Windows and much more. This decision will impact your overall performance, hence while selecting the platform you must consider your target audience. (Insert an image with Platform icon)

5. Create a Stunning Design: โ€“ Communicate efficiently with your targeted audience and communicate effectively with them. We are surrounded by people who have a tendency to judge the book by its cover. Focus on visual design, art direction and establish strong compositions or layout to effectively guide the players. Make sure to use appealing colors and shapes, ensuring the engaging experience.

6. Plan Game Monetization Strategy: โ€“ To make your game successful one must plan the game monetization strategy. Plan the monetization strategy from the start to scale up your revenue and to recover the investment. Here we have listed some of the common ways to monetize mobile games.

Advertising: โ€“ Multiple online racing game development company add ads within the app to generate substantial revenue

In-app purchase: โ€“ In-app purchase is an effective and one of the most common way to earn income from players.

Premium Versions: โ€“ Premium version may reduce the number of purchases, but if provided with a demo or free trial it can help you generate great revenue after completing the racing game development process.

7. Select The Technology: โ€“ For mobile game development, you must choose the technology wisely. There are many technologies available one must choose the one which suits your requirement. The technology you use must be compatible with the 3D racing Game and Unity racing Game without impacting the performance. Your racing game development, performance only depends on the technology you choose hence, be clear what technology you are going to use.

8. Choose Developer: โ€“ For adventure game racing design you need the best racing game developer. The developer is the heart and soul of the game, the complete process depends on the developer. They involve in the various aspects of game creation from coding to programming. They have the skills to convey your idea into reality while fulfilling the business aspects.

This is an in-depth insight into the game App  development process.

 

Source Url - https://www.brsoftech.com/blog/racing-game-development-cost/

 

#game-development #games #game 

Racing Game Development Process
lakshya world

lakshya world

1648011376

Best Game Development Software of 2022

Every year gaming development is becoming more complex. Many AAA blockbuster games can cost the same as their movie counterparts. Due to this game development technology, software and tools programs need to be cutting edge. There is a need for talented, young, and innovative developers worldwide. 

  1. Unity:

    Ruling the world of unity for game development engines with nearly 48% of market share, Unity is a multiplatform game engine with a straightforward support system that has both 2D and 3D gaming. It uses a relatively easy programming language, C3, making it an intuitive and user-friendly interface. Furthermore, simplifying the C# API offers plugins, drag, and game and drop functionality. 
     
  2. Maya:

    Autodesk Maya is a heavy hitter in the game development industry, considered a standard for animation and 3D modelling. Mayaโ€™s robust tools simplify complex animation tasks. Joint centering, grease pencil, weight distribution, etc. All are assisting in a visualising creation before starting development, saving time. Features like real-time analysis allow artists to review their designโ€™s credibility and make changes to it as they go along the process. 
     
  3. Unreal Engine 5:

    An unreal Engine is an excellent option if photorealism is a priority. It is most commonly known and a popular tool among unreal engine developers known as an AAA game engine in the industry. The diversity of this engine provides high-quality graphics in a fraction of the time relative to other tools. These features come with the platform, but they need installation separately with different engines. Game development trends are pushing the gaming industry on a more developing path. 
     
  4. GameMaker Studio 2:

    It is a multilevel tool for creating commercial 2D games. It is simple for developers with little to no experience to build high-quality games. It operates on a subscription model that might not be ideal for creators with a tight budget, and it also offers features and tools for a more experienced user to create more complex games. 
     
  5. RPG Maker MV:

    One genre of video games separates it from other tools. All the tools and commands are tuned for RPGs, making it one of the best tools in the industry for these specific types of games. It is powerful enough for developers, simple enough for a child, and versatile for any platform. It is promising to use despite skills and experience. You can create games based on RPG engines on virtually any platform. 
     
  6. Construct 3:

    It is a novice-friendly game engine used to create various 2D games, from single to multiplayer, which you can transfer to desktop and mobile platforms. It is more prevalent amongst indie game developers, the second most popular engine in itch.io; it is an indie gaming marketplace with graphic features; you will need to make a third-party tool.

Article Source - https://www.brsoftech.com/blog/game-development-trends/

#game #games #gaming #gameengine #3dgame 

Best Game Development Software of 2022
Monty  Boehm

Monty Boehm

1644781140

PySimpleGUI: Python GUIs for Humans

Python GUIs for Humans

Transforms the tkinter, Qt, WxPython, and Remi (browser-based) GUI frameworks into a simpler interface. The window definition is simplified by using Python core data types understood by beginners (lists and dictionaries). Further simplification happens by changing event handling from a callback-based model to a message passing one.

Your code is not required to have an object oriented architecture which makes the package usable by a larger audience. While the architecture is simple to understand, it does not necessarily limit you to only simple problems.

Some programs are not well-suited for PySimpleGUI however. By definition, PySimpleGUI implements a subset of the underlying GUI frameworks' capabilities. It's difficult to define exactly which programs are well suited for PySimpleGUI and which are not. It depends on the details of your program. Duplicating Excel in every detail is an example of something not well suited for PySimpleGUI.

Japanese version of this readme.

PySimpleGUI needs your support. If you find PySimpleGUI useful, please consider sponsoring the project on GitHub or BuyMeACoffee. It's expensive working full-time on PySimpleGUI and also paying for ongoing expenses (domains, artists, software, consultants, sponsoring open source projects).

What Is PySimpleGUI โ“

PySimpleGUI is a Python package that enables Python programmers of all levels to create GUIs. You specify your GUI window using a "layout" which contains widgets (they're called "Elements" in PySimpleGUI). Your layout is used to create a window using one of the 4 supported frameworks to display and interact with your window. Supported frameworks include tkinter, Qt, WxPython, or Remi. The term "wrapper" is sometimes used for these kinds of packages.

Your PySimpleGUI code is simpler and shorter than writing directly using the underlying framework because PySimpleGUI implements much of the "boilerplate code" for you. Additionally, interfaces are simplified to require as little code as possible to get the desired result. Depending on the program and framework used, a PySimpleGUI program may require 1/2 to 1/10th amount of code to create an identical window using one of the frameworks directly.

While the goal is to encapsulate/hide the specific objects and code used by the GUI framework you are running on top of, if needed you can access the frameworks' dependent widgets and windows directly. If a setting or feature is not yet exposed or accessible using the PySimpleGUI APIs, you are not walled off from the framework. You can expand capabilities without directly modifying the PySimpleGUI package itself.

Bridging the "GUI Gap"

Python has brought a large number of people into the programming community. The number of programs and the range of areas it touches is mindboggling. But more often than not, these technologies are out of reach of all but a handful of people. The majority of Python programs are "command line" based. This isn't a problem for programmer-types as we're all used to interacting with computers through a text interface. While programmers don't have a problem with command-line interfaces, most "normal people" do. This creates a digital divide, a "GUI Gap".

Adding a GUI to a program opens that program up to a wider audience. It becomes more approachable. GUIs can also make interacting with some programs easier, even for those that are comfortable with a command-line interface. And finally, some problems require a GUI.

Recognition of Open Source Use

In the Demo Programs or one of the PySimpleGUI Account's Repos these packages were used at least one time. Some of your are the goodies on the right of the GUI gap.

If you use Open Source software in your project, be sure and supply information about the packages you used.

  • chatterbot
  • cv2
  • fitz
  • forecastio
  • gtts
  • matplotlib
  • mido
  • mpl_toolkits
  • notifypy
  • numpy
  • pandas
  • PIL
  • praw
  • psgtray
  • psutil
  • pyfiglet
  • pygame
  • pylab
  • pymunk
  • requests
  • vlc
  • win32api
  • win32con
  • win32gui
  • win32process

LPLG3 as an Example

The licensing terms in the LLC3 Licensing, it states:

  1. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:

a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License.

b) Accompany the Combined Work with a copy of the GNU GPL and this license document.

Since the above packages each have a similar license clause, I'm listing them here, in what I would consider a "prominent notice" location, that I'm using the fine works of these groups or individuals. They are used in the Demo Programs most likely or one of the Repos that are under this account as this list is all inclusive.

You all have my respect and admiration. You're enabling bigger things. What a special kind of thing to make. Who knows what you've enabled. I believe more people are getting over to your creations and getting to experience them.

tkinter team - PySimpleGUI would be nowhere without your lengthy work & continuous dedication. ONE GUI API for 3 different OS's? Really? With no code changes to move between? That's a huge accomplishment. You're #1 to me. Thank you for your hard work ๐Ÿ™.

Getting Over "The Bar"

It's been said by some that "the bar is pretty high" when it comes to learning GUI programming in Python.

What happens when the bar is placed on the ground and can be stepped over?

This is one of the questions that the PySimpleGUI project has tried to answer. Here's a humorous look at what's been a not funny situation.

The results have been fascinating to witness and it's been touching to read the accounts of the journeys of users.

Nothing prepared me for the emails that started to arrive soon after the first release of PySimpleGUI. They are heartwarming and heartbreaking tales of life-long dreams of creating a program that required a GUI. Some made a few attempts, giving up each time. Others never started once they started to research what was required.

After recounting the varied and long road to finding PySimpleGUI, the stories became similar. They each found success and expressed joy and gratitude. The joy expressed in these messages was unlike anything I had encountered in the entirety of career in the computing field.

It's been these emails and the messages of gratitude seen here in the GitHub Issues that made dedicating my life to his project a non-decision.


Subscribing to Announcements ๐Ÿ“ข

If you click the "Subscribe" button in the Announcements GitHub Issue, then you'll be notified when project news is published. This Issue is the official location to get the latest PySimpleGUI information. Information is posted frequently including release contents, tips & tricks, documentation updates, etc. There have been over 1,000 posts since the project started.


About Me ๐Ÿ‘‹

Hi there! I'm Mike. You'll find me right here, on the PySimpleGUI GitHub, solving problems and continuously pushing PySimpleGUI forward. I've dedicated my days, nights, and weekends to the project and PySimpleGUI users. Our successes are ultimately shared. I'm successful when you're successful.

While I'm a relative newcomer to Python, I've been writing software since the 70s. The majority of my career was spent creating products in Silicon Valley. I bring to PySimpleGUI the same professionalism and dedication as I did to the corporate products I developed. You are my customers now.

Project Goals ๐Ÿฅ…

Two of the most important goals of the PySimpleGUI project:

  • Having fun
  • Your success

Fun as a goal on a serious project sounds odd, but it's a serious goal. I find writing these GUI programs to be a lot of fun. One reason is how little time it takes to write a complete solution. If we're not enjoying the process then someone's going to give up.

There is a significant amount of documentation, a cookbook, 100's of demo programs to get you immediately running, a detailed call reference, YouTube videos, online Trinket demos, and more... all working to create... a fun experience.

Your Success is a shared goal. PySimpleGUI was built for developers. You're my peeps. It's been an unexpected reward to see the results of the combined effort of users and PySimpleGUI. Use the documentation & other materials to help build your application. If you run into trouble, help is available by opening on Issue on the PySimpleGUI GitHub. Take a look at the section on Support below.


Educational Resources ๐Ÿ“š

PySimpleGUI now has an official Udemy course! Check the header of this readme and the PySimpleGUI documentation for a coupon code. The course can be found at www.udemy.com/PySimpleGUI. This course is currently the only income source for the PySimpleGUI project other than sponsorships and donations.

www.PySimpleGUI.org is easy to remember and is where the documentation is located. You'll find tabs across the top that represent several different documents. The documentation is located on "Read The Docs" so that there is a table of contents for each document and they are easy to search.

There are 100s of pages of written documentation and 100s of example programs that will help you be effective very quickly. Rather than requiring days or weeks of investment to learn a single GUI package, you may be able to complete your project in a single afternoon when using PySimpleGUI.

Example 1 - The One-Shot Window

This type of program is called a "one-shot" window because the window is displayed one time, the values collected, and then it is closed. It doesn't remain open for a long time like you would in a Word Processor.

Anatomy of a Simple PySimpleGUI Program

There are 5 sections to a PySimpleGUI program

import PySimpleGUI as sg                        # Part 1 - The import

# Define the window's contents
layout = [  [sg.Text("What's your name?")],     # Part 2 - The Layout
            [sg.Input()],
            [sg.Button('Ok')] ]

# Create the window
window = sg.Window('Window Title', layout)      # Part 3 - Window Defintion
                                                
# Display and interact with the Window
event, values = window.read()                   # Part 4 - Event loop or Window.read call

# Do something with the information gathered
print('Hello', values[0], "! Thanks for trying PySimpleGUI")

# Finish up by removing from the screen
window.close()                                  # Part 5 - Close the Window

The code produces this window


Example 2 - Interactive Window

In this example, our window will remain on the screen until the user closes the window or clicks the Quit button. The main difference between the one-shot window you saw earlier and an interactive window is the addition of an "Event Loop". The Event Loop reads events and inputs from your window. The heart of your application lives in the event loop.

import PySimpleGUI as sg

# Define the window's contents
layout = [[sg.Text("What's your name?")],
          [sg.Input(key='-INPUT-')],
          [sg.Text(size=(40,1), key='-OUTPUT-')],
          [sg.Button('Ok'), sg.Button('Quit')]]

# Create the window
window = sg.Window('Window Title', layout)

# Display and interact with the Window using an Event Loop
while True:
    event, values = window.read()
    # See if user wants to quit or window was closed
    if event == sg.WINDOW_CLOSED or event == 'Quit':
        break
    # Output a message to the window
    window['-OUTPUT-'].update('Hello ' + values['-INPUT-'] + "! Thanks for trying PySimpleGUI")

# Finish up by removing from the screen
window.close()

This is the window that Example 2 produces.

And here's what it looks like after you enter a value into the Input field and click the Ok button.

Let's take a quick look at some of the differences between this example and the one-shot window.

First, you'll notice differences in the layout. Two changes in particular are important. One is the addition of the key parameter to the Input element and one of the Text elements. A key is like a name for an element. Or, in Python terms, it's like a dictionary key. The Input element's key will be used as a dictionary key later in the code.

Another difference is the addition of this Text element:

[sg.Text(size=(40,1), key='-OUTPUT-')],

There are 2 parameters, the key we already covered. The size parameter defines the size of the element in characters. In this case, we're indicating that this Text element is 40 characters wide, by 1 character high. Notice that there is no text string specified which means it'll be blank. You can easily see this blank row in the window that's created.

We also added a button, "Quit".

The Event Loop has our familiar window.read() call.

Following the read is this if statement:

if event == sg.WINDOW_CLOSED or event == 'Quit':
        break

This code is checking to see if the user closed the window by clicking the "X" or if they clicked the "Quit" button. If either of these happens, then the code will break out of the event loop.

If the window wasn't closed nor the Quit button clicked, then execution continues. The only thing that could have happened is the user clicked the "Ok" button. The last statement in the Event Loop is this one:

window['-OUTPUT-'].update('Hello ' + values['-INPUT-'] + "! Thanks for trying PySimpleGUI")

This statement updates the Text element that has the key -OUTPUT- with a string. window['-OUTPUT-'] finds the element with the key -OUTPUT-. That key belongs to our blank Text element. Once that element is returned from the lookup, then its update method is called. Nearly all elements have an update method. This method is used to change the value of the element or to change some configuration of the element.

If we wanted the text to be yellow, then that can be accomplished by adding a text_color parameter to the update method so that it reads:

window['-OUTPUT-'].update('Hello ' + values['-INPUT-'] + "! Thanks for trying PySimpleGUI",
                              text_color='yellow')

After adding the text_color parameter, this is our new resulting window:

The parameters available for each element are documented in both the call reference documentation as well as the docstrings. PySimpleGUI has extensive documentation to help you understand all of the options available to you. If you lookup the update method for the Text element, you'll find this definition for the call:

As you can see several things can be changed for a Text element. The call reference documentation is a valuable resource that will make programming in PySimpleGUI, uhm, simple.


Jump Start! Get the Demo Programs & Demo Browser ๐Ÿ”Ž

The over 300 Demo Programs will give you a jump-start and provide many design patterns for you to learn how to use PySimpleGUI and how to integrate PySimpleGUI with other packages. By far the best way to experience these demos is using the Demo Browser. This tool enables you to search, edit and run the Demo Programs.

To get them installed quickly along with the Demo Browser, use pip to install psgdemos:

python -m pip install psgdemos

or if you're in Linux, Mac, etc, that uses python3 instead of python to launch Python:

python3 -m pip install psgdemos

Once installed, launch the demo browser by typing psgdemos from the command line"

psgdemos

SNAG-1543


Layouts Are Funny LOL! ๐Ÿ˜†

Your window's layout is a "list of lists" (LOL). Windows are broken down into "rows". Each row in your window becomes a list in your layout. Concatenate together all of the lists and you've got a layout...a list of lists.

Here is the same layout as before with an extra Text element added to each row so that you can more easily see how rows are defined:

layout = [  [sg.Text('Row 1'), sg.Text("What's your name?")],
            [sg.Text('Row 2'), sg.Input()],
            [sg.Text('Row 3'), sg.Button('Ok')] ]

Each row of this layout is a list of elements that will be displayed on that row in your window.

Using lists to define your GUI has some huge advantages over how GUI programming is done using other frameworks. For example, you can use Python's list comprehension to create a grid of buttons in a single line of code.

These 3 lines of code:

import PySimpleGUI as sg

layout = [[sg.Button(f'{row}, {col}') for col in range(4)] for row in range(4)]

event, values = sg.Window('List Comprehensions', layout).read(close=True)

produces this window which has a 4 x 4 grid of buttons:

Recall how "fun" is one of the goals of the project. It's fun to directly apply Python's powerful basic capabilities to GUI problems. Instead of pages of code to create a GUI, it's a few (or often 1) lines of code.

Collapsing Code

It's possible to condense a window's code down to a single line of code. The layout definition, window creation, display, and data collection can all be written in this line of code:

event, values = sg.Window('Window Title', [[sg.Text("What's your name?")],[sg.Input()],[sg.Button('Ok')]]).read(close=True)

The same window is shown and returns the same values as the example showing the sections of a PySimpleGUI program. Being able to do so much with so little enables you to quickly and easily add GUIs to your Python code. If you want to display some data and get a choice from your user, it can be done in a line of code instead of a page of code.

By using short-hand aliases, you can save even more space in your code by using fewer characters. All of the Elements have one or more shorter names that can be used. For example, the Text element can be written simply as T. The Input element can be written as I and the Button as B. Your single-line window code thus becomes:

event, values = sg.Window('Window Title', [[sg.T("What's your name?")],[sg.I()],[sg.B('Ok')]]).read(close=True)

Code Portability

PySimpleGUI is currently capable of running on 4 Python GUI Frameworks. The framework to use is specified using the import statement. Change the import and you'll change the underlying GUI framework. For some programs, no other changes are needed than the import statement to run on a different GUI framework. In the example above, changing the import from PySimpleGUI to PySimpleGUIQt, PySimpleGUIWx, PySimpleGUIWeb will change the framework.

Import StatementResulting Window
PySimpleGUI
PySimpleGUIQt
PySimpleGUIWx
PySimpleGUIWeb

Porting GUI code from one framework to another (e.g. moving your code from tkinter to Qt) usually requires a rewrite of your code. PySimpleGUI is designed to enable you to have easy movement between the frameworks. Sometimes some changes are required of you, but the goal is to have highly portable code with minimal changes.

Some features, like a System Tray Icon, are not available on all of the ports. The System Tray Icon feature is available on the Qt and WxPython ports. A simulated version is available on tkinter. There is no support for a System Tray icon in the PySimpleGUIWeb port.

Runtime Environments

EnvironmentSupported
PythonPython 3.4+
Operating SystemsWindows, Linux, Mac
HardwareDesktop PCs, Laptops, Raspberry Pi, Android devices running PyDroid3
Onlinerepli.it, Trinket.com (both run tkinter in a browser)
GUI Frameworkstkinter, pyside2, WxPython, Remi

Integrations

Among the more than 200 "Demo Programs", you'll find examples of how to integrate many popular Python packages into your GUI.

Want to embed a Matplotlib drawing into your window? No problem, copy the demo code and instantly have a Matplotlib drawing of your dreams into your GUI.

These packages and more are ready for you to put into your GUI as there are demo programs or a demo repo available for each:

PackageDescription
MatplotlibMany types of graphs and plots
OpenCVComputer Vision (often used for AI)
VLCVideo playback
pymunkPhysics engine
psutilSystem environment statistics
prawnReddit API
jsonPySimpleGUI wraps a special API to store "User Settings"
weatherIntegrates with several weather APIs to make weather apps
midoMIDI playback
beautiful soupWeb Scraping (GitHub issue watcher example)

Installing ๐Ÿ’พ

Two common ways of installing PySimpleGUI:

  1. pip to install from PyPI
  2. Download the file PySimpleGUI.py and place in your application's folder

Pip Installing & Upgrading

The current suggested way of invoking the pip command is by running it as a module using Python. Previously the command pip or pip3 was directly onto a command-line / shell. The suggested way

Initial install for Windows:

python -m pip install PySimpleGUI

Initial install for Linux and MacOS:

python3 -m pip install PySimpleGUI

To upgrade using pip, you simply add 2 parameters to the line --upgrade --no-cache-dir.

Upgrade installation on Windows:

python -m pip install --upgrade --no-cache-dir PySimpleGUI

Upgrade for Linux and MacOS:

python3 -m pip install --upgrade --no-cache-dir PySimpleGUI

Single File Installing

PySimpleGUI was created as a single .py file so that it would be very easy for you to install it, even on systems that are not connected to the internet like a Raspberry Pi. It's as simple as placing the PySimpleGUI.py file into the same folder as your application that imports it. Python will use your local copy when performing the import.

When installing using just the .py file, you can get it from either PyPI or if you want to run the most recent unreleased version then you'll download it from GitHub.

To install from PyPI, download either the wheel or the .gz file and unzip the file. If you rename the .whl file to .zip you can open it just like any normal zip file. You will find the PySimpleGUI.py file in one of the folders. Copy this file to your application's folder and you're done.

The PyPI link for the tkinter version of PySimpleGUI is: https://pypi.org/project/PySimpleGUI/#files

The GitHub repo's latest version can be found here: https://raw.githubusercontent.com/PySimpleGUI/PySimpleGUI/master/PySimpleGUI.py

Now some of you are thinking, "yea, but, wait, having a single huge source file is a terrible idea". And, yea, sometimes it can be a terrible idea. In this case, the benefits greatly outweighed the downside. Lots of concepts in computer science are tradeoffs or subjective. As much as some would like it to be, not everything is black and white. Many times the answer to a question is "it depends".

Galleries ๐ŸŽจ

Work on a more formal gallery of user-submitted GUIs as well as those found on GitHub is underway but as of this writing it's not complete. There are currently 2 places you can go to see some screenshots in a centralized way. Hopefully, a Wiki or other mechanism can be released soon to do justice to the awesome creations people are making.

User Submitted Gallery

The first is a user submitted screenshots issue located on the GitHub. It's an informal way for people to show off what they've made. It's not ideal, but it was a start.

Massive Scraped GitHub Images

The second is a massive gallery of over 3,000 images scraped from 1,000 projects on GitHub that are reportedly using PySimpleGUI. It's not been hand-filtered and there are plenty of old screenshots that were used in the early documentation. But, you may find something in there that sparks your imagination.


Uses for PySimpleGUI ๐Ÿ”จ

The following sections showcase a fraction of the uses for PySimpleGUI. There are over 1,000 projects on GitHub alone that use PySimpleGUI. It's truly amazing how possibilities have opened up for so many people. Many users have spoken about previously attempting to create a GUI in Python and failing, but finally achieving their dreams when they tried PySimpleGUI.

Your First GUI

Of course one of the best uses of PySimpleGUI is getting you into making GUIs for your Python projects. You can start as small as requesting a filename. For this, you only need to make a single call to one of the "high-level functions" called popup. There are all kinds of popups, some collect information.

popup on itself makes a window to display information. You can pass multiple parameters just like a print. If you want to get information, then you will call functions that start with popup_get_ such as popup_get_filename.

Adding a single line to get a filename instead of specifying a filename on the command line can transform your program into one that "normal people" will feel comfortable using.

import PySimpleGUI as sg

filename = sg.popup_get_file('Enter the file you wish to process')
sg.popup('You entered', filename)

This code will display 2 popup windows. One to get the filename, which can be browsed to or pasted into the input box.

img

The other window will output what is collected.

img


 

Rainmeter-Style Windows

imgThe default settings for GUI frameworks don't tend to produce the nicest looking windows. However, with some attention to detail, you can do several things to make windows look attractive. PySimpleGUI makes it easier to manipulate colors and features like removing the title bar. The result is windows that don't look like your typical tkinter windows.

Here is an example of how you can create windows that don't look like your typical tkinter in windows. In this example, the windows have their titlebars removed. The result is windows that look much like those found when using Rainmeter, a desktop widget program.



You can easily set the transparency of a window as well. Here are more examples of desktop widgets in the same Rainmeter style. Some are dim appearing because they are semi-transparent.img

Both of these effects; removing the titlebar and making a window semi-transparent, are achieved by setting 2 parameters when creating the window. This is an example of how PySimpleGUI enables easy access to features. And because PySimpleGUI code is portable across the GUI frameworks, these same parameters work for the other ports such as Qt.

Changing the Window creation call in Example 1 to this line of code produces a similar semi-transparent window:

window = sg.Window('My window', layout, no_titlebar=True, alpha_channel=0.5)

Games

While not specifically written as a game development SDK, PySimpleGUI makes the development of some games quite easy.

imgThis Chess program not only plays chess, but it integrates with the Stockfish chess-playing AI.

imgSeveral variants of Minesweeper have been released by users.

img

img

Card games work well with PySimpleGUI as manipulating images is simple when using the PySimpleGUI Graph element.

While not specifically written as a game development SDK, PySimpleGUI makes development of some games quite easy.
Media Capture and Playback

img

Capturing and displaying video from your webcam in a GUI is 4 lines of PySimpleGUI code. Even more impressive is that these 4 lines of code work with the tkinter, Qt, and Web ports. You can display your webcam, in realtime, in a browser using the same code that displays the image using tkinter.

Media playback, audio and video, can also be achieved using the VLC player. A demo application is provided to you so that you have a working example to start from. Everything you see in this readme is available to you as a starting point for your own creations.
Artificial Intelligence

img

AI and Python have long been a recognized superpower when the two are paired together. What's often missing however is a way for users to interact with these AI algorithms familiarly, using a GUI.

These YOLO demos are a great example of how a GUI can make a tremendous difference in interacting with AI algorithms. Notice two sliders at the bottom of these windows. These 2 sliders change a couple of the parameters used by the YOLO algorithm.

If you were tuning your YOLO demo using only the command line, you would need to set the parameters, once, when you launch the application, see how they perform, stop the application, change the parameters, and finally restart the application with the new parameters.

img

Contrast those steps against what can be done using a GUI. A GUI enables you to modify these parameters in real-time. You can immediately get feedback on how they are affecting the algorithm.
img

There are SO many AI programs that have been published that are command-line driven. This in itself isn't a huge hurdle, but it's enough of a "pain in the ass" to type/paste the filename you want to colorize on the command line, run the program, then open the resulting output file in a file viewer.

GUIs have the power to change the user experience, to fill the "GUI Gap". With this colorizer example, the user only needs to supply a folder full of images, and then click on an image to both colorize and display the result.

The program/algorithm to do the colorization was freely available, ready to use. What was missing is the ease of use that a GUI could bring.


Graphing

img

Displaying and interacting with data in a GUI is simple with PySimpleGUI. You have several options.

You can use the built-in drawing/graphing capabilities to produce custom graphs. This CPU usage monitor uses the Graph element

img

Matplotlib is a popular choice with Python users. PySimpleGUI can enable you to embed Matplotlib graphs directly into your GUI window. You can even embed the interactive controls into your window if you want to retain the Matplotlib interactive features.

imgUsing PySimpleGUI's color themes, you can produce graphs that are a notch above default graphs that most people create in Matplotlib.


Front-ends

img

The "GUI Gap" mentioned earlier can be easily solved using PySimpleGUI. You don't even need to have the source code to the program you wish to add a GUI onto. A "front-end" GUI is one that collects information that is then passed to a command-line application.

Front-end GUIs are a fantastic way for a programmer to distribute an application that users were reluctant to use previously because they didn't feel comfortable using a command-line interface. These GUIs are your only choice for command-line programs that you don't have access to the source code for.

This example is a front-end for a program called "Jump Cutter". The parameters are collected via the GUI, a command-line is constructed using those parameters, and then the command is executed with the output from the command-line program being routed to the GUI interface. In this example, you can see in yellow the command that was executed.


Raspberry Pi

img

Because PySimpleGUI is compatible back to Python 3.4, it is capable of creating a GUI for your Raspberry Pi projects. It works particularly well when paired with a touchscreen. You can also use PySimpleGUIWeb to control your Pi if it doesn't have a monitor attached.


Easy Access to Advanced Features

img

Because it's very easy to access many of the underlying GUI frameworks' features, it's possible to piece together capabilities to create applications that look nothing like those produced using the GUI framework directly.

For example, it's not possible to change the color/look-and-feel of a titlebar using tkinter or the other GUI packages, but with PySimpleGUI it's easy to create windows that appear as if they have a custom titlebar.
img

Unbelievably, this window is using tkinter to achieve what appears to be something like a screensaver.

On windows, tkinter can completely remove the background from your application. Once again, PySimpleGUI makes accessing these capabilities trivial. Creating a transparent window requires adding a single parameter to the call that creates your Window. One parameter change can result in a simple application with this effect:

You can interact with everything on your desktop, clicking through a full-screen window.


Themes

Tired of the default grey GUIs? PySimpleGUI makes it trivial for your window to look nice by making a single call to the theme function. There are over 150 different color themes available for you to choose:

img

With most GUI frameworks, you must specify the color for every widget you create. PySimpleGUI takes this chore from you and will automatically color the Elements to match your chosen theme.

To use a theme, call the theme function with the name of the theme before creating your window. You can add spaces for readability. To set the theme to "Dark Grey 9":

import PySimpleGUI as sg sg.theme('dark grey 9')

This single line of code changes the window's appearance entirely:

img

The theme changed colors of the background, text, input background, input text, and button colors. In other GUI packages, to change color schemes like this, you would need to specify the colors of each widget individually, requiring numerous changes to your code.


Distribution

Want to share your PySimpleGUI program with friends and family that don't have Python installed on their computer? Try the GUI front-end for PyInstaller that you'll find in the psgcompiler project.


Support ๐Ÿ’ช

Your first stop should be the documentation and demo programs.

Be sure and install the Demo Browser (instructions in the Cookbook) so that you can search and run the 100s of demo programs.

If you still have a question or need help... no problem... help is available to you, at no cost. Simply file an Issue on the PySimpleGUI GitHub repo and you'll get help.

Nearly all software companies have a form that accompanies bug reports. It's not a bad trade... fill in the form, get free software support. This information helps get you an answer efficiently.

In addition to requesting information such as the version numbers of PySimpleGUI and underlying GUI frameworks, you're also given a checklist of items that may help you solve your problem.

Please fill in the form. It may feel pointless to you. It may feel painful, despite it taking just a moment. It helps get you a solution faster. If it wasn't useful and necessary information to help you get a speedy reply and fix, you wouldn't be asked to fill it out. "Help me help you".

Supporting img

Financial support for the project is greatly appreciated. To be honest, financial help is needed. It's expensive just keeping the lights on. The domain name registrations, a long list of subscriptions for things like Trinket, consulting help, etc., quickly add up to a sizable recurring cost.

PySimpleGUI wasn't inexpensive to create. While a labor of love, it was very laborious over several years, and quite a bit was invested, and continues to be invested, in creating what you see today.

PySimpleGUI has an open-source license and it would be great if it could remain that way. If you or your company (especially if you're using PySimpleGUI in a company) are benefiting financially by using PySimpleGUI, you have the capability of extending the life of the project for you and other users.

Buy Me A Coffee

Buy Me a Coffee is a great way to publicly support developers. It's quick, easy, and your contribution is recorded so that others can see that you're a supporter of PySimpleGUI. You can also choose to make your donation private.

Buy Me A Coffee

GitHub Sponsoring

The GitHub recurring sponsorship is how you can sponsor the project at varying levels of support on an ongoing basis. It's how many Open Source developers are able to receive corporate level sponsorship.

Your help in financially contributing to the project would be greatly appreciated. Being an Open Source developer is financially challenging. YouTube video creators are able to make a living creating videos. It's not so easy yet for Open Source developers.

Thank you for the Thank You's

To everyone that's helped, in whatever fashion, I'm very very grateful.

Even taking a moment to say "thank you" helps, and a HUGE number of you have done that. It's been an amazing number actually. I value these thanks and find inspiration in the words alone. Every message is a little push forward. It adds a little bit of energy and keeps the whole project's momentum. I'm so very grateful to everyone that's helped in whatever form it's been.

Contributing ๐Ÿ‘ท

While PySimpleGUI is currently licensed under an open-source license, the project itself is structured like a proprietary product. Pull Requests are not accepted.

One of the best ways for you to contribute code is to write and publish applications. Users are inspired by seeing what other users build. Here's a simple set of steps you can take - Create a GitHub repo, post the code, and include a screenshot in your repo's readme file. Then come back to the PySimpleGUI repo and post a screenshot in Issue #10 or in the project's WIKI.

If there is a feature missing that you need or you have an enhancement to suggest, then open an Issue

Special Thanks ๐Ÿ™

The PySimpleGUI team is tiny and they're all superstars. Every week I've been stunned by what they do. Dream-team is an understatement. Simply put @Chr0nicT, @jason990420, @Snaiel and Mike@PySimpleGUI are PySimpleGUI.

This version of the PySimpleGUI readme wouldn't have come together without the help from @M4cs. He's a fantastic developer and has been a PySimpleGUI supporter since the project's launch. @israel-dryer is another long-term supporter and has written several PySimpleGUI programs that pushed the envelope of the package's capabilities. The unique minesweeper that uses an image for the board was created by Israel. @jason990420 surprised many when he published the first card game using PySimpleGUI that you see pictured above as well as the first minesweeper game made with PySimpleGUI. @Chr0nicT is the youngest developer I've worked with, ever, on projects. This kid shocks me on a regular basis. Ask for a capability, such as the PySimpleGUI GitHub Issues form error checking bot, and it simply happens regardless of the technologies involved. I'm fortunate that we were introduced. Someday he's going to be whisked away, but until then we're all benefiting from his talent. @Snaiel made the Udemy course happen. It wouldn't have been 1/4th of what it is without his amazing skills in video production, course design, marketing brilliance, and web programming. The Japanese version of the readme was greatly improved with help from @okajun35. @nngogol has had a very large impact on the project, also getting involved with PySimpleGUI in the first year of initial release. He wrote a designer, came up with the familiar window[key] lookup syntax, wrote the tools that create the documentation, designed the first set of doc strings as well as tools that generate the online documenation using the PySimpleGUI code itself. PySimpleGUI would not be where it is today were it not for the help of these individuals.

The more than 4,000 GitHub repos that use PySimpleGUI are owed a "Thank You" as well, for it is you that has been the inspiration that fuels this project's engine.

The overseas users that post on Twitter overnight are the spark that starts the day's work on PySimpleGUI. They've been a source of positive energy that gets the development engine started and ready to run every day. As a token of appreciation, this readme file has been translated into Japanese.

PySimpleGUI users have been the best user community an Open Source developer could hope for. I've never seen expressions of gratitude and joy like PySimpleGUI users show on a daily basis.

ยฉ Copyright 2021, 2022 PySimpleGUI

Statistics ๐Ÿ“ˆ

PyPI Statistics & Versions

TKTK 2.7QtWxPythonWeb (Remi)
tkintertkinter 2.7 downloadsqtwxweb
tkintertkinter27DownloadsDownloadsDownloads
tkintertkinter 2.7qtwxweb
PyPI pyversionsPyPI pyversionsPyPI pyversionsPyPI pyversionsPyPI pyversions

GitHub Statistics

IssuesCommit ActivityStarsDocs
GitHub issuescommit activitystarsDocumentation Status
GitHub closed issueslast commit  


Author: PySimpleGUI
Source Code: https://github.com/PySimpleGUI/PySimpleGUI 
License: LGPL-3.0 License

#python #gui #games 

PySimpleGUI: Python GUIs for Humans
lakshya world

lakshya world

1643342928

WHAT IS THE BEST WAY TO DEVELOP A POKER GAME APP?

The popularity of the game of poker  has gone beyond imagination with the rise of smartphone usage. The game of poker has seen a revolutionary development thanks to the fast internet services. Nowadays many different players enjoy these games using real money and in return earn real money. There are millions of people who like this card game. Modern card game programmers use the latest technology to provide the most up-to-date poker  platform.

                                          Do you want to develop your own poker game a โ†’  poker app development

Currently, there are many online poker players around the world, that's why many poker game development Company  are working to provide poker game software solutions. In this article, we  discussed the important factors that should be considered when creating the best  online poker platform.

What Are The Advantages of Online Poker Games?

1. Convenience - Poker is almost as close to your nearest desktop, laptop or mobile device as possible. No need to drive, park,  take public transit, or even walk outside your building. No need to queue, you can play poker online from the comfort of your own home. No need to carry a large amount of money or buy gas for the car. Just sit back in a comfortable chair, turn on your device and start playing. 

2. Learning the ropes - Many new players are a bit uneasy about jumping into a live poker game at a casino with a table full of what they may perceive as real poker sharks.

 

3. Tournament Time - For players who prefer tournaments to cash games, playing online is a pleasure. Most sites offer ongoing tournaments with buy-ins of any size, from as little as a dollar or two  to thousands of dollars. 

Even low buy-in events offer a chance to get a high score. Some sites also offer major tournament series with the added incentive of hosting a big event with a good payday.

4.Unlimited playing time - The offline version of the poker game has a limited playtime. This long-term availability allows players to play for as long as they like. It also helps them hone their gaming skills. Users also have a wide selection of cash games and tournaments.

5. Safe and secure transactions - Today's players choose games with safe and secure transactions. This is why the best poker game development companies rely on the most reliable payment gateways. This makes  players trust the platform.

What Is The Process of Poker Game Software Development?

The poker game development company or poker software developer comes up with the most suitable plan  deemed suitable for the development of poker games in order to fulfil all  the prerequisites for a successful poker game business. That's why poker operators should discuss the whole setup and plan to understand the entire poker game development process, cost, budget allocation and time consumption behind the whole thing. procedure. You need to hire dedicated card game developers to get the most suitable card software. 

1. Strategy - This step is a very important step. This provides the entire process of creating online poker  software. This strategic planning includes various processes such as development, implementation and end results.

2. Developing the final version - Once the prototype was approved, the poker game design team and the poker software development team worked together to produce the final, official poker game software. Here, the poker game development company takes care of the designs and lines of the poker table, cards, characters, chips, and more. with backend development and algorithms supporting the stability of the poker game software  for integration with any website or  mobile app.

3. Testing - Once poker software development is complete, poker software goes through a number of tests and quality checks to deliver the best quality standards,  code reviews to detect bugs, bugs or any other changes that could destabilise the poker game in the future.

4. Launch - After successfully completing the poker game software testing service, make sure that the poker game software is error-free, completely stable,  poker game operators or game room owners can plan Their publishers can plan to launch by integrating them with an online poker game website or building a poker app platform for Android or iOS app stores.

Estimated Cost For Developing a Poker App

Determining the exact cost of developing a poker game application is not possible until  the requirements, functions and features of the game platform are determined in advance. However, by looking at some of the essential factors that affect development costs, it is possible to get a basic idea of โ€‹โ€‹the cost of a draw poker game application.

The location of  online poker software providers plays an important role in determining the cost of developing a draw poker application. Furthermore, the time taken by the application developers, who are driven by the complexity of the project, is also taken into account when estimating the price.

The number of platforms  you target also affects the cost of app poker game development. The higher the number of backgrounds, the higher the price will be. However, it is also important to note that the higher platforms you are targeting will ultimately increase the ROI of the project.

The features you choose to integrate are another factor that affects the price. Advanced poker apps are more expensive than those that provide basic functionality. However, enhanced customer experience will be the sole focus when choosing features to integrate.

All of the above factors increase the price of developing a poker game application. Summing up all the criteria  mentioned above, the cost of developing a poker game can start from $3,000 and reach  around $5,000. However, this is only a rough idea and the actual application development cost  can be much higher than expected.

Read More - game development company

#games 
 

Dexter  Goodwin

Dexter Goodwin

1643281200

JavaScript Library to Add Voice Commands To Your Sites, Apps Or Games

Voix JS

A JavaScript library to add voice commands to your sites, apps or games.

NOTE: At this time, this library is only compatible with Google Chrome.

Installation

$ component install pazguille/voix

See: https://github.com/component/component

Standalone

You can use the standalone version:

<script src="voix.js"></script>

How-to

Create a new instance of Voix.

var voix = new Voix('en-US');

API

Voix(lang)

Create a new instance of Voix.

  • lang: A given language.
var voix = new Voix('en-US');

Voix#setCommand(command, listener)

Sets a new command with a listener to the collection.

  • command - A given command.
  • listener - A given listener.
voix.setCommand('play', playVideo);

Voix#removeCommand(command, listener)

Removes a given command or its listener from the collection.

  • command - A given command to remove.
  • listener [optional] - A given listener to remove.
voix.removeCommand('play', playVideo);

// or

voix.removeCommand('play');

Voix#start()

Starts the recognition.

voix.start();

Voix#stop()

Stops the recognition.

voix.stop();

Maintained by

Author: Pazguille
Source Code: https://github.com/pazguille/voix 
License: MIT License

#javascript #games 

JavaScript Library to Add Voice Commands To Your Sites, Apps Or Games
Reid  Rohan

Reid Rohan

1626718560

Build a Simple Chess AI in JavaScript

As a fun side project, I have implemented a simple chess AI using JavaScript. You can find the full source code for this tutorial in my GitHub repository.

Chess is a great game. Itโ€™s even better if youโ€™re good at it. Regrettably, Iโ€™ve never taken the time to learn chess strategy, so I decided to rely on the power of computation and game theory instead! As a fun side project, I have implemented a simple chess AI using JavaScript.

You can find the full source code for this tutorial in my  GitHub repository.

The final product is playable  here.

Prerequisites

You should know basic programming and the general concept of a tree data structure. Everything else will be covered as part of this tutorial.

The two main algorithms involved are the  minimax algorithm and  alpha-beta pruning. These will be explained in-depth later on, and should be relatively simple to grasp if you have experience in programming.

First Things Firstโ€ฆ

Getting the GUI and game mechanics out of the way. This allows us to direct our focus towards only the most fascinating aspect of the application: the decision-making (AI) part! For this, we will be using external libraries:

  • chessboard.js handles the graphical interface, i.e. the chess board itself.
  • chess.js handles the game mechanics, such as move generation / validation.

With these libraries, you should be able to create a working chess game by following the  examples (5000 through 5005 in particular) on the chessboard.js website.

Prerequisites

You should know basic programming and the general concept of a tree data structure. Everything else will be covered as part of this tutorial.

The two main algorithms involved are the  minimax algorithm and alpha-beta pruning. These will be explained in-depth later on, and should be relatively simple to grasp if you have experience in programming.

First Things Firstโ€ฆ

Getting the GUI and game mechanics out of the way. This allows us to direct our focus towards only the most fascinating aspect of the application: the decision-making (AI) part! For this, we will be using external libraries:

  • chessboard.js handles the graphical interface, i.e. the chess board itself.
  • chess.js handles the game mechanics, such as move generation / validation.

With these libraries, you should be able to create a working chess game by following the  examples (5000 through 5005 in particular) on the chessboard.js website.

#javascript #games #ai

Build a Simple Chess AI in JavaScript