[ yn / yndd / fg / yume ] [ o / lit / media / og / ig / 2 ] [ ot / hikki / cc / x / sugg ] [ news / rules / faq / recent / annex / manage ] [ discord / scans / mud / minecraft ] [ aurorachan / desuchan / sushigirl / lewd ]

/ot/ - Off-topic

Best board
Email
Subject
Comment
File
:
Password (For file deletion.)

Patchy Illusion Team has just released two new Yume Nikki doujinshi scanlations!
Read Online: Towelll and Holding Back the Real World

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.



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