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
bobua
Mar 23, 2003
I'd trade it all for just a little more.

Suspicious Dish posted:

This really isn't a screenshot, but I just published an article today about X11.

http://magcius.github.io/xplain/article/
http://magcius.github.io/xplain/article/x-basics.html

It has kittens!

Excellent stuff, even for someone that has no background in this to understand. It's always helpful(and interesting) when people take the time to explain why something was originally done a certain way, like the memory constraints from long ago.

Adbot
ADBOT LOVES YOU

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

Suspicious Dish posted:

So, let me ask you guys: did you understand the material? Or was everything perfect? Should I write less for the next article? Write more? Did I spend too much on basic stuff everybody already knows and then when we got to the complex stuff, "the bottom fell out" and you lost me? Any technical questions left after reading that?
It's a decent read. My background has traditionally been in low-level DOS (later Win32) pixel pushing so to see how everything started on the Unix side is quite interesting.

One thing that you didn't explain, but maybe that's also outside the scope of your articles, is why certain decisions were made in the first place. For instance, why have an X Server? Why not "just" do more stuff locally? Were the clients traditionally very slow framebuffer-only devices, or is there more reasoning behind it all?

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Sagacity posted:

One thing that you didn't explain, but maybe that's also outside the scope of your articles, is why certain decisions were made in the first place. For instance, why have an X Server? Why not "just" do more stuff locally? Were the clients traditionally very slow framebuffer-only devices, or is there more reasoning behind it all?

Well, what's your other option? You need something so that multiple programs can use the same resource (the display). And if you want multiple programs to communicate, you need a protocol for them to talk. And then you need a server to be the intermediate between all the clients.

Windows and OS X have the same process that "runs" the display and does RPC between all the programs when you use GDI, it's just not as noticeable to the user.

Why build a wire level protocol instead of something more UNIX-like, like doing RPC through signals and files and shared memory? I'm not sure. Possibly because UNIX sockets were the lowest common denominator, and not every UNIX had POSIX shared memory at the time.

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.
I'm sorry, I should rephrase: I was under the impression that the server was historically run on another, more powerful, machine than the clients, but I may have misunderstood.

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD
X is a bit "unintuitive" in that the server is the user's crappy machine with the display, and the client is the powerful computer in the CS department basement.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

~Coxy posted:

X is a bit "unintuitive" in that the server is the user's crappy machine with the display, and the client is the powerful computer in the CS department basement.

That didn't use to be the case. The server used to be on the powerful SGI machine, and the client is the one who's running a dinky program.

hendersa
Sep 17, 2006

~Coxy posted:

X is a bit "unintuitive" in that the server is the user's crappy machine with the display, and the client is the powerful computer in the CS department basement.

So... did anyone else ever export their DISPLAY to another Unix machine's IP and then pull up horrible pictures? Or log into other machines, export the DISPLAY to your local machine, launch a media player, and blast embarrassing audio out of the other machine?

Back around 1997 or so, I was an intern at Sikorsky Aircraft in their simulation department. We were using a whole bunch of SGI Indigos running Irix 5.x with IRIS GL on them to run a Blackhawk helicopter simulator. Each machine ran a control panel display or a projector that went to a screen for the view outside the window. Together, they had enough horsepower to run the whole thing. These days, OpenGL running on a single low-end Intel GPU could replace the whole thing with power to spare. I had the task of logging into a bunch of these machines to update the hosts file on each one. Out of force of habit, I launched the "jot" text editor. It didn't show up on my local machine, so I was a bit confused. It turned out that some poor military pilot was down in the simulator with the engineering staff in a glass booth nearby, and all of a sudden this gigantic text editor window popped up in front of the pilot. The pilot was not amused.

I earned a scowl and finger waggle from an engineer and mandatory training on how to use vi.

And that, my good goons, is how I learned to use vi.

Tres Burritos
Sep 3, 2009

hendersa posted:

