Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Funamentally Broken unless using Physics and Collision System

Discussion in 'Scripting' started by AnimalMan, Apr 9, 2021.

  1. AnimalMan

    AnimalMan

    Joined:
    Apr 1, 2018
    Posts:
    1,164
    Its become evident that you cannot rely on algorithms and lists, including lists of lists in order to produce accurate or even harded coded results.

    For example;

    We have a Grid, we want to drop a coloured tile down that grid (SORT OF LIKE TETRIS") Except we are just using 1 coloured Tile. Anyway we implement all of the mathematics that would make this work when theorizing the processes simulatenously on a sheet of squared mathematical paper. In fact the idea is simple

    We have a 6 x 13 Grid. Thats width x height. We can drop a coloured square using mathematics via algorithm, by simply dropping its row co-ordinate by 1 until it reaches 0 (the bottom of the grid) We actually perform all of this not on the grid itself but using lists, 6 lists of columns to be precise. And so we instance our coloured square in the top element of our list, represent it on our grid, and after a timer we drop it down the grid, and replace the previous list element with empty color. the lists are encoded as Lists of Colors. Lists of Lists are used are used to detect rows of colors. For example, if a row of colors is detected in Columns 1 2 and 3 and they occupy the same element, we empty these squares, and pull all list elements above it down 1. we do this by destroying the list element, and then adding 1 to the end. Anyway. The algorithms that deal with list of list are completely unreliable and produce glitchy unwanted results. these algorithms adjust after a row has been produced and sometimes work, sometimes do not work. But ultimately function off limited finite code. After 3 rebuilds of this project. It has become clear that there is nothing present in the code itself that is not allowing the game to be produced, indicating that instead there is a funamental flaw in the algorithmeric system that fails to verify the existence of data, and the quality of that data at will, and will send you on a wild goose chase, running around in circles, changing menial things, to ultimately reach the same conclusion.

    The entire system could be made using 3D objects and the physics system, using OnCollision. Which is odd because; you would think the old 2D method of using mathematics would be reliable. But fact is it is not. I spent 24 hours thinking i was making progress. Dont waste your time. The hardware of old Sega Mastersystem, and N64 had reliable high quality mathematical systems and chips, far far better than anything available today.

    I'd like to blame unity, but its C#
    F***ing waste of time.
     
  2. Suddoha

    Suddoha

    Joined:
    Nov 9, 2013
    Posts:
    2,824
    I'm not sure which algorithms you talk about, but types like Lists and all that stuff from the
    .net framework, as well as most of the engine's APIs, are not buggy at all.

    It seems the algorithms you're using are not properly implemented if they do not yield the expected results.

    You can neither blame Unity, the .net Framework nor the language for it.

    If you'd like to ask for support from the community, you should add some code.
     
    SparrowGS, Lekret and Joe-Censored like this.
  3. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,336
    It sounds like perhaps you could benefit from setting your project gently to one side and then working through perhaps a half a dozen very small compact simple Unity and C# tutorials.

    Believe it or not, everything to do with computers works 100% perfectly, but the catch is, you have to give it the right code and data. That's not optional, and opining angrily about it won't change anything.

    I wish you the best in your engineering endeavors.
     
    lordofduct, Suddoha and SparrowGS like this.
  4. SparrowGS

    SparrowGS

    Joined:
    Apr 6, 2017
    Posts:
    2,536
    Hmm.. wonder how they made all the different Tetris games up until now if the "algorithm" is "fundamentally broken" and produces "glitch results".

    Either show some code or go home, just because you don't understand something doesn't mean everything is broken.
     
  5. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,375
    I thoroughly enjoyed OP's post.

    I want more.

    Please share more specifics, possibly some code, maybe we can offer some assistance.
     
    Kurt-Dekker likes this.