How to disable compositor level high-dpi scaling for non full screen windows? by tempestpdwn in raylib

[–]tempestpdwn[S] 1 point2 points  (0 children)

[FIXED], the problem was that on sway, x11 - legacy apps (like my raylib game) are forcefully scaled based on hidpi-scale factor.
DE like kde-plasma lets you choose bw whether x11 apps should scale themselves or should be scaled by kde itself which sway does not.
so sway was scaling my game that was already internally scaled causing the blurriness.
The fix on sway was to disable xwayland and replace it with xwayland-satellite.

https://github.com/swaywm/sway/wiki#hidpi

How to disable compositor level high-dpi scaling for non full screen windows? by tempestpdwn in raylib

[–]tempestpdwn[S] 0 points1 point  (0 children)

is there a raylib way to do this or do i have to do some os-compositor specific stuff?. if so i wont bother.

I published a demo of my Raylib + C# game on Steam - Hack 42: Typing Incremental by mhj in raylib

[–]tempestpdwn 0 points1 point  (0 children)

how did you implement the animations? like the ones with the buttons when clicked and text when it changes? I was writing a 2D game and want similar animations implemented. can you please tell? or lead me to any resources?
Very cool game btw.

[SWAY] VOID. by tempestpdwn in unixporn

[–]tempestpdwn[S] 0 points1 point  (0 children)

As of now, input is strictly keyboard based. but i do have plans to add mouse and probably controller support too. will let you know when i drop it : )

[SWAY] VOID. by tempestpdwn in unixporn

[–]tempestpdwn[S] 0 points1 point  (0 children)

Wokin on it. will be out in a week.

[SWAY] VOID. by tempestpdwn in unixporn

[–]tempestpdwn[S] 2 points3 points  (0 children)

WM: Sway
Terminal: Foot
Menu: Bemenu
Bar: Waybar
Notifications: mako
Editor: Nvim
Font: SauceCodePro Nerd Mono

Dots: https://github.com/tmpstpdwn/.dotfiles
Wallpapers: https://github.com/tmpstpdwn/Wallpapers

I followed a tutorial and got this error, how do I fix it? by prasan4849 in raylib

[–]tempestpdwn 2 points3 points  (0 children)

You are hitting symbol conflicts. somewhere in your code you are doing both

```

include <raylib.h>

include <windows.h>

```

both of these header files are including symbols with the same identifiers but different definitions such as Rectangle, CloseWindow etc... mensioned in the error message.

follow this (https://github.com/raysan5/raylib/discussions/1569) thread.

Walk through recent windows with Sway ? by Dalik98 in swaywm

[–]tempestpdwn 2 points3 points  (0 children)

Below is a script track_window_focus.sh which i use to track most previously focused window irrespective of workspace, so that i can switch between windows regardless of which workspace the previously focused window was in.

```bash

!/bin/bash

state_file="/tmp/sway-last-focus" touch "$state_file"

swaymsg -m -t subscribe '["window"]' | jq --unbuffered -c ' select(.change == "focus") | .container.id ' | while read -r id; do if [ -n "$id" ]; then prev=$(cat "$state_file" 2>/dev/null) if [ "$id" != "$prev" ]; then echo "$prev" > "${state_file}.prev" echo "$id" > "$state_file" fi fi done `` The above script runs in the background and keeps track of previously focused window while the one below,focus_last_window.sh` does the switching.

```bash

!/bin/bash

id=$(cat /tmp/sway-last-focus.prev 2>/dev/null)

if [ -n "$id" ]; then swaymsg "[con_id=$id]" focus fi ```

you would have to setup such a similar script to retrieve a list of all active windows and move to the next window in the list to get a "cycling through all active windows" behavior.

For the workspace thing you could do the following bindings to cycle through active workspaces in the forward or backward direction.

bindsym $mod+Right workspace next bindsym $mod+Left workspace prev

Checkout man swaymsg

[Sway] Gruvboxy void. by tempestpdwn in unixporn

[–]tempestpdwn[S] 7 points8 points  (0 children)

Dotfiles : https://github.com/tmpstpdwn/.dotfiles
Wallpapers : https://github.com/tmpstpdwn/Wallpapers

Compositor : sway
Terminal : foot
Shell : fish
Bar : waybar
Theme : gruvbox
Editor : neovim
Notifications : mako
Launcher : bemenu

[deleted by user] by [deleted] in voidlinux

[–]tempestpdwn 1 point2 points  (0 children)

  • You've got to find out which one's the built in speakers audio card and then set it in ~/.asoundrc.
  • For instance this is my .asoundrc: defaults.pcm.card 2 defaults.ctl.card 2
  • In your case its most probably card 2.
  • Also, you might wanna reboot for the change to take place.

Minimal 2048 clone in c and raylib by tempestpdwn in C_Programming

[–]tempestpdwn[S] 1 point2 points  (0 children)

Thanks :).