And that, my good goons, is how I learned to use vi.

The moral of the story is 1997 was awful and you had to use vi.

Toekutr
Dec 9, 2008


https://dl.dropboxusercontent.com/u/3581058/gol-byte-v2.3.bin
You can run that in an genesis emulator or on real hardware if you have a flash cartridge.

I'm now writing some 68k asm to speed it up :science:

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
Toekutr: Badass. What is it written in? Are you willing to share the source code?

Woodsy Owl
Oct 27, 2004
I've been working on an application to assist in detecting duplicate files. I've got a project.log here. I'm writing the application in Java and decided on Swing for my UI because I've always wanted to learn Swing but procrastinated learning it. The lower-division undergraduate CS courses at my school never covered UIs at all, I think there was an upper-division UI design and development course but I never got around to it. I'm not allowing myself to rely on Eclipse's Window Builder plug-in too heavily, I'm mostly editing the source and using the Window Builder to preview my work and only allowing myself to use the Window Builder to place components that I've learned about and can do manually. I'll probably rework the UI using JavaFX after I am comfortable with my proficiency using Swing and once the application is in a usable state.

I settled on a wizard design for the UI. This is the third prototype for the Settings & Options pane and is probably what I'll settle on using for now. I'm pretty proud of it, this being my first Swing application and all.

Marsol0
Jun 6, 2004
No avatar. I just saved you some load time. You're welcome.
Cross-posting from the GameDev thread.

My first, real, graphics game. Written in Java2D.



Source: https://github.com/marsol0x/BlockStacker

Jewel
May 2, 2009

Finally getting back into the swing of programming after a holiday slump of not wanting to code at all.





I'm making a program (it runs realtime since it technically would be used in a game) that lets you place tiles down (would be generated by a map or something normally) and then it processes the tiles and splits them into tiles of 2x2, 2x1, 1x2, and 1x1.

