Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

  • Days Won


fastcall22 last won the day on March 28 2018

fastcall22 had the most liked content!

Community Reputation

10890 Excellent


About fastcall22

  • Rank
    Web Developer

Personal Information

  • Role
  • Interests

Recent Profile Visitors

31864 profile views
  1. fastcall22

    A wild thought appeared

    Correct. MD5 or any other cryptographic or simple hashes are effectively useless here. Re-encoding an image using a different encoder or the same encoder with different settings would produce a vastly different hash in any algorithm, except perceptual hashes. Perceptual hashes encode and compress the characteristics an image in such a way that the hashes of similar images will have a small Hamming distance, despite distortions, artifacts, and watermarks. Check out the very excellent pHash library. The image macros in your example were rated as similar using pHashML, though with a large Hamming distance. On to compression, the problem with hashes is they are generally one-way and have collisions. And in addition to collisions, the image will need to be reconstructed somehow. Even if the image is composed of deltas off of existing hashes, the data that makes the uniqueness of that image must be encoded and stored somewhere. Requesting an image or retrieving an image from storage will require a vast database of hashes and their data to reconstruct all possible images, which would be infeasible to store or expensive to construct.
  2. Yes, that is correct. Pointers are non-trivial types and strings contain (or strings are) a pointer to its characters. Your program appears to work because the books containing the strings containing the pointers to the character arrays are still valid. Run only the read from disk code and your program will crash. Serialize instead the contents of each string in the book: Store the length of the string first followed by its character data. And to read the string: Read the length of the string first, then read that many bytes into a temporary array, and then construct a string with the length and array. If you haven't already, consider examining the contents of the file with a hex editor. Serialization can be tricky, but it is not an uncommon problem. Read for more information.
  3. fastcall22

    C++ compiled EXE not running

    Yes, exiting main from that point tells you SDL_Image didn’t initialize, but it doesn’t tell you why SDL_Image didn’t initialize. `IMG_GetError()`, if not `SDL_GetError()`, tells you why. Instead of “my program exited early” or “my program runs, but images don’t draw”, you will instead have something actionable, such as: “SDL_Image wasn’t able to find libpng.dll”. The latter is much more helpful than the former. No, as specified in the SDL_Image documentation, SDL_Image will only load the libraries you specify in IMG_Init at the time of calling IMG_Init. This way, only the minimum number of libraries are loaded. There’s no point in loading or distributing your game with libjpeg.dll or libtiff.dll, if you plan on only using PNGs, right? The issue may just as well something entirely different, but double check your working directory.
  4. fastcall22

    C++ compiled EXE not running

    “Seems to be unable”? This specific code block is logging the error; check your SDL logging configuration and find out what the exact error is. When developing projects within an IDE, the IDE will generally use a different working directory than running the executable directly. This is very important to keep in mind as relative paths used to load assets and dynamic libraries are relative to the working directory. In other words, your DLLs and assets should be located in the same directory as your EXE, when running the EXE directly. Specifically for SDL_Image, you must also include any image format codecs you wish to use with your SDL_Image.dll. For PNG, this should be libpng.dll (or similar) and zlib.dll.
  5. does not condone reverse engineering of commercial games. While it can be done, your efforts are generally better spent on literally anything else.
  6. Yes, `git config remote.origin.url` and `git push origin master` is more or less correct, except for a small caveat: The destination repository,`Joshei/MyGolfRepo.git`, already has a commit. You will need to force update in order to effectively replace the destination repository with the source repository. Remotes can also be managed with `git remote`: On git bash vs git cmd: It doesn't matter too much. `git bash` is Bourne shell for Windows with some emulated Linux features: I use Git SCM under Powershell and work around Windows-specific issues (`GIT_SSH`, for example). On where to be: Git looks for the first directory containing the git object database, the `.git` folder, and operates from there. I generally manage git from the topmost project directory. On backups: If you have concerns about possibly losing data in your local repository, then make a backup of your local `.git` folder, and move it outside of the repository directory. If something goes very wrong, you can always remove your current `.git` folder and replace it with a copy of the backup. As an aside, I recommend anyone learning git to use a repository visualizer such as gitk (Git SCM), TortoiseGit, or even git log, and follow along as you execute your git commands.
  7. @sprotz VideoGameAttorney in his Ultimate guide to legal needs and prices post on Reddit sums it up quite nicely:
  8. Use the code block tool, like so: # groups = [] uniquekeys = [] data = sorted(data, key=keyfunc) for k, g in groupby(data, keyfunc): groups.append(list(g)) uniquekeys.append(k)
  9. fastcall22

    Brilliant game Idea of a GTA Primal.

    Alright, let’s not get bogged down with hypotheticals and stick on topic. This thread has the potential to go off the rails as OP’s other thread. To summarize thus far: Ideas in and of themselves do not have any value. It is the execution of the idea that has value, but it also is where 1x to 3x the budget, the sweat, the blood, and the tears go. Yes, someone can “steal” your idea, make a game out of it, and have varying degrees of success or failure, but hey also have to invest the resources into it as well. Why hasn’t someone made “popular game X but with Y”? Because it costs resources or research suggests it will not turn a profit or the proof of concept proves the idea to be not fun. People who don’t value their own time have warped perspectives about how games are made.
  10. Those who are interested can find the original spam-free thread here:
  11. fastcall22

    People really have no ideas on game development.

    Well, this thread went on some adventures. Pretty sure everything that needed to be said was said on the first page, so the thread is now closed.
  12. Your question then is only about the math behind finding the point of intersection of three planes? The standard form, Ax + By + Cz + D = 0, can also be written as a dot product, `(A,B,C,D) · (x,y,z,1) = 0`, and both can be written as matrix multiplication: `[[A B C D]] * [[x] [y] [z] [1]] = [[0]]`. For all planes, `(A,B,C,D) · (x,y,z,1)` must be 0, if written as a matrix, we get: [[x] [[A1 B1 C1 D1] [y] [[0] [A2 B2 C2 D2] × [z] = [0] [A3 B3 C3 D3]] [1]] [0]] Expanded: [[A1x + B1y + C1z + D1] [[0] [A2x + B2y + C2z + D2] = [0] [A3x + B3y + C3z + D3]] [0]] Afterwards, we can solve using systems of linear equations, specifically using Kramer's Rule or row reduction: [[q*A1x + 0 + 0] [[-D1] [ 0 + r*B2y + 0] = [-D2] [ 0 + 0 + s*C3z]] [-D3]] Which more or less gives us something like the following: [[x] [[-D1/(q*A1)] [y] = [-D2/(r*B2)] [z]] [-D3/(s*C3)]] Regarding how to visualize the math behind it, I recommend watching 3Blue1Brown's series on linear algebra.
  13. Use a hash-based lookup table to identify previously created vertices matching on all attributes of the vertex: Position, normal, texcoord (and its implied texture!), and optionally color. e.g.: class MeshBuilder: def __init__(self): self.index_buffer = [] self.vertex_buffer = [] self.vertex_lookup = {} def index_for_vertex(self, x, y, z, nx, ny, texid, tx, ty): vertex = x, y, z, nx, ny, texid, tx, ty ix = self.vertex_lookup.get(vertex, None) if ix is None: ix = len(self.vertex_buffer) self.vertex_buffer.append(vertex) self.vertex_lookup[vertex] = ix return ix def add_triangle(self, a, b, c): ix_a = self.index_for_vertex(*a) ix_b = self.index_for_vertex(*b) ix_c = self.index_for_vertex(*c) self.index_buffer += [ix_a, ix_b, ix_c] Afterward, use the lookup table to get or create a vertex index to use in your index buffer. In the cube example, the 6 planes will build 6 faces (polygons). Triangulating the polygons will make 12 triangles and 36 vertices. The `MeshBuilder` example will reuse indices for the 12 duplicate vertices. The end result is a vertex buffer with 24 unique vertices, and a index buffer with 36 indices.
  14. fastcall22

    Guys, I need help on new TTB interactive game

    Hello, and welcome to! Have you checked out our beginner’s resources? It contains quite a number of links for beginners such as yourself.
  15. Moving to "For Beginners". Please use a more descriptive title next time. No and no. A game is a complex system of software. Mods are extensions built to interact with very specific software. As such, complex pieces from vastly different systems cannot be stitched together. It is more cost effective to engineer a system that incorporates the pieces you would like to use than it is to reverse engineer and stitch together existing components. There are just too many unknowns and complications with reverse engineering not to mention it is very likely illegal. Assets and IP are protected by law. When a question such as this comes up, I generally quote from VideoGameAttorney’s guide from a year ago,
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!