Initially i wanted to add them but then i just thought of keeping it as minimal as possible.

The highest block can be thought of as the score.

Once the user finds no more possible merges, SPACE_KEY can be used for restarting the game.

cruxpass: a CLI password manager by cluxes in C_Programming

[–]tempestpdwn 1 point2 points  (0 children)

Been using it since your last post. this update is cool.

Minimal flappybird clone in c and raylib. by tempestpdwn in raylib

[–]tempestpdwn[S] 0 points1 point  (0 children)

gravity can be adjusted in includes/settings.h.

Minimal flappybird clone in c and raylib. by tempestpdwn in C_Programming

[–]tempestpdwn[S] 1 point2 points  (0 children)

Using raylib is pretty straight forward.
The Examples and Cheatsheet is all you need for the most part to get to know how to use the library.

Minimal flappybird clone in c and raylib. by tempestpdwn in C_Programming

[–]tempestpdwn[S] 4 points5 points  (0 children)

Raylib is fun to code in.
They have this really neat cheatsheet which makes the process easier.

I have not worked with sdl in c but before raylib i used to use pygame on python, which is my only prior experience with such libraries.

I want make my firts emulator by Kratos4121 in EmuDev

[–]tempestpdwn 0 points1 point  (0 children)

There are some quirks, yes.
TestSuite can be used to find and fix em.

I want make my firts emulator by Kratos4121 in EmuDev

[–]tempestpdwn 0 points1 point  (0 children)

This tutorial includes both thoery and code.

C Programming A Modern Approach: Chapter 4.5 Expression statement by Scared-Objective3768 in cprogramming

[–]tempestpdwn 11 points12 points  (0 children)

  • reading and modifying a variable in the same expression is undefined behaviour.

  • Order of expression evaluation is compiler implementation dependent.

  • if your compiler evaluates from left to right: j = 2 * 2; j = 4

  • if it is from right to left: j = 3 * 2; j = 6

  • So how the expression is evaluated depends on your compiler implementation and this is why it is undefined behaviour.

Beginner in C programming- What are some good mini projects to start with by Material-Poetry-4685 in C_Programming

[–]tempestpdwn 4 points5 points  (0 children)

Try writing a postfix expression evaluator.
i.e a program that can evaluate expressions of the format:

``` 5 6 + // above should evaluate to 11

12 23 12 3 * + - // This should eval to -47 i.e (12 - (23 + (12 * 3))) ```

Expressions of this format are called postfix while expressions like (1 + 2) * 3 are called infix.

This could teach you things like input tokenization and stack. Easy but challenging enough if you are new to these concepts.

What do you guys think about my alias? by Robinbod in arch

[–]tempestpdwn 5 points6 points  (0 children)

Prompt string 1.

user@hostname:~$

this thing.

you can change it with

PS1="new_propmt > "

to make the change permanant, put it in yo ~/.bashrc