• What are you working on? v67 - March 2017
    3,527 replies, posted
Oh god, what am I getting myself into. https://files.facepunch.com/forum/upload/132330/e92aa6a8-1029-4abc-8f07-b9f8e50cc4b1/2018-03-18_18-24-00.png
I spent yesterday and today adding to my reflection system My whole goal with this engine is to produce as realistic lighting as possible in real time with as little pre-computations as possible. However, my SSR pass is quite costly - it requires taking what the user sees and convoluting it into a mip chain, where each level serves as an index for rougher materials to use when calculating reflections. I've implemented this effect where I have a persistent cubemap array that follows the user, and the convoluted mip-chain texture normally used for SSR also gets projected into this cubemap array. The net effect is that whatever the user sees gets cached into a cubemap, providing a last-ditch effort for reflections. This effect is semi-plausible at worst, since it continuously fills with whatever you see there will always be a portion of it that is accurate. Further, this can achieve parallax correct reflections while stationary. For me on my gtx1070 this effect takes 0.12ms on average by itself (since it uses the already convoluted mipchain).
I had a shitload and spent it all on my avatar height. https://files.facepunch.com/forum/upload/108652/c23e94c1-5725-444e-9423-ce9f09a007a7/Z32Lw5.png
https://my.mixtape.moe/mhjdcf.png help
Same here. Wish i hadn't because the price increase is not worth it at all.
I get bored with projects easily. At work, when I'm given a project to do, brand new from the ground up, I'm excited to go crazy and be creative, but when 90% of the functionality of the website is done, and they start tasking me with small feature requests that don't make a noticeable difference, I lose all motivation.
Just do what I do. Start 2k projects and let them sit unfinished in a drive somewhere.
Here's something I did a while ago, but I think I only posted it in the discord. https://gist.github.com/jammy-dodgers/407a884c72ded25c823a007343ad7ca4 It's a brainfuck interpreter, in Javagony - a variant of java where you don't get `for`, `if`, `while`, `do while`, `switch` or `?:` The only control flow you can use is `try catch`. I ended up remaking if statements, with some awful trycatch abomination. I'd recommend programming in javagony, it's fun in a kind of masochistic way.
I really don't get the allure of purposefully punishing programming languages. Seems like a very strange usage of time to work on a super practical skill in the most impractical ways possible.
Esoteric programming languages aren't meant to be used practically tho. IMO they are just created and worked with so people can flex their CS muscle, which makes sense because using for example brainfuck means you understand how programming languages work on a fundamental level and not just abstractly (Like many coders do).
Well, looks like my long term project (Floatlands) is now rekt. We decided to stop working on it, so, so I guess I will have time for experimentation.
I understand that they aren't meant to be used productively, but its this "flexing of CS muscles" itself is what I don't really get. Like I can climb a mountain pretty well in hiking boots, if I saw someone doing it in high heels I don't think it'd prove much other than you like being in pain and inconveniencing yourself.
https://www.youtube.com/watch?v=PR04-ZhhKEk Commuting to work: The game!
What happened if you don't mind me asking? Last time I saw it (it's been awhile admittedly, the early new punch migration had me out of the waywo loop for a while) it was looking really cool.
https://files.facepunch.com/forum/upload/133270/3526cf3e-e500-45a4-b21a-5c5e7f978bd6/image.png Is this what they mean by escaping a sandbox?
Esoteric languages are like toys. You play with them for fun and to sharpen your skills. You can't use one of those shitty toy phones to make real calls, but it still teaches the kid how to operate a phone on a basic level.
Well cofounder/worker quit cause he thinks we wont be able to finish it. Blamed me mostly for being at fault for apparently being too slow with coding and too late in morning (well it's true, but most of time I was fixing his poorly written / optimized shit code) + I was financially supporting the project. So surely I believe I don't deserve all the blame. True reasons were those in my opinion: general lack of direction and game design lack of funding / better funding (previous investor stopped supporting the project) crypto bubble popped. Some team members worked for free (including me), and were living of crypto. Well, I was fucking shaking and warned them it's bubble and they should be selling. some legal problems - we had to pay some tax even if u make 0 profit, so additional financial pressure some shit decisions which leaded us to spending too much time on some shit it didn't mattered lack of general will / bad mood because of reasons above So what to do now? Well I will take a vacation for month or two, open source some code that will probably rot anyway, at same time will rebuild crypto portfolio (it will be bear for year max), then for next bull run I will probably launch game project. I am also thinking of abandoning game dev scene all together and start learning AI/ML.
It looks like a very good starter project. But open world survival crafting games are overdone. You are right about "general lack of direction and game design". It's hard to come up with something new with those kind of games. I wouldn't quit the whole game dev scene tho because it looks like you have the skills required to be a good game programmer. Why not check out SpatialOS? Take the assets you have and make an open living world with AI animals.
You're talking about Counter-Strike Xbox .xpr files right? I thought they only stored texture data and the rest were in various other package files (.mdl files in .sxwad files and sounds in whatever the Xbox proprietary sound package format is).
Well it wasn't supposed to be good starter project (it would be like my 6th or 7th game project) but good commercial project, but yes I can't argue I learned shit-tons from it. Also heh, first time I saw pic of how SpatialOS works was precisely how I imagined i'd do MMO game , but even better. Thanks for that info!
As some of you may know i'm doing an erotic game, in this game you can save your characters to image files that you can share and they contain the information, at first I used to store this at the end of the image, but this gets stripped by imgur, so I made my own steganography code for the godot engine. # ERO-ONE's Steganography Library extends Node const STEGANO_MAGIC_NUMBER = [0x45, 0x52, 0x4f, 0x31] #ERO1 const STEGANO_CHUNK_END = [0x45, 0x52, 0x4f, 0x45] #EROE const BITS_PER_BYTE = 2 # How many bits we take from each one, 1 is the least singificant bit const STEGANO_FORMAT_VERSION = 1 const DATA_OFFSET = 0 # Offset for where the data starts in the image func store_string_in_image(image, string): var payload = PoolByteArray(STEGANO_MAGIC_NUMBER) var text_binary = string.to_utf8() var text_compressed = text_binary.compress(File.COMPRESSION_ZSTD) # split the data size int into four bytes (32 bits, we shouldn't need more) var uncompressed_data_size = PoolByteArray([0x00,0x00,0x00,0x00]) uncompressed_data_size[3] = text_binary.size() uncompressed_data_size[2] = text_binary.size() >> 8 uncompressed_data_size[1] = text_binary.size() >> 16 uncompressed_data_size[0] = text_binary.size() >> 24 payload.append(STEGANO_FORMAT_VERSION) payload.append_array(uncompressed_data_size) payload.append_array(text_compressed) payload.append_array(PoolByteArray(STEGANO_CHUNK_END)) return store_data_in_image(image, payload) func store_data_in_image(image, data): # Ensure data is a PoolByteArray if not typeof(data) == TYPE_RAW_ARRAY: Console.err("Data passed to store_data_in_image is not a PoolByteArray, it should be one, call a programmer.", "EROSteganography") image.convert(Image.FORMAT_RGB8) var image_data = image.get_data() var writing_mask = 0 for mask_i in range(BITS_PER_BYTE): writing_mask = writing_mask | (0x1 << mask_i) var image_position = 0 for byte_i in range(data.size()): var images_bytes_per_byte = 8/BITS_PER_BYTE for insert_i in range(images_bytes_per_byte): var insertion_mask = writing_mask << insert_i * BITS_PER_BYTE var bits_to_write = data[byte_i] & insertion_mask bits_to_write = bits_to_write >> insert_i*BITS_PER_BYTE var image_data_mask = 0xFF >> BITS_PER_BYTE image_data_mask = image_data_mask << BITS_PER_BYTE image_data[image_position+insert_i] = image_data[image_position+insert_i] & image_data_mask image_data[image_position+insert_i] = image_data[image_position+insert_i] | bits_to_write image_position += images_bytes_per_byte var final_image = Image.new() final_image.create_from_data(image.get_width(), image.get_height(), false, Image.FORMAT_RGB8, image_data) return final_image func get_steganographic_data_from_image(image): image.convert(Image.FORMAT_RGB8) var extracted_data = PoolByteArray() var image_data = image.get_data() var data_mask = 0 for mask_i in range(BITS_PER_BYTE): data_mask = data_mask | (0x1 << mask_i) var current_byte = 0 var magic_number_position = -1 for byte_i in range(image_data.size()): var data = image_data[byte_i] & data_mask var iterations_per_byte = 8/BITS_PER_BYTE var current_bits = data & data_mask current_byte = current_byte | (current_bits << ((byte_i % iterations_per_byte)*BITS_PER_BYTE)) # For every 8 bits we parse, save the current byte if byte_i % iterations_per_byte == iterations_per_byte-1: extracted_data.append(current_byte) if byte_i < 64: pass current_byte = 0 # Magic number check var magic_number = PoolByteArray(STEGANO_MAGIC_NUMBER) # Ensure we only try to get the magic number only if we have enough bytes for it if extracted_data.size() == DATA_OFFSET + magic_number.size(): var potential_magic_number = extracted_data.subarray(extracted_data.size()-PoolByteArray(STEGANO_MAGIC_NUMBER).size(), extracted_data.size()-1) if potential_magic_number == PoolByteArray(STEGANO_MAGIC_NUMBER): magic_number_position = extracted_data.size()-1 else: return ERR_FILE_CORRUPT # Try and find the ending marker (EROE) if extracted_data.size() >= DATA_OFFSET + magic_number.size(): var potential_chunk_end = extracted_data.subarray(extracted_data.size()-PoolByteArray(STEGANO_CHUNK_END).size(), extracted_data.size()-1) if potential_chunk_end == PoolByteArray(STEGANO_CHUNK_END): break # data decoding if magic_number_position != -1: var version_number = extracted_data[magic_number_position+1] # Reconstruct the uncompressed size int var uncompressed_size_bytes = extracted_data.subarray(magic_number_position+2, magic_number_position+5) var uncompressed_size = uncompressed_size_bytes[3] uncompressed_size = uncompressed_size | uncompressed_size_bytes[2] << 8 uncompressed_size = uncompressed_size | uncompressed_size_bytes[1] << 16 uncompressed_size = uncompressed_size | uncompressed_size_bytes[0] << 24 # Get all remainin data except EROE var compressed_data = extracted_data.subarray(magic_number_position+6, extracted_data.size()-1-STEGANO_CHUNK_END.size()) var uncompressed_data = compressed_data.decompress(uncompressed_size, File.COMPRESSION_ZSTD).get_string_from_utf8() return uncompressed_data else: return ERR_FILE_CORRUPT func get_steganographic_data_from_file(image_path): var file = File.new() if file.file_exists(image_path): var image = Image.new() image.load(image_path) var result = get_steganographic_data_from_image(image) return result else: return ERR_FILE_NOT_FOUND
I enjoy refactoring code the most, personally. Starting from scratch is nice but it's easy to wander and lose track, especially since I lack a lot of important background schooling. Refactoring is easy enough, since I can read textbooks on how to do this well. I have a bunch of smaller projects I bounce between, but I try to keep them all as somehow feeding into a larger goal I have or, at the very least, have them be a learning experience. This has helped me stay motivated and makes me feel like I'm usually making a good amount of progress. When I'm really stuck, I go back and clean up old code and try to update code to use more "best practices" and such. Current work problem: dealing with fucking MATLAB. I have a shitload of I/Q radio data I need to import from a MATLAB binary file, but the only library I found for reading MATLAB `.mat` files is the most asinine shit of all time, because it lacks shitloads of documentation and is a pure-C API trying to parse a complex and highly variable data format. That and being tossed into another project with no idea of what I'm doing has me looking at positions at Amazon working on Lumberyard, as a graphics programmer. I haven't told work yet, but I'm very very close to submitting resumes since I'll be making loads more money, and working on programming I really enjoy (even if the topic as a whole is less cool and less "meaningful").
XPR stands for Xbox Packaged Resource, and has support for both models and textures. I also forgot that audio is not supported for these files. You're right though, XPR files can be used solely to store texture data. I've seen maybe one or two games use the model data from XPR files, with the rest using their own model format. Sorry about that.
Dealing with coworkers output code, and his lazy habits right now. He's the kind of guy who commits one mega-commit once per week, if that helps. I'm a bit salty rn. I need to parse his CSV data (all 10,000 of them jfc), into 32,400 gain_ratio samples. but i also need to extract a label for our machine learning data row,az,el,gain_ratio,Rx_location,Rx_pointing,Tx_1_location,Tx_1_pointing,Tx_2_location,Tx_2_pointing 0,360,0,71.68638431,50.00000000,50.00000000,69.00000000,68.00000000,0.00000000,1.00000000 1,359,0,71.68638431,50.00000000,50.00000000,65.00000000,96.00000000,0.00000000,1.00000000 2,358,0,71.68638431,50.00000000,0.00000000,0.00000000,22.00000000,0.00000000,1.00000000 3,357,0,71.68638431,Tx_1_az_el_rho,Tx_2_az_el_rho,,,, 4,356,0,71.68638431,218,45,,,, 5,355,0,71.68638431,26,55,,,, 6,354,0,71.68638431,55.55177765,86.60254038,,,, 7,353,0,71.68638431,,,,,, 8,352,0,71.68638431,,,,,, 9,351,0,71.68638431,,,,,, 10,350,0,71.68638431,,,,,, 11,349,0,71.68638431,,,,,, what in the fuck the commas were added to the end because he kept breaking python by having extra varied columns in the first few entries (that's how csv works? uniform data sheets? um?) i need to extract the 5th column from the 5th row each time, then discard the next two (and the preceding four), then extract the fourth column for the next 32,400 lines also he uses degrees, despite me asking to use radians because it'll let us change how we discretize our angular range (so we can adjust up/down to change complexity of the data) but he refuses because it works rn there's just a lot of small shit adding up today lol, earlier it was parsing and processing the godawful MATLAB binary formats and now its parsing bad CSVs
I added to the width and it was a mistake.
Ah right, makes sense. I've seen that other games used .xpr files but it wasn't particularly clear that it was an XDK-provided package type.
I'm doing 2 things at once right now, but I'm learning and practicing some rendering optimizations involving indirect rendering calls and instanced rendering, while also implementing the last branch of my reflection system. I hadn't considered using instanced rendering for my lights before, as I had it set up such that every light had its own uniform buffer. But now since I'm implementing parallax reflectors, they would have been implemented in the same way as lights. So I can decrease state changes by using 1 mega buffer for all objects of a given category, like all reflectors in 1, all point lights in another, etc. It gets better since I can just index into the buffer from the shader using the instance ID, meaning 1 draw call to render X objects at once. Further, I can use the indirect version because apparently these are better
Are non-game-related projects still ignored in this thread?
I wouldn't say ignored, I read pretty much every post, just don't post on stuff that isn't cool or elicits feedback. I imagine most people on here are the same.
Funny you say that, it just entered core in 4.6.
Sorry, you need to Log In to post a reply to this thread.