[ yn / yndd / fg / yume ] [ o / lit / media / og / ig / 2 ] [ ot / cc / x / sugg ] [ hikki / rec ] [ news / rules / faq / recent / annex / manage ] [ discord / matrix / scans / mud / minecraft / usagi ] [ sushigirl / lewd.sx / lainzine ]

/ot/ - Off-topic

Best board
[catalog]

Email
Subject
Comment
File
Password (For file deletion.)

The new CP spam filter now also works on posts that hide the link in the image instead of the post body.

File: 1561215833486.png (1.79 MB, 1680x1050, 1555950293471.png)

 No.19948

What are you dorks working on? Any cool topics in computer science you'd like to share?

 No.19954

File: 1561553180485.jpg (45.02 KB, 637x579, cirnocpp.jpg)

I'm starting out with graphical programming and C++. I'm trying to write a raycaster engine.
My goal is to make a simple gridbased dungeon game that supports textures, movement, items and an automap. After that possibly combat and multiple levels of the dungeon.

I did something very basic following a youtube tutorial but my map is currently just a matrix where I added in objects like walls and the player.
The only collision detection I have is checking every single iteration whetever or not the player would end up in a wall if he moves forward (only forward movement is supported now, left and right only turn the player into that direction)

I'm stumped on two main concerns:
1: is this how it's done? Checking what's going on every single second? I wish I knew how old games like Shin Megami Tensei on the SNES and Wizardry did this.
2: Having the level be a matrix is super simple and I don't know how levels are stored in games usually.

Other than that I'm also not sure if my first experience with C++ should be a program like this. I know C and I'm no stranger to OOP either but I worry that I might miss obvious things you can do simply by not knowing them and thinking of working with C++ as a combination of C and Java.

 No.19955

>>19954
I take it that you want to focus in 2D, tile-based games for now (at least until you finish this project)?

>1: is this how it's done? Checking what's going on every single second? I wish I knew how old games like Shin Megami Tensei on the SNES and Wizardry did this.

Yes, basically you check things every time you update your main loop.
If you read fwd_key as input, you have to immediately check whether you're clashing if the player moves forward 1 tile, and move only if that is false. I think you may learn a thing or two from downloading nethack (or any other hack variant, for that matter). The source is in C, but it's the logic of how things are done what may interest you.

>2: Having the level be a matrix is super simple and I don't know how levels are stored in games usually.

Take this with a grain of salt, but I believe it's not really different from this, other than maybe compressing it and or arranging it in a way that when you load the game from a savestate, it reads what "tile" goes where, where every object was last time you saved, and numbers such as hp, gold, etc. so you end up with some "map" for your tiles, numbers with positions for characters/objects on ground, inventories, stats, switches and other stuff.

 No.19956

>>19954
>I know C and I'm no stranger to OOP either but I worry that I might miss obvious things you can do simply by not knowing them and thinking of working with C++ as a combination of C and Java.

Try looking up stuff like constructor / destructor orders, virtual inheritance, multiple inheritance, friend classes, etc. Some things can be pretty obscure, like how calling virtual functions in constructor always calls base class functions, so if you're seeing weird shit happen that you can't explain, maybe it's a language specification you've never heard of.

Also try reading up about lower-level stuff like how objects are stored in memory, vtables, etc. It's always good to know how these things when you're not working with Java magic.

Overall you'll be okay, it's really just the details that can screw you over.

 No.19957

File: 1561620117353.png (19.3 KB, 625x497, ClipboardImage.png)

dicking around with source related stuff, using the 2013 sdk for a slightly larger project that i've had in my brain for a while, actually, lets just get to the point. working on a game. i'm tired.

 No.19958

>>19957
I'm assuming you're making a first person shooter with Source? Or is it something different?
I only know first person games that use source.

 No.19960

I'm trying to write an AI agent that can beat the best performance on SQuAD 2.0 without using more than 1% of the training data.

 No.19961

>>19954
>>19955

Some interesting concepts that you might want to look into are…

1. Broad-phase collision detection
2. Binary space partitioning (quadtrees for 2D, octrees for 3D, k-d trees for k dimensions)
3. Viewing-frustum culling

As for your questions,

1. Your map can be represented in a lossless image format on disk. An image is essentially a 2D matrix.
2. The relevant parts of your map can be loaded into memory when it is necessary.
3. The parts of the map that are necessary are those that will be visible within the amount of time that it takes to load the next parts of the map into memory. This is a recursive definition that is based on the maximum speed of your viewport and the speed of loading tiles into memory.
4. You can either check every second, which is common, or you can apply a sweep algorithm, treating time as a dimension. For inspiration, look at examples of functional reactive programming in video games.

 No.19962

File: 1562102898763.png (174.26 KB, 810x500, madodailyedit.png)

I've been doing https://www.nand2tetris.org , which is pretty cool so far. I'm also making a generic 2d game engine using pygame, which I'm planning on using to create and release a game within the year, which is almost certainly not going to happen considering that I'm a novice programmer at best and also that who the fuck can do that in six months, but having ridiculous time constraints is probably pretty good for enforcing a work ethic.

 No.20064

>>19962
>nand2tetris

I'm sure this probably accomplishes what it intends to accomplish, but the name alone is a neat summary of why computers are nothing more than an exercise in autism for the sake of autism.

Artillery, missile guidance, census and taxes for large countries… basically autism. That's what computers are actually useful for. Maybe. Everything else people do with them is just way more autism.