Currently this works by just finding all the 2x2 areas, then all the 2x1/1x2 areas, then the remaining is 1x1, but in the future I might make it a slightly random chance not to place a 2x2 and another slightly random chance not to place a 2x1/1x2, just to give it a bit more variety (since if a 2x2 isn't placed there it'd pack a 1x2/2x1 instead, or 1x1's). Also it currently processes and places 1x2's before 2x1's, so I'd have to give that some kind of random chance to make it less uniform.

Anyway the purpose of this is I was looking at how Spelunky did their wonderful tiles:



And what they did, was the split it into chunks like I did, then used these tiles (for this area anyway)



I overlaid colors to show segregation of the tile chunks they used, all I'd have to do is pick a random one to use in each scenario, and I'm done!

The other thing they do for added flair is overlay the border textures around the edges, which is pretty trivial to do and adds amazing depth.

It all runs super super fast realtime right now since there's not much going on, so hopefully I'll have a nice demo of placing blocks and having them look really nicely detailed, soon enough!

Placing them realtime would add the annoying issue of having the tiles re-randomise every time you placed a new tile, and fixing that would require making a new system of only changing the affected tiles, but in the actual game the tiles are created on room load and then left alone, never re-adjusting themselves, so technically this wouldn't be an issue in anywhere but an editor, so I could probably get away with it, or having them not prettify until the level is built. Doesn't really matter, though!

Edit: I wondered where the tiles underneath the dent to the left of the door in that picture, were from. Turns out they're just from the 2x2 cyan section, but the top part of it had broken from the boulder falling on it. Confused me for a bit!

Jewel fucked around with this message at 17:11 on Jan 4, 2014

Pie Colony
Dec 8, 2006
I AM SUCH A FUCKUP THAT I CAN'T EVEN POST IN AN E/N THREAD I STARTED

Marsol0 posted:

Cross-posting from the GameDev thread.

My first, real, graphics game. Written in Java2D.



Source: https://github.com/marsol0x/BlockStacker

now write an AI for it

Jewel
May 2, 2009

I did it!

I added weighting so a 2x2 doesn't have a 100% chance to appear, added weighting so it chooses between placing a 1x2 or a 2x1 first, and weighted those to appear too, and it feels a lot more natural and nicer.

Then I finally added textures, picking a random source rect from a list. And here it is..! Here's three of the same tiles with randomised graphics:



And here's a debug overlay showing what's going on:



The red being 2x2, green being 2x1, yellowgreen being 1x2, and 1x1 is white.

Works pretty well! Really fast really smooth, absolutely no performance impact at all, especially if you were doing this only once on level load. Gonna add the borders later and see how that goes, but for now I think I'm done for a bit.

Edit: I made a pretty page about it if anyone cares, all the info on it is just what I posted but it's easier on the eyes.

Jewel fucked around with this message at 06:56 on Jan 5, 2014

LP0 ON FIRE
Jan 25, 2006

beep boop
I made a little script that compares computer players movement with the last round of movement and see if there was an improvement in score. If there wasn't, load the last round's velocities and mutate. If there was, save the current round's velocities and mutate the current. Teams (red and blue) are scored based on how far they get to the other side. If opposing teams touch each other, they stop, so they eventually find ways to avoid this to gain more distance. On the first found players start off with random velocities.


http://bugrobot.net/AIBattle/AIBattle.html

Un-ticking the "Animate movement" checkbox will skip animating the players movement and only display the end result, so the rounds will go by a lot faster. Depending on the amount of players, circumference of the players and size of the playfield, it will eventually solve itself.

I wanted to stay away from making some type of pathfinding script and just focus on solving a problem while the environment changes (the movement of the other team) with brute force. The problem that it could solve could really be anything that you could reward points to if it achieves.

I'm really unfamiliar with Javascript still, but I decided that I wanted to share this with people easily so I went this direction and stopped myself from making an app with Xcode. If I find it important maybe I'll make an app if I want an extra performance boost. For now, there are lots of code and UI improvements to make.

I've been wanting to make this for a long time, but I needed to wait for a gap of free time. Luckily I got a couple of snow days that cancelled work. :)

Voronoi Potato
Apr 4, 2010
instead of trying to get them to have the highest score, try to get them to score more than the opponent. then make it so that whoever is further away from their own side doesn't have to stop on collision

LP0 ON FIRE
Jan 25, 2006

beep boop

Voronoi Potato posted:

instead of trying to get them to have the highest score, try to get them to score more than the opponent. then make it so that whoever is further away from their own side doesn't have to stop on collision

Trying to get them score more than the opponent is actually how it originally was, and I'm thinking of adding it back in as an option. It went from that, to a whole team needing to beat their last score, to the individuals. I chose to make the individuals keep track because I found that it evolved faster. I like the your idea of the collision thing though. There's going to be all sorts of options that you'll be able to change. I just started putting them in. The interface is god awful right now, so there will be a lot of work to do. I also need to set limits. So be careful.

Jewel
May 2, 2009

My last post on the subject. If anyone cares, I'm finished with that program I was making. It generates this on the fly




And here's it with debugging turned on



All it does is just plop down decals based on open edges. Looks nicer on a dark background like it would be ingame. Still, super nice effect for what's incredible simple to do. Surprised spelunky was one of the first games I've seen to do this. Since they're decals it also lets your player go behind them for added depth.

kayakyakr
Feb 16, 2004

Kayak is true

Jewel posted:

My last post on the subject. If anyone cares, I'm finished with that program I was making. It generates this on the fly




And here's it with debugging turned on



All it does is just plop down decals based on open edges. Looks nicer on a dark background like it would be ingame. Still, super nice effect for what's incredible simple to do. Surprised spelunky was one of the first games I've seen to do this. Since they're decals it also lets your player go behind them for added depth.

very cool stuff. nicely implemented.

Baby Nanny
Jan 4, 2007
ftw m8.

https://goonauth.cattes.us/ (gonna eventually buy a proper domain)


Wrote an OAuth2 provider for verifying goon status. Learned a lot about oauth and how its not as poo poo as I always thought.

http://forums.somethingawful.com/showthread.php?threadid=3600708 put up a thread in project.log too for anyone interested in using the site. Basically its for people who want to verify goons but don't want to write a profile scraper (I did all of that for you!)

DeathBySpoon
Dec 17, 2007

I got myself a paper clip!
https://www.youtube.com/watch?v=780eZKRYDrg

Been spending a lot of time on my RPG engine and I feel like it's starting to get somewhere significant. I just finished the basics of the event scripting so I remade part of the beginning of SMT1 to test it out. It's nice when a tech demo starts crossing that threshold into a real game.

dizzywhip
Dec 23, 2005



Getting close to wrapping up the iPad version of my tablature editing app. Still a few features to add and a few rough edges to polish, but I'm really happy with how it's turning out.

YO MAMA HEAD
Sep 11, 2007

Oh yuck—don't beam triplets between beats (m. 3; additionally, measures are 1-indexed instead of 0). If it was my score I wouldn't write m. 2 quite like that either (quarter tied to dotted quarter rather than half tied to eighth) but it's not terrible. You're also consistently drawing stems too long (aim for one octave or to the middle line, whichever's longer). Notation is clean at least.

YO MAMA HEAD fucked around with this message at 22:50 on Jan 12, 2014

dizzywhip
Dec 23, 2005

Yeah, there are a bunch of problems with the notation that I'll get around to before release. The measures are 1-indexed by default, I just have a preference to set it to 0-indexed because I'm a nerd.

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
I'm building a new Logo interpreter to serve as the heart of an educational puzzle game I'm working on.





It's still in development, but the current release is fairly usable. Check it out: https://github.com/JohnEarnest/MLogo

glompix
Jan 19, 2004

propane grill-pilled

Internet Janitor posted:

I'm building a new Logo interpreter to serve as the heart of an educational puzzle game I'm working on.





It's still in development, but the current release is fairly usable. Check it out: https://github.com/JohnEarnest/MLogo

Oh hey, that's pretty sweet! I never had an appreciation for Logo until now. I didn't even realize it had loops. I'd love to see the code that drew that sierpenski triangle. :shobon:

YO MAMA HEAD
Sep 11, 2007

glompix posted:

Oh hey, that's pretty sweet! I never had an appreciation for Logo until now. I didn't even realize it had loops. I'd love to see the code that drew that sierpenski triangle. :shobon:

http://rosettacode.org/wiki/Sierpinski_triangle/Graphical#Logo ('seth' is shorthand for setheading, I guess?)

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
glompix: Thanks! Logo is a direct descendant of Lisp. Everybody remembers it for turtle graphics, but it's also a fairly powerful and elegant functional programming language.

My program is a bit longer than the rosettacode version and is a straightforward translation of how you'd do it with an L-system grammar:

code:
to f :x
  if (:x = 0) [ forward 14 stop ]
  f (:x - 1) left  120
  g (:x - 1) right 120
  f (:x - 1) right 120
  g (:x - 1) left  120
  f (:x - 1)
end

to g :x
  if (:x = 0) [ forward 14 stop ]
  g (:x - 1)
  g (:x - 1)
end

to sierpinski
  showturtle
  f 4
end
source

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
I hope your Logo interpreter is written in Forth, so we have Logo on Forth on Java.

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
This new one is written in straight Java, I'm afraid. See above for the github page. My older Logo interpreter, Loko, was written in Forth and ran on a VM I designed which happened to be implemented in Java, and did qualify as "Logo in Forth on Java" or perhaps "a vm in a vm in a vm".

This new one is written in a more conventional language because it's a small part of a very ambitious video game concept I'm pursuing wherein the player learns to speak the forgotten tongue of an ancient turtle-oriented civilization by exploring a series of ruins and solving (programming) puzzles.



It's sort of the same idea as my earlier game Forth Warrior, except with more story, more puzzle variety and (hopefully) accessible to complete beginners. I have a lot of work ahead of me.

Working title,

Doh004
Apr 22, 2007

Mmmmm Donuts...
Definitely a working title as that sounds like a porno. :wink:

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

Doh004 posted:

Definitely a working title as that sounds like a porno. :wink:

Ator
Oct 1, 2005

I'm making a bot for Bejeweled 3.



This screen is the bot program, which runs as a separate process alongside Bejeweled.

1) Direct3D dll hook injected into game process to get frame buffer
2) Dll sends frame across local socket
3) Bot program listens for frame on local socket
4) Using the FANN library, I run a trained neural network on each tile in the 8x8 gem grid
5) NN identifies each tile as red, green, blue, etc.
6) Bot program displays possible matches (the ugly debug rectangles), with yellow showing the preferred best move

