This is embarrassing, but when was it not?
I have to add a “.” before the name of a css
class, I must learn my tools.
This is embarrassing, but when was it not?
I have to add a “.” before the name of a css
class, I must learn my tools.
If you only need it for the interface, a shit workaround would be to prefix all text with an RLM (RIGHT-TO-LEFT Mark).
Unfortunately no, I expect users to enter Arabic text as well.
Fast iteration is already fixed by using cranelift in your release-dev profile (or whatever you want to call it), and mold as a linker.
Maybe, I didn’t try that before, but I don’t expect Cranelift to match the speeds gtk-rs
is currently giving me; Cranelift also doesn’t solve the problem of rust-analyzer
acting crazy.
Okay, something helpful instead: Did you try asking in the
rust:gnome.org
matrix room mentioned in the project page?
No, I prefer public posts to prevent effort duplication, so much so that my mind started filtering out such things on project pages, but thanks for reminding me.
Before anyone suggests another library:
Iced
and Egui
both can’t handle Arabic, which is a deal breaker.Iced
takes forever to compile and iterate, maybe that’ll be fixed with dynamic linking.Relm
: I didn’t know it existed before I started this project.Qt
bindings: IDK I forgot Qt
existed, I was always more of GNOME* guy.* GNU Network Object something Environment
Oh no don’t get me wrong, a year back I upgraded to an I5-7500 prebuilt, and it’s a beast for all my tasks. (maybe compiling is quick because I split modules a little too much?)
Your advice is good for not knowing what I’m making. If I was making something multi threaded with much state I would fear UB more.
may be much rarer in Debug because of speed difference
Thanks, then I will remember to recreate bugs with opt-level = 3
.
Wait no, this doesn’t make sense if I don’t have access to the user’s machine, maybe I should send him a log-heavy version of some sort? How should I even what I am supposed to log? I should think about this some more before release.
Do you have any sources about this “unfitness” of Rust for gamedev? From my experience many people have problems with the borrow checker due to habits they obtained coding in other languages.
I can’t say anything for sure, but I read this article, in conjunction with this article, before I made this post, so you might consider looking at it, and how it influenced me.
Edit: wait, I’ll extend this reply even more.
Edit 2: Done:
So I’d be interested what special behavior occurs in gamedev that makes coding in Rust more difficult than for other software.
Maybe it’s because the gaming industry is historically among the slowest industries, they stuck with DOS until there was literally no drivers on it for the latest GPUs, only then did they upgrade. There’s a video explaining how a recent AAA game could run on the steam deck, but not on Linux, it turns out the game was using a Windows XP library that’s too old for wine to support, so how did it work on the deck? they effectively added this to their code:
if platform_name == "steamdeck" { use_modern_library() }
, which explains why it only ran on the deck, but notice how they still stuck to the ~2003 library as the default even though the modern one works, that’s how much they hate change.
Considering the above, suggesting they change the particular way of their forefathers wouldn’t be fruitful, unless extremely obvious B I G gains are to be found. Notice how Jonathan Blow’s game development language is literally ‘C++
but better’, and how it mimics C++ in everything but the universally hated parts, and adds none but the universally wanted features. (as universal as an industry can agree on anything, that is)
That may be because games are a dangerous business, you pool all your resources in one project, and you get basically no income for up to four years, then you release and possibly succeed.
I also speculate that games aren’t really maintained, most of the best games I know only received 3 patches at most (version 1.3
). I think the priority isn’t: “How am I gonna remember how this works in 3 months from now and deal with technical dept”, it’s more like: “How can I implement this in a way that the only thing faster than the implementation time is the feature itself?”, so there is no fear of possibly breaking something that the checker can save you from down the road.
The last sentence kinda doesn’t make sense since the first 3 years are more that enough technical dept for Rust to start doing its thing, but IDK how they think.
Bonus: look for Jonathan Blow’s opinions on Rust on Youtube, he is an example of a studio owner fearing the risk of the possible “friction” that the Borrow checker could possibly cause.
Hello Pers,
I made a mistake when writing the post, it reads like I am against the borrow checker, which I am not, I love the checker, and didn’t encounter any - major - problems with it.
I meant that even if we used unsafe
everywhere it would still be a good language, which is an attempt at arguing with those saying that Rust isn’t fit for gamedev because the of the checker. Which I failed at due to lack of experience, as this is my first time making a game, and Rust is my first language*.
Regarding: “If it doesn’t panic in Debug, it won’t act weird on Release”, even if I got reported a really weird bug related to UB, I should (I am not experienced enough to make a claim) be able to know it’s UB since the game’s gonna crash when I try to recreate the bug in Debug.
Some would say that shipping the game with runtime checks won’t have an effect on performance, which is probably true, since it’s so simple the list of entities is an array (not a vector), and the game state is - effectively - global (everything is impl CombatContext { fn x(&mut self) {} }
)**, and some (most? too early in development to tell) of the game is locked at 5fps (maybe I’ll bump it up a bit)***.
I am so concerned about performance because I had to daily drive a computer that most people on this website - and especially on Reddit - would consider garbage E-waste, for 4 years, and was trying hard to play games on it, which was further amplified by my GPU not supporting Vulkan
(nor Dx9 for some time), which meant I couldn’t use Proton
, which taught me some hacks that are… let’s not talk about them.
So I find huge pain in leaving any possible performance optimizations, especially that some people I know are stuck on - arguably - worse machines****; accessibility is a big priority.
It also makes me angry to see pixel games come with 70Mib binaries and require Vulkan
because:
1 - internet costs money
2 - they claim in the system requirements that their game “Should run on anything”.
Memes like: “Oh my game could run on a potato” infuriate me (good thing I don’t use social media), NO, your game can’t run a potato, DooM can, it was actually optimized properly, your 2D pixels can’t even render on a machine a 100x more powerful, you should feel ashamed*(5).
*: I was messing around with C# + Godot not super long ago, nothing serious.
**: I have been refactoring my code lately to limit the scope of most functions, in a way inspired by ECS
s, but significantly more primitive.
***: the game has both a 3D and a 2D part, the 2D part has locked FPS, the 3D part can run at any framerate.
****: Macroquad supporting OpenGL only down to 2.0ES would be a problem, if I wasn’t intending on forking it anyway to reduce the binary size (grim is an extremely bloated dependency, I managed to shove off 10 Mib in a few hours), and unless using 1.x is as hard people on the internet claim it is, which is probably false, as these people are mostly weak and say the same things about using a custom engine.
*(5): this might sound toxic, but that’s how people get better.
I first misread this as “America” and immediately clicked the link, I am disappointed.
I just got some idea yesterday regarding impl
blocks, ready to be my respondent?
I had a big impl
block with 4 levels of indentation, so I cut the block, and replaced
impl InputList {
//snip
}
with mod impl_inputlist;
and moved the impl
block to a new file, and did not indent anything inside that block.
The advantage this has over just not indenting the impl
block in place, is that people will have difficulty distinguishing between what’s in the block and what’s outside, and that’s why the impl
was moved to its own exclusive file, impl_inputlist.rs
Maybe I am overstressing indentation. Ss there something wrong with my setup that prevents me from accepting 4-space indentation?
I use:
Editor: Neovide
Font: “FiraCode Nerd Font Mono:h16” (16px fonts are addicintg)
Monitor: 1366x768, 18.5 inch, 10+ years old, frankenstein-ly repaired Samsung monitor.
Distance: I sit at about 40-60 Cm from my monitor.
That leaves me with a 32x99 view of code excluding line numbers and such.
Formatters are off-topic for this, styles come first, formatters are developed later.
My other reply:
How about this one? it more closely mirrors the switch example:
match suffix { 'G' | 'g' => mem -= 30, 'M' | 'm' => mem -= 20, 'K' | 'k' => mem -= 10, _ => {}, }
How about this other one? it goes as far as cloning the switch example’s indentation:
match suffix { 'G' | 'g' => { mem -= 30; } 'M' | 'm' => { mem -= 20; } 'K' | 'k' => { mem -= 10; } _ => {}, }
How about this one? it more closely mirrors the switch example:
match suffix {
'G' | 'g' => mem -= 30,
'M' | 'm' => mem -= 20,
'K' | 'k' => mem -= 10,
_ => {},
}
How about this other one? it goes as far as cloning the switch example’s indentation:
match suffix {
'G' | 'g' => {
mem -= 30;
}
'M' | 'm' => {
mem -= 20;
}
'K' | 'k' => {
mem -= 10;
}
_ => {},
}
A single match statement inside a function inside an impl is already 4 levels of indentation.
How about this?
The preferred way to ease multiple indentation levels in a
switch
statement is to align theswitch
and its subordinatecase
labels in the same column instead of double-indenting the case labels. E.g.:
switch (suffix) {
case 'G':
case 'g':
mem <<= 30;
break;
case 'M':
case 'm':
mem <<= 20;
break;
case 'K':
case 'k':
mem <<= 10;
/* fall through */
default:
break;
}
I had some luck applying this to match
statements. My example:
let x = 5;
match x {
5 => foo(),
3 => bar(),
1 => match baz(x) {
Ok(_) => foo2(),
Err(e) => match maybe(e) {
Ok(_) => bar2(),
_ => panic!(),
}
}
_ => panic!(),
}
Is this acceptable, at least compared to the original switch
statement idea?
w-what… 2 days was a looong time of not watching news, apparently.
What happened?
Immediately recognized that experiment.
After searching your comment history for the string: “Doods” (all case) I have something to tell you: git off social media, it took me minutes of flipping pages to reach 5 month old comments before surrendering; I do feel like I know you as well.
Regarding the general feeling, I experience a similar thing with someone else:
@PanArab@lemmy.ml, who is noticeable for having one of the few Arabic names on Lemmy, تحريرها كلها ممكن (freeing it all is possible) and for being the moderator of !israelicrimes@lemmy.ml, and for being from Saudi Arabia, we could tell that because:
a) He has its flag on his account.
b) He put a picture of an expensive car on top of it, further proving he is from Saudi Arabia (لا مؤاخذة) (Sorry for teasing you)
Edit: he apparently moderates many other things as well.
What does that even mean?
Didn’t eat it, have to wait for sunset.
Probably tastes the same as other cheap options, they rarely differ in taste.
Edit: I am really bad at tasting things, but I don’t think it tasted different from what I expected.
Produced by Sasco food industries.
Purely for this post.
These posts get tens of likes but no comments, because nobody knows what to say anymore. The situation is clear, the motives have been revealed and the details are trivial, and pointless.
Should we stop talking, the situation will only decline, but should we speak the declination will happen slower.
Edit: I wrote a comment that looks pretty cool & I am somewhat proud of it, actually
Yeah that’s what I’ve been using all along.