Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
baka kaba
Jul 19, 2003

PLEASE ASK ME, THE SELF-PROFESSED NO #1 PAUL CATTERMOLE FAN IN THE SOMETHING AWFUL S-CLUB 7 MEGATHREAD, TO NAME A SINGLE SONG BY HIS EXCELLENT NU-METAL SIDE PROJECT, SKUA, AND IF I CAN'T PLEASE TELL ME TO
EAT SHIT

To be honest that sounds pretty realistic. Never take on a giant spider in a tavern brawl

Adbot
ADBOT LOVES YOU

Sebbe
Feb 29, 2004

Working on a problem set for our students.



Welp. Guess the module is pretty specific about the BMP images it can work with.

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

Sebbe posted:

Working on a problem set for our students.



Welp. Guess the module is pretty specific about the BMP images it can work with.
I've seen this bug so much, images are hard. :v: Usually it's due to incorrect row padding or bpp.

Factor Mystic
Mar 20, 2006

Baby's First Post-Apocalyptic Fiction

Sebbe posted:

Working on a problem set for our students.



Welp. Guess the module is pretty specific about the BMP images it can work with.

I recognize that glitch. Your stride calculation is wrong. It'll come out wrong like that if you picked the wrong pixel format for the decoder. For example, if you thought your pixel format was 32bpp ARGB but its actually 24bpp RGB, you'd overestimate the stride by 8 bits * image width. The error will propagate as you iterate the image top to bottom causing the slanted look.

Lutha Mahtin
Oct 10, 2010

Your brokebrain sin is absolved...go and shitpost no more!

I kind of like that bug because it reminds me of poor analog TV reception, or a cruddy VHS tape from the video store :)

Adverbially
Sep 17, 2013

Soiled Meat

Sebbe posted:

Working on a problem set for our students.



Welp. Guess the module is pretty specific about the BMP images it can work with.
Could it be it just couldn't handle the magnificence of Torben? :allears:

clockwork automaton
May 2, 2007

You've probably never heard of them.

Fun Shoe


Playing around with physics in love2d and failing to attach the ball to the mouse movement correctly so every time I try to knock over the tower of blocks I miss.

For comparison what I was actually trying to do:

clockwork automaton fucked around with this message at 18:03 on Sep 21, 2014

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
Maybe not a glitch per se but I did some tinkering with an idea for "connect four IN SPACE" but it slowly dawned on me that it would be incredibly frustrating and fiddly.






Might work if I just did a bubble-bobble type thing instead of ~physics~.

ekuNNN
Nov 27, 2004

by Jeffrey of YOSPOS
My city generator might need some work :v:

LP0 ON FIRE
Jan 25, 2006

beep boop
ekuNNN, any explanation behind those giant floating eyes? :ohdear:

ekuNNN
Nov 27, 2004

by Jeffrey of YOSPOS
I don't know, they just show up to silently judge me whenever I gently caress up my code :ohdear:

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
Don't worry about that, it's just the Observer Pattern.

DStecks
Feb 6, 2012

LP0 ON FIRE posted:

ekuNNN, any explanation behind those giant floating eyes? :ohdear:

It took me a second to realize that that was the poster's name and not your reaction.

Dr. Stab
Sep 12, 2010
👨🏻‍⚕️🩺🔪🙀😱🙀
:ducksiren: chip8 rave party :ducksiren:

Drastic Actions
Apr 7, 2009

FUCK YOU!
GET PUMPED!
Nap Ghost


I don't get iOS 8 Size Classes

DStecks
Feb 6, 2012

Drastic Actions posted:



I don't get iOS 8 Size Classes

no

no that's perfect

sarehu
Apr 20, 2007

(call/cc call/cc)
lossy compression

lord funk
Feb 16, 2004

I just liked this little satanic glyph that would zoom all around the screen (supposed to be a circle)

Music Theory
Aug 7, 2013

Avatar by Garden Walker
That's really neat and you need to put that in the real game somehow. :colbert:

