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.
 
  • Post
  • Reply
Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Luigi Thirty posted:

The complementary color of purple is a nasty shade of lime green. :barf:

egh

maybe a filter that shifts the color some amount? like from purple to idk a soft orange or something

Adbot
ADBOT LOVES YOU

Polio Vax Scene
Apr 5, 2009



Invert + greyscale imo.

LP0 ON FIRE
Jan 25, 2006

beep boop
invert + color hue change

Jo
Jan 24, 2005

:allears:
Soiled Meat
White text with black border is pretty universally readable.

darkpool
Aug 4, 2014

Experimenting with physically based rendering.


dobbymoodge
Mar 8, 2005

LP0 ON FIRE posted:

How hard would it be to inverse the colors on the pixel shader wherever the text is?

Much better to put a high contrast 1-px border around the glyphs

efb:

Jo posted:

White text with black border is pretty universally readable.

darkpool posted:

Experimenting with physically based rendering.

This is beautiful, what do you mean by "physically based" in this context?

dobbymoodge fucked around with this message at 08:16 on Jul 19, 2017

darkpool
Aug 4, 2014

dobbymoodge posted:

This is beautiful, what do you mean by "physically based" in this context?

The wikipedia pages has a brief but clear description.

https://en.wikipedia.org/wiki/Physically_based_rendering

Next up I'm working on Voxel Cone Tracing so light is gathered from the surrounding scene with cone shaped rays as inputs for each element of the physically based render. It's going to take a while because everything needs to be mobile (OpenGL 3) compatible, which means no geometry shaders for easy voxelization.

LP0 ON FIRE
Jan 25, 2006

beep boop

dobbymoodge posted:

Much better to put a high contrast 1-px border around the glyphs

efb:


This is beautiful, what do you mean by "physically based" in this context?

Could help. I also don't know much at all what this game is about, so the title screen should set the mood to try to match it.

Neurion
Jun 3, 2013

The musical fruit
The more you eat
The more you hoot

Work on my analysis of Star Wars: TIE Fighter's code and data has been coming along very well. I've finally achieved one of my long-standing goals to crack and understand the format of the 3D models in the game, and have been working on a program to allow me to view them.

https://www.youtube.com/watch?v=_paV1csCutE

As of right now it only renders the model as a wireframe without backface culling. Soon I'll add the ability to render the model with the appropriate colors on each face as well as a proper draw order based on the distance of faces/meshes from the camera. Another thing that should be noted is the DOS version of TIE Fighter does not use traditional texturing for mesh faces. Instead it defines markings that appear on a face's surface, which are either 2D polygons or lines of a given thickness. I'm still working out exactly how the game's rendering engine interprets the byte stream and calculates the positions of the markings relative to the parent face's vertices/edges.

You might also have noticed that the initial form also had buttons for "Flight Groups", "Space Objects", "Combat Map", "Mission Goals", and "Trainer," but the functionality of those will be saved for a future video.