OK, that's just my opinion, but come on. How many people who take this course are ever going to do anything with that knowledge? It's less practical than memorizing a phone book, and probably does about the same amount of damage to your mind.

Seriously, the guy who developed Alone in the Dark literally lost the ability to comprehend human speech for weeks in the middle of a programming binge. Just because that doesn't usually happen doesn't mean it isn't doing anything to you. I've never been able to force myself to do any serious programming project, but I am convinced that the little that I did do, along with spending so much time on computers reading and thinking about how they work, set me back years. Years.

I'm a weak person, I'm still half-addicted to this shit, I can't prove anything, YMMV, do what you want, but nand2tetris, wow, TRIGGERED. It's all there. Pure autism. That's it.

 No.20065

>>20064
Programming is fun.
It's abstract thinking and feels more rewarding than mathematics to me.

 No.20066

>>20065
I'm too dumb for programming but I do have a lot of fun trying to come up with beautiful looking things and coming up with interesting interactions using HTML and CSS.

 No.20151

>>20064
Dude take a chill pill.

 No.20155

Thanks to deciding to start ROM hacking GBA Fire Emblem games I've learned how to use assembly and it's helped me optimize my own personal programs. It's also given me something to talk about with my Comp Sci professors. I'm really surprised more people don't try and use it since it helps for both optimizing methods that you have to run over and over as well as just getting a better understanding of what exactly you're doing in higher level languages.
>>19954
I recommend you look into assembly for your main loop, because you really don't want extraneous clock time for each cycle of it.

The one time video games have actually helped me IRL.

 No.20265

>>19948
pls givenings of the screen/neofetch

 No.20278

>>20265
yeah, I'd like to know the icon theme too

 No.20558

Tech? I'm making an electric car.
https://www.youtube.com/watch?v=a2GVxYfKSxA

 No.20625

Solar-powered bicycle with solar panels on the wheel hubs.

 No.20993

I don't have much motivation to learn programming, but I would self host a few services for a few friends when I have time. Learn system administration.

 No.21017

>>19948
Also, post your neofetch info pls

 No.21026

I'm having fun learning Rust. I find it fun because it feels like everything's half finished and you're close to the bleeding edge of language and library design. It's also because I prefer strict, static typing—I used to consider Python fun, but I stopped because I got sick of pandas (the Python data analysis library) which I use at work in an on-again, off-again way.

 No.21896

File: 1629185148086.jpg (831.5 KB, 3840x2039, 20210912.jpg)

Aeronautics…. FLY!

 No.23655


 No.23797

File: 1690624403669-0.jpg (292.74 KB, 800x1130, 20230804.jpg)

File: 1690624403669-1.jpg (389.51 KB, 800x1130, 20230806.jpg)

>>23655
X marks the spot

 No.23810

File: 1690768934491-0.jpg (252.46 KB, 1440x1800, 20230801.jpg)

File: 1690768934491-1.jpg (325.51 KB, 2048x1300, 20230803.jpg)

File: 1690768934491-2.jpg (76.7 KB, 927x768, 20230804.jpg)

Because you can't play videogames without hardware, post in this thread to find ill advice on how to build your very own personal computer, you can build your own computer, anon? You are not a retard, right?
Also ddr4 ram is fucking shit, like holy shit look at those prices, fill up your computer up, she will be grateful!
Framework Laptop 16 pre-orders are now open
https://web.archive.org/web/20230719004221/https://frame.work/blog/framework-laptop-16-pre-orders-are-now-open
The framework laptop 13 should had been beta tested by normalfags by now, so it is a great laptop for portability, if you want the 16 you should wait for the beta testing to end first.

Useful links
>https://wiki.installgentoo.com/wiki/Build_a_PC
>https://wiki.installgentoo.com/wiki/Laptop_Buying_Guide
>https://wiki.installgentoo.com/wiki/Headphones
>https://wiki.installgentoo.com/wiki/Mice
>https://wiki.installgentoo.com/wiki/Routers

 No.23811

File: 1690769001653-0.jpg (50.92 KB, 512x713, 20230806.jpg)

File: 1690769001653-1.webm (452.91 KB, 1280x720, date.webm)

File: 1690769001653-2.webm (406.31 KB, 620x1280, dcatty.webm)


 No.24387

File: 1698743370029.jpg (230.7 KB, 1024x768, 20231103.jpg)

Tech Tuesday or Tasty Tuesday?

 No.24649

Time for water-cooling, yo!

 No.27409

File: 1732010045745-0.jpg (234.77 KB, 811x1200, 20241118.jpg)

File: 1732010045745-1.jpg (40.28 KB, 1012x765, 20241121.jpg)

Quantum Computing time?

 No.27415

File: 1732141287444-0.jpg (26.17 KB, 400x400, 20241026_115854.jpg)


 No.27419

>>27415
im not that tech savy.

 No.27427

Been working on a new website concept with structured topic rooms. The site is:
https://depvana.com

Try it out and let me know what you think maybe?

 No.27431

File: 1732462689106-0.jpg (164.18 KB, 2240x2377, GaGi0XSWQAA_PK5.jpg)

>>27419
Neither I am, yet self-hosting is still awesome.

Which reminds me, I should setup some kind of remote management tool on my server.



[Return][Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ yn / yndd / fg / yume ] [ o / lit / media / og / ig / 2 ] [ ot / cc / x / sugg ] [ hikki / rec ] [ news / rules / faq / recent / annex / manage ] [ discord / matrix / scans / mud / minecraft / usagi ] [ sushigirl / lewd.sx / lainzine ]