a cyberpunk goose
May 21, 2007

sarehu posted:

lossy compression



Intel's new architecture lookin good

Shoehead
Sep 28, 2005

Wassup, Choom?
Ya need sumthin'?


I...broke something...

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

Shoehead posted:



I...broke something...

Looks to me like Skull Head Dude's position pointer is getting copied and used by some other aspect of the program. Either that or you have very specific memory corruption. Funky either way though.

Shoehead
Sep 28, 2005

Wassup, Choom?
Ya need sumthin'?

TooMuchAbstraction posted:

Looks to me like Skull Head Dude's position pointer is getting copied and used by some other aspect of the program. Either that or you have very specific memory corruption. Funky either way though.

I *think* it's the flags for locking him in place unflagging too soon, or just plain not working. I wanna look at it but real life is calling atm. :smith:

LP0 ON FIRE
Jan 25, 2006

beep boop

TooMuchAbstraction posted:

Looks to me like Skull Head Dude's position pointer is getting copied and used by some other aspect of the program. Either that or you have very specific memory corruption. Funky either way though.

This happened in a game I've been developing, and the seaweed starting behaving like an enemy. It was freaky.

Seat Safety Switch
May 27, 2008

MY RELIGION IS THE SMALL BLOCK V8 AND COMMANDMENTS ONE THROUGH TEN ARE NEVER LIFT.

Pillbug

LP0 ON FIRE posted:

This happened in a game I've been developing, and the seaweed starting behaving like an enemy. It was freaky.

I wish I had thought to record video of it at the time, but years ago I had a bit of code that loaded the editor logic inside the regular game (due to not cleaning up the regular game properly when switching to the editor), so you were able to control the edit cursor even though the game was running at the time. IIRC there was also a wild pointer or two that made it possible.

I remember being totally impressed that it managed to line the heap up just right that it worked, because there were a lot of differences in the 'state' region of memory between the two modes. It wasn't quite perfect since it would aggressively crash when enemies noticed and tried to attack the edit cursor.

Seat Safety Switch fucked around with this message at 05:14 on Dec 4, 2014

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe
I decided to dive back into Blender and re-learn how to do animations.

How do armatures work again? Probably not like this. :v:

a cyberpunk goose
May 21, 2007

TooMuchAbstraction posted:

I decided to dive back into Blender and re-learn how to do animations.

How do armatures work again? Probably not like this. :v:



those weights :stare:


here's one of my own, i call it "the angry boulder test"

NorthByNorthwest
Oct 9, 2012
Forgot to initialize some data on the GPU.

Zereth
Jul 9, 2003



NorthByNorthwest posted:

Forgot to initialize some data on the GPU.

That's a cool effect, can you do it reliably and safely?

NorthByNorthwest
Oct 9, 2012

Zereth posted:

That's a cool effect, can you do it reliably and safely?

Since it's just reading uninitialized data, the patterns are highly variable, and might not come out the way you'd like, If you need quick and dirty noise, it might work. I'd recommend sampling from a noisy texture, you'll have finer control over the base color and the style of glitches.

If you're going for fake glitches, you'll probably get more fun by 'forgetting' to clear the buffer in between draws.

A few other experiments:
Normalizing an uninitialized vec3:

Multiplying the above by a sinusoidal time:


edit: Passing uninitialized data per vertex:

NorthByNorthwest fucked around with this message at 05:06 on Dec 9, 2014

TZer0
Jun 22, 2013


From an assignment I had during uni. The goal was to create an algorithm for interpolation of pixels. Top-most picture is the source.

Lowen SoDium
Jun 5, 2003

Highen Fiber
Clapping Larry

NorthByNorthwest posted:

Since it's just reading uninitialized data, the patterns are highly variable, and might not come out the way you'd like, If you need quick and dirty noise, it might work. I'd recommend sampling from a noisy texture, you'll have finer control over the base color and the style of glitches.