Edit: Turns out drawing polygons based on their distance from the camera (aka the Painter's Algorithm) is only appropriate in an extremely narrow number of circumstances, and complex 3D models is not one of them. I'm going to have to look into an efficient algorithm for drawing the model without invoking DirectX, as I'd rather stick to using the functions exposed by the GDI+ Graphics object. I could try using a z-Buffer, but I'm not sure if I want to go that route or not.

Neurion fucked around with this message at 07:12 on Jul 20, 2017

munce
Oct 23, 2010

Neurion posted:

Work on my analysis of Star Wars: TIE Fighter's code and data has been coming along very well. I've finally achieved one of my long-standing goals to crack and understand the format of the 3D models in the game, and have been working on a program to allow me to view them.

Nice work. Very cool to see into the guts of one of the most classic games.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

emulator writing guide from 1997 posted:

Computer emulation is definitely not one of the projects on which you learn a programming language.

Learning Swift and Cocoa and friends by writing a 6502 emulator. My goal is to turn it into a Framework that can be used to produce emulators for any 6502-based system. So far it passes the first 10 of Klaus' functional test suite. It also has a nifty console.

Jo
Jan 24, 2005

:allears:
Soiled Meat
I _finally_ figured out an issue that's been bothering me for months. It turns out that a bug in my .fnt file brought out a bug in libGDX's calculation of newline stuff.

Now my game has a functional assembly language and CPU architecture that can control the robots and stuff. :3: I'll probably program the NPCs with it so the player can hack and repurpose them.



Still need to connect the buttons to methods, but progress is way faster now.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Jo posted:

I _finally_ figured out an issue that's been bothering me for months. It turns out that a bug in my .fnt file brought out a bug in libGDX's calculation of newline stuff.

Now my game has a functional assembly language and CPU architecture that can control the robots and stuff. :3: I'll probably program the NPCs with it so the player can hack and repurpose them.



Still need to connect the buttons to methods, but progress is way faster now.

You mean connecting buttons to memory mapped io controllers. :science:

Jo
Jan 24, 2005

:allears:
Soiled Meat

leper khan posted:

You mean connecting buttons to memory mapped io controllers. :science:

And other memory mapped devices. :science:

I'm deciding how I want to handle the whole memory mapping thing. Right now "peripherals" have a set memory range to which they write, but my assembly language doesn't have any preprocessor instructions to mark a region read only. I should probably add that, but...

First, the memory editor gets its own pop-up window:

Neurion
Jun 3, 2013

The musical fruit
The more you eat
The more you hoot

I've finally got the TIE Fighter project's Combat Map and Goal Watcher functions into a presentable-enough state to show them off.

https://www.youtube.com/watch?v=nhlkMr3DLxY

Blatantly and Lazily Copy-Pasting from the Video Description posted:

The Mission Goal Watcher shows me in real-time what the mission's goals are and whether they've been achieved. While there is an in-game goal viewer it does not show bonus goals when playing the game's campaign mode. Invoking the in-game Mission Goals viewer also breaks the in-game mission recorder, setting the quality of all the models to their lowest when the mission is played back in the Film Room. Hidden Penalties are never shown to the player (i.e. calling for reinforcements will always penalize the player 5000 points, but some missions will apply additional penalties if the reinforcements get destroyed.)

On the topic of the in-game mission recorder -- while it's a very cool feature it's not without its bugs and problems. A few things can introduce desynchronization, where the recorded playback differs from the actual events that occurred. One of those desync-inducing events is the player's craft being boarded to receive a reload of warheads, which seems to introduce desync 100% of the time. One of the ways to mitigate the desync is to load up the mission in the Combat Chamber first, then play back the recording. This doesn't work all the time, as can be seen at 5:30 when my craft start's firing at nothing and I'm quickly destroyed by enemy fire. You may also note that the briefing officer voice-overs are only being sampled from Battle 1 Mission 1. In summary, the mission recorder is an awesome feature, but not without its issues!

The Combat Map shows a real-time representation of the field of combat, as viewed from 'above.' Ships are shown as colored icons (their color indicating their IFF/faction), while at certain zoom levels larger craft are rendered as vector images. Any existing (non-exploding!) craft can be focused on and followed. Once a craft is no longer valid focus returns to the player's craft. There are still some minor issues to work out, though. For example, loading a new mission may not always correctly re-focus on the player's craft, but instead on one of their wingmen.

Edit: Also, let's talk mission scripts and triggers for a second. Eagle-eyed viewers may notice that during B1M5 I intentionally attack and disable some of my allies. This is because that Flight Group's orders are:
code:
* Attack, at 100% throttle, B-Wings.
* Attack, at 100% throttle, Rebel craft.
* Go Home, at 100% throttle.
While this seems innocuous enough, if they happen to pick Calamari Cruiser Lulsla as their target (it's a Rebel craft) and start attacking it... the player is in for a nasty surprise.
10 seconds after the Lulsla is fired upon, a group of nimble A-Wings will launch and specifically target the player. A-Wings aren't too big a deal for the player's Assault Gunboat, except these are armed with late-game warheads which can easily kill the player with 2 hits. A total of 8 of these assholes will mob the player at once, with 16 more in reserve if you blow up the first wave. Totally not worth it. To prevent their arrival trigger from firing I need to keep the Lulsla from being shot at. Normally I'd issue orders to my allies to Go Home or Wait, but that one FG will not obey player orders, so I'm forced to disable them in order to save my own rear end!

I'm actually keeping notes on mission scripts and triggers that should be changed for an improved player experience (i.e. keeping that gunboat flight group from shooting the Lulsla.) When I'm done playing the campaign and taking notes I'll make edits to the mission files and probably post them somewhere for TIE fans to try out.

Neurion fucked around with this message at 05:35 on Aug 10, 2017

Mezzanine
Aug 23, 2009


I've been neglecting my Github forever. Plus I've never written and published a Ruby gem, so I'm making a silly gem that makes fancy text. It looks better in a browser than Terminal or whatever.

https://github.com/MezzanineMK2/hen_text

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Neurion posted:

I've finally got the TIE Fighter project's Combat Map and Goal Watcher functions into a presentable-enough state to show them off.

https://www.youtube.com/watch?v=nhlkMr3DLxY

Nice! I've always been curious how TIE Fighter worked internally since it was the template for a lot of future space sims.

I got my Apple 2 emulator booting games and displaying high-resolution graphics - but not in color, yet.

Pardot
Jul 25, 2001




I wrote something to aggregate info from my scale and screen scrape myfitnesspal and shove it all into postgres, and that’s been running for a month or so. Finally started to put some sort of visualization around it. Colors are green protein, red fat, blue carb.

I'm not exactly sure the best way to do the visualization, but I think this seems to be working. Want to also add some graphs and rollups and such.

Only registered members can see post attachments!

lord funk
Feb 16, 2004

Teapot!

Only registered members can see post attachments!

Tres Burritos
Sep 3, 2009


It beautiful

Luigi Thirty
Apr 30, 2006

Emergency confection port.


Eh close enough.

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD
Reminds me of when game engines first started to do bump mapping shaders and every single wall had to be made of pitted/bulbous stonework.

Jo
Jan 24, 2005

:allears:
Soiled Meat

~Coxy posted:

Reminds me of when game engines first started to do bump mapping shaders and every single wall had to be made of pitted/bulbous stonework.

Those were rough times.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

I want to do some cool 3D stuff on my Amiga after watching a bunch of old 90s demos. To that end I'm writing a floating-point matrix math shared library in C, basically the Amiga version of a DLL that I can use with any program. I modified an old example from 1997 and got it compiling, loading, and adding matrices together :toot:



Now if I could just figure out how to tag functions so they have names in Scout...

Neurion
Jun 3, 2013

The musical fruit
The more you eat
The more you hoot

Luigi Thirty posted:

I want to do some cool 3D stuff on my Amiga after watching a bunch of old 90s demos. To that end I'm writing a floating-point matrix math shared library in C, basically the Amiga version of a DLL that I can use with any program. I modified an old example from 1997 and got it compiling, loading, and adding matrices together :toot:



Now if I could just figure out how to tag functions so they have names in Scout...

That's pretty cool! How quickly can it do flops? While working on disassembling and analyzing TIE Fighter I discovered the game uses 32-bit fixed-point arithmetic, probably because they could not rely on every consumer to have a CPU that supported floating point ops.

Edit: I'm ignorant on whether or not the Amiga's CPU supported floating point arithmetic.

Neurion fucked around with this message at 08:27 on Aug 18, 2017

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Neurion posted:

That's pretty cool! How quickly can it do flops? While working on disassembling and analyzing TIE Fighter I discovered the game uses 32-bit fixed-point arithmetic, probably because they could not rely on every consumer to have a CPU that supported floating point ops.

Edit: I'm ignorant on whether or not the Amiga's CPU supported floating point arithmetic.

I have an upgraded Amiga 2000 with a 40MHz 68030 and a 40MHz 68882 FPU so it can do a little more than a stock unit :v: I should probably do fixed-point instead but I'm curious as to how fast it can do these floating-point calculations. If I keep all the math in a separate library it's easy to compare them since I can swap them out as long as their APIs are compatible. According to benchmarks my system's capable of around 15 MIPS and about 1 MFLOPS, should be enough for some decent 3D to show off. That’s somewhere around a fast 386 in terms of speed.

Stock it came with a 7.16MHz 68000 so that wouldn't be very useful for real-time 3D. I remember trying to play Quake on my 486 and not having a good time. The limiting factor as far as I'm aware is planar video hardware being unsuitable for 3D rendering as opposed to chunky video buffers. The blitter is perfectly capable of quickly drawing hundreds of lines and even filling polygons if you set it up right. The problem is that if you want to do a 4bpp (16-color) frame, you need to render the frame and then copy it into 4 separate buffers...

Of course if you precalculate everything and take maximum advantage of hardware and software tricks, you can pull off some pretty cool effects:

https://www.youtube.com/watch?v=5C8FhyAnMFw&t=81s

And here's someone playing Quake on a 50MHz 68030-equipped Amiga 1200.

https://www.youtube.com/watch?v=9ymBGXdl4mA

Luigi Thirty fucked around with this message at 09:08 on Aug 18, 2017

TheresaJayne
Jul 1, 2011

Luigi Thirty posted:

I want to do some cool 3D stuff on my Amiga after watching a bunch of old 90s demos. To that end I'm writing a floating-point matrix math shared library in C, basically the Amiga version of a DLL that I can use with any program. I modified an old example from 1997 and got it compiling, loading, and adding matrices together :toot:



Now if I could just figure out how to tag functions so they have names in Scout...

I used to write demos on the Amiga, the scrolling text was easy you make the screen wider than the visible screen and every width+space scrolls you paste the next character using the blitter.
Then you have only the copper list to do

line x to line y - hardware scroll left
line y to line z dupe line y - 2X (z-y) at half brightness

That gives you the mirrored text

TL;DR; the best thing with the amiga was the blitter and copper lists.

RIP Syndrome
Feb 24, 2016

TheresaJayne posted:

TL;DR; the best thing with the amiga was the blitter and copper lists.

The copper was brilliant. The side-scrolling sprite star field is another classic that's easy to do with it (just reuse the sprites). And you can experiment with plasma/interference all day.

I liked the M68k too. It wasn't fast (and no cache in the 000s), but the instruction set made sense, and it had lots of general purpose registers.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

68K ASM is a lot of fun. It’s simple and mostly orthogonal. And the Amiga gives you a whole lot of power to play with if you know how to pull off every trick. I don’t but it’s fun to figure them out!

lord funk
Feb 16, 2004

Yeah I know bloom is overused and cliché but oh man it was fun to implement :)

Xerophyte
Mar 17, 2008

This space intentionally left blank

lord funk posted:

Yeah I know bloom is overused and cliché but oh man it was fun to implement :)