The next step is sending mouse input to the game process, and then just sitting back and raking in those sweet, sweet automated points :bubblewoop:

I'm hoping to get a youtube video up soon of it in action!

Orzo
Sep 3, 2004

IT! IT is confusing! Say your goddamn pronouns!
Neat, how do you know what the 'best move' is?

Ator
Oct 1, 2005

That part isn't very advanced yet: it just sorts all possible moves by the match length (3, 4, 5), and after that comparison, it prefers matches lower on the grid.

Ideally, I'd like to write a board solver that builds temporary child boards in a decision tree, where each node in the tree stores what the board would look like after a gem swap. I still need to add logic for the hypercubes (can be matched w/ any gem), flame gems (explodes an area), and star gems (eliminates a row+column).

KoRMaK
Jul 31, 2012



Ator posted:

I'm making a bot for Bejeweled 3.



This screen is the bot program, which runs as a separate process alongside Bejeweled.

1) Direct3D dll hook injected into game process to get frame buffer
2) Dll sends frame across local socket
3) Bot program listens for frame on local socket
4) Using the FANN library, I run a trained neural network on each tile in the 8x8 gem grid
5) NN identifies each tile as red, green, blue, etc.
6) Bot program displays possible matches (the ugly debug rectangles), with yellow showing the preferred best move