If you're going for fake glitches, you'll probably get more fun by 'forgetting' to clear the buffer in between draws.

A few other experiments:
Normalizing an uninitialized vec3:

Multiplying the above by a sinusoidal time:


edit: Passing uninitialized data per vertex:

And just like that, Homestuck the Video game was created on accident.

Zereth
Jul 9, 2003



Lowen SoDium posted:

And just like that, Homestuck the Video game was created on accident.
... Uh...

lord funk
Feb 16, 2004

Simple, but it got a big laugh out of me:

https://vine.co/v/O66QLquDj0M

:wave:

It's been a long day.

Shoehead
Sep 28, 2005

Wassup, Choom?
Ya need sumthin'?
Oops

Jewel
May 2, 2009

I was trying to bend traintracks













Edit: In progress fixing it to work without deformation in the last gif, but something is still Very Wrong



Edit2: Bah, still can't get it

Jewel fucked around with this message at 01:06 on Dec 22, 2014

Lutha Mahtin
Oct 10, 2010

Your brokebrain sin is absolved...go and shitpost no more!


I'm not sure I see a problem with this.

baka kaba
Jul 19, 2003

PLEASE ASK ME, THE SELF-PROFESSED NO #1 PAUL CATTERMOLE FAN IN THE SOMETHING AWFUL S-CLUB 7 MEGATHREAD, TO NAME A SINGLE SONG BY HIS EXCELLENT NU-METAL SIDE PROJECT, SKUA, AND IF I CAN'T PLEASE TELL ME TO
EAT SHIT

Jewel posted:



Edit: In progress fixing it to work without deformation in the last gif, but something is still Very Wrong



Edit2: Bah, still can't get it



Did you manage to get this working? The first one looks good, but it feels like you'd want to just calculate the midline of the sleeper and then rotate the shape to position it

Unless you're doing some interesting procedural calculation thing to generate these or something :shobon:

Jewel
May 2, 2009

Going to bed so I'll paste what I wrote up on my blog and get back to any further questions later!

quote:

There’s some deformation in between transitions, but any other methods I try have far worse. This method was done using polar coordinates, where the angle was the x coord (0 to 1 space) converted to 0 -> 90 degrees, and the length was the y coord. From there the new x or y coords is just cos or sin(angle) * length.

The deformation comes in from the fact that lowering the angle in polar coordinates doesn’t lower the “bend” angle, just the area it’s mapped to, so you get this problem if you lower it: http://i.imgur.com/B59GdTN.gif

To offset that I just had to lerp between completely rotated and no rotation, so the lerp doesn’t really respect any distances so it deforms.


The closest method I’ve got to avoid deformation looks like this: http://i.imgur.com/fu9rWok.gif

It’s not deformed in that the spacing between the rails never changes, but the problem is that it bends in entirely the wrong ways. This was just done by rotating the entire space by 90 * x degrees, which leads to the end points being perfect but everything in between suffering.

Oh well! It was a fun exercise, I’d love to apply it to a 3D set of points some time but I don’t have much purpose for the code, it’s more efficient artistically to just model a unique bent model rather than bending via code.

But yes, this is entirely just procedural on point data, not necessarily any special "tracks" or "sleepers". That's one of the reasons I wouldn't really use this in anything too, it's more efficient to just model it because you get cleaner non-tapered sleepers.

Adbot
ADBOT LOVES YOU

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
I helped Jewel a lot with this, so let me explain what the three gifs are.

The first is a simple lerp between the fully bent and unbent shapes.

Second was after I gave her some random suggestions and she somehow ended up with that. She didn't save the code for it.

The last is the mathematically correct "rotate point N degrees around the center point", where N ranges from 0 to 90 based on the X of the input point.

This sort of procedural bending modelling is clearly a solved problem, there are tools to do the modelling, but I haven't been able to find any papers or research on the subject, and I'm too dumb to think of a proper solution on my own.

  • Locked thread