Until we have fusion-powered HDR displays that can output solar intensities straight into your eyeballs we need some way to differentiate "white like the sun reflected in chrome" and "white like scrambled eggs in the kitchen". Bloom is a fine fix as long as you don't overuse it, and people who dislike bloom filters should stare at the sun for a few hours and then ask themselves if they really want that experience recreated in their movies and video games.


To contribute: I hacked in signed distance field ray marched geometry for our path tracer at work:


My intersection code is a bit buggy, which is why parts of it are semitransparent for no real reason. Also, I should've chosen a better scale for the wood material. Also, totally breaks our irradiance caching so I had to render in brute force slow mode. Still looks pretty neat.

[E:] One more. Should be a transparent PNG, but imgur is apparently not a fan of 5 MB PNGs:

Xerophyte fucked around with this message at 19:24 on Aug 29, 2017

munce
Oct 23, 2010


Hurricane Irma in 3D. Click for animated gif.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Continuing on the theme of "Luigi learns weird poo poo" here's some SS13 sprites animated on an Atari Jaguar.



The CPU is a 13MHz 68K but it has two totally custom RISC co-processors (Tom, the GPU, and Jerry, the DSP) that you're supposed to use for all your graphics operations. The hardware designer said as far as he was concerned the 68K was there to read the joysticks. In reality, most people found the RISC processors buggy and impossible to program (they use two slightly different assembly languages) and used the underpowered main CPU for just about everything. I don't know how to do much with the GPU yet so it's just drawing the gradient and running calculations in parallel with the CPU when the program starts.