The next step is sending mouse input to the game process, and then just sitting back and raking in those sweet, sweet automated points :bubblewoop:

I'm hoping to get a youtube video up soon of it in action!
A train neural network for bejewled.

drat that's rad.

How long did it take you to get FANN and the network setup?

Ator
Oct 1, 2005

KoRMaK posted:

How long did it take you to get FANN and the network setup?

I've used FANN before, so that part worked the first time. Identifying big blobs of color in an image is something NNs can easily do, so there is a lot of room for error in network design I imagine. What worked was this:

A fully connected, 3-layer NN, using the standard tanh sigmoid activation function
32x32 image (downsampled from 64x64) with 3 color components = 3072 input neurons
It needs to identify about 9 different gem colors (if you want to include 'invalid' as an option), so I gave it 9 output neurons
For the middle layer, I just doubled the output neuron count, so it ended up as a 3072-18-9 fully connected NN
The built-in RPROP backpropagation algorithm achieves 100% classification accuracy on my ~200 image sample dataset after just 20 epochs

I have so far done absolutely zero exploration into better network designs. Getting this vertical slice of features, and making it fast enough for realtime play, has taken about a month.

Contains Acetone
Aug 22, 2004
DROP IN ANY US MAILBOX, POST PAID BY SECUR-A-KEY

Contains Acetone fucked around with this message at 17:36 on Jun 24, 2020

Adbot
ADBOT LOVES YOU

Claeaus
Mar 29, 2010


More placeholder graphics! Got some basic things running now such as pickups and different weapons. Now before I continue I should stabilize everything to make it play nice on phones with shutting off the screen, scale correctly on different devices and so on.

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