Chunjee
Oct 27, 2004

I'd recognise that bee anywhere.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Fortunately SS13 sprites are almost entirely 32x32 and fit nicely into a 4bpp graphic setup. Yes, that includes...

MrMoo
Sep 14, 2000

JavaScript graphs are worse than than meeting a giant hairy coo in the middle of the road



From Flot to one of many frameworks above d3. This one is Rickshaw that doesn't like d3.v4 but there is a fork that does. It nicely gives error messages rather than randomly crashing, a better start at least.

MrMoo
Sep 14, 2000

Just marvelous, this is supposed to be an area chart,

Tres Burritos
Sep 3, 2009

MrMoo posted:

Just marvelous, this is supposed to be an area chart,

I found that it took a while for d3 to "click" with me, but once it does it becomes much easier to diagnose stuff like this. It kinda looks like your points aren't sorted or something.

MrMoo
Sep 14, 2000

It hates the gaps I have, rolling back some functionality I can get a basic area chart up:



However it looks like Rickshaw doesn't support error bars / confidence intervals or whatever the generic term is. Found a demo for vanilla d3js that implements it so will try that next.

Adbot
ADBOT LOVES YOU

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Working on my next article. Wanted to have users type in their own code, so I wrote a tiny little editor + framework that won't freeze your browser.

https://giant.gfycat.com/SomeDistantBasilisk.webm

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply