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
tripwire
Nov 19, 2004

        ghost flow

Contero posted:

It's actually not pyqt. I'm embedding the python interpreter into my C++ Qt program and using Boost::Python to expose functions to it. When I hit run it grabs the code from the editor and sends it to python:

code:
boost::python::exec(edit->document()->toPlainText().toLocal8Bit().constData(), nspace);
As for creating the surface, you might be able to replicate what I did in C++, which was to draw to an off-screen QImage, then once you want to swap buffers call setPixmap on your QLabel which is actually what's being displayed.

code:
// imageView is a QLabel, image is a QImage. I was testing out drawing to a larger QImage and then scaling down to reduce aliasing.
imageView->setPixmap(QPixmap::fromImage(image->scaled(640, 480, Qt::IgnoreAspectRatio, Qt::SmoothTransformation)));
I spent a lot of time scratching my head trying to figure out how to display a QImage as a simple widget. It's not exactly straightforward.
Ah, thanks. That answers my question completely. Youre certainly right that its not straightforward how to get an interactive display going on in qt, especially for what seems like it would be a very commonly used function.

Adbot
ADBOT LOVES YOU

fishbacon
Nov 4, 2009
wonderful yet strange smell

SlightlyMadman posted:

I'd been trying to put together a zombie survival game for years, but always managed to get hung up on making the graphics fancy. I finally decided the other day that graphics can gently caress off, and I'm starting it over as an ASCII roguelike, using The Doryen library.

I also decided to take the game in a new direction and make it more of an end-of-the-world survival scenario than a pure zombie apocalypse. Sure, there will still be plenty of zombies, but there will be other challenges as well to keep it interesting.



Working title is PTOTL or "Will the last one out please turn off the lights?"

Uuuh! Interesting!

I love zombie games, and roguelikes are also awesome!

How far along are you with it?

cowboy beepboop
Feb 24, 2001

Tommy Calamari posted:

These were the projects I was working on a couple of months ago before I burnt myself out on programming. Typing this up will hopefully inspire me to take them further - bit depressing to see how much effort I put in just to abandon them.

Metroland

The city generator became a jumping off point for the game I always wanted to exist: a high level transport simulator with a heavy focus on the network layout. I love both Sim City 4 and Open TTD, which come very close (with various patches), but there's always more than I want to deal with (zones, depots, etc). Each point has a number of residents and jobs; residents are mapped to jobs when the map is created. Your transport network has to actually take people from their home to their job (not just anywhere, a la vanilla TTD). This is also my first attempt at pathfinding; I just implemented the A* algortithm and a binary heap to go with it. Every time you change the network, it has to recompute the paths between every station - it takes a couple of seconds to do it on my slow little netbook, which I find acceptable. The interchanges at stations are also acknowledged (to stop people taking crazy routes across 9 lines, etc), though this could use some improvement.

I love this idea :)

necrobobsledder
Mar 21, 2005
Lay down your soul to the gods rock 'n roll
Nap Ghost

SlightlyMadman posted:

I've been putting together a free and open source ticket sales site:


I've always been shocked by the price of ticket sales sites, so I wrote my own for a local Burning Man event years ago. I've gotten a lot of people asking me if they could use it for their events, but the code was never really in a state for it, so I rewrote the whole thing in Django and it's going live this week.
haha, I actually had a start-up a few years ago basically doing the same thing as you, except we focused upon a particular niche market for ticket sales and had a revenue model that depended upon us taking some small commission. We were hoping that smaller venues would never use Ticketmaster again and use our site as much of their web operations for promotions as well as ticket sales instead of their sorry as hell sites made with 14 year old copies of Dreamweaver. Some doofuses made a Joomla / Mambo add-on that would setup concert calendars and such, but it was clearly made for those just wanting to put up a snazzy event calendar for their venue, not a full-fledged ticketing and online band promotion management system.

SlightlyMadman
Jan 14, 2005

Mr. Fish posted:

Uuuh! Interesting!

I love zombie games, and roguelikes are also awesome!

How far along are you with it?

Further than I thought I'd be, but I'm hitting the point where I need to decide which of my more advanced planned features I'm going to focus on, and which I'll need to cut. My grand vision has always been to create a defense and survival game with a build-mode as full featured as a game like The Sims, but I'm thinking I need to start smaller than that, and put this together first as more of an RPG with some barricading capabilities and supportive AI. Either way, ASCII games provide a refreshingly simple approach, and really amazingly stay out of the way of the gameplay, so I'm pretty confident this one will get finished.

necrobobsledder posted:

haha, I actually had a start-up a few years ago basically doing the same thing as you, except we focused upon a particular niche market for ticket sales and had a revenue model that depended upon us taking some small commission. We were hoping that smaller venues would never use Ticketmaster again and use our site as much of their web operations for promotions as well as ticket sales instead of their sorry as hell sites made with 14 year old copies of Dreamweaver. Some doofuses made a Joomla / Mambo add-on that would setup concert calendars and such, but it was clearly made for those just wanting to put up a snazzy event calendar for their venue, not a full-fledged ticketing and online band promotion management system.

Yeah, I can think of several companies just like that, but even the cheapest one I'm aware of still charges $1/ticket. It doesn't sound like much, and most places will just pass the cost on to the purchaser, but for events with around 1,000 people, it's a pretty serious amount of money. The only really novel part of my approach is the concept of doing it completely free, with no desire for profit whatsoever, and the inclusion of a POS barcode scanning station, which most of the cheaper companies don't offer, or will charge a lot extra for.

The Wizard of Oz
Feb 7, 2004



Raytracing using OpenCL, obviously just after the critical "holy gently caress this is even worse than GLSL on release" stage. At least that pain is over with; the code works on both ATI/AMD (at least on CPU) and NVIDIA implementations, and I understand how each implementation is terrible in their own special ways, so I can move onto more interesting stuff.

Hubis
May 18, 2003

Boy, I wish we had one of those doomsday machines...

Snodar posted:



Raytracing using OpenCL, obviously just after the critical "holy gently caress this is even worse than GLSL on release" stage. At least that pain is over with; the code works on both ATI/AMD (at least on CPU) and NVIDIA implementations, and I understand how each implementation is terrible in their own special ways, so I can move onto more interesting stuff.

Have you used CUDA? I'd be interested in your opinion of the two APIs (as well as what you think the "uniquely horrible" components of each OpenCL implementation are)

spinflip
Sep 11, 2001

O_o Helo U

OceanEvolver.html

OceanEvolver is this simulated evolution project I've been toying with for fun. The 'genome' of the little worms is an assembly language program, and it mutates each generation.

The whole thing is built with Processing which is an incredible language for quick, visual programs like this. You code in essentially Java and it gives you easy access to graphics operations. The deeper you get, the more problems you run into (only a subset of OpenGL is provided, they use Java 1.4 or something, etc.), but overall I don't think you can beat how easy it is to use.

Dr. Glasscock
Apr 15, 2004

HOO-DAH!!! Fatal Wiimote blow to the face, 20 points!

spinflip posted:


OceanEvolver.html

OceanEvolver is this simulated evolution project I've been toying with for fun. The 'genome' of the little worms is an assembly language program, and it mutates each generation.

The whole thing is built with Processing which is an incredible language for quick, visual programs like this. You code in essentially Java and it gives you easy access to graphics operations. The deeper you get, the more problems you run into (only a subset of OpenGL is provided, they use Java 1.4 or something, etc.), but overall I don't think you can beat how easy it is to use.


OceanEvolver is pretty awesome, I love A-Life stuff. The game I posted some number of pages back was also done in Processing. It's such a fun language to work with. I also wrote a flocking AI with it and it turned out pretty neat. So you're just doing it in your spare time for fun eh?

spinflip
Sep 11, 2001

O_o Helo U

Dr. Glasscock posted:

OceanEvolver is pretty awesome, I love A-Life stuff. The game I posted some number of pages back was also done in Processing. It's such a fun language to work with. I also wrote a flocking AI with it and it turned out pretty neat. So you're just doing it in your spare time for fun eh?

Yeah, Processing is awesome! I'm sure most people in this thread coded graphics projects when they were just picking up programming... I remember trying to create snow, making a stick man you could move around the screen, re-creating nibbles, etc. The hard part wasn't the logic, it was figuring out how to read an image, removing flicker, debugging screen coordinates, etc. I think Processing offers beginning programmers a nice environment between hello world and C++/OpenGL, and I hope it picks up for that.

I remember the game you posted and the glow effect looked great. How did you achieve it? Was it just semi-transparent shapes?

tripwire: Have you tried Processing? Your fractals/maps look fantastic and I think Processing might be a useful prototyping environment for that sort of project.

Dr. Glasscock
Apr 15, 2004

HOO-DAH!!! Fatal Wiimote blow to the face, 20 points!

spinflip posted:

Yeah, Processing is awesome! I'm sure most people in this thread coded graphics projects when they were just picking up programming... I remember trying to create snow, making a stick man you could move around the screen, re-creating nibbles, etc. The hard part wasn't the logic, it was figuring out how to read an image, removing flicker, debugging screen coordinates, etc. I think Processing offers beginning programmers a nice environment between hello world and C++/OpenGL, and I hope it picks up for that.

I remember the game you posted and the glow effect looked great. How did you achieve it? Was it just semi-transparent shapes?

Thanks! Yeah, if you look at the shots you'll see they're just transparent ellipses. I spent a lot of time tweaking them until I was happy they looked sufficiently 'glowy'. The entire game is Processing drawing a shitton of shapes every frame. The only reason it's playable is because it's running with OpenGL (and oh god Processing makes that easy to do).

When I was working as a graduate assistant I actually proposed Processing to the Computer Science department as a good intro language. They had just switched to using Alice (UGGGHHH) for 1/4 of a semester before going to Java for 101 students. I had made some example projects that demonstrated how easy it is. For example I had a tiny square screen with a line in the middle. Move the mouse to the left of the line and the background turns green, move it to the right and it turns red. Visually and interactively shows a conditional. I think it would be an awesome language to teach concepts like that.

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

Contains Acetone fucked around with this message at 18:04 on Jun 24, 2020

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!
Dubious update: Finally loving got quadratic SH working, also radiosity now uses a three-sample capture to get a full hemispherical degree manifold, meaning it handles contributions from shallow angles properly and overall looks exactly like it should. I've been considering going to photon mapping instead but this is so fast I really don't care.


Click here for the full 1280x800 image.


This was a terribly uninspiring chore for a number of reasons:
- Rotating an SH vector by a matrix is "easy", yet surprisingly difficult to find the formulae for. I finally dug it out of a thoroughly buried Bungie presentation, and have yet to find the formulae elsewhere.
- The Bungie version is apparently flipped on the Z axis for some reason.
- One of the formulae in the Sony paper is wrong.
- Most existing publications and code samples have numerous "mystery values", and still factor things by pi for some incomprehensible reason.

This was so annoying to get working I decided to post the "spoilers" and spare anyone else the frustration:
- Code to calculate the coefs for Lambertian reflectance based on a directional light.
- Code to rotate an SH vector using a 3x3 matrix.
- Code to sample the SH vector using Cartesian coordinates.
- No "mystery values"
- Eliminated sqrt(3) from coef 2,0 by premultiplying the relevent coefficient and dividing during sampling, so all constants are now rational numbers.

As for why you'd want to use quadratic... because it's very accurate, of course!

OneEightHundred fucked around with this message at 16:34 on Jan 20, 2010

Jo
Jan 24, 2005

:allears:
Soiled Meat

Contains Acetone posted:



The digit on the left is a raw bitmap with 784 pixels and the digit on the right is a reconstruction by a trained neural network based on a 500 bit binary vector. So, the model drew the one on the right knowing only the 100 bit values.

I'm working on a hand written character classifier (MNIST) for a class I'm taking. I'm replicating Dr. Geoffrey Hinton's work using neural networks to reduce the dimensionality of data (using discovered binary features) and then I'm going to use a K Nearest Neighbor classifier to evaluate how good the reduced data is. Once I've done that, I'm going to do a similar thing with a slightly modified model using discovered continuous features and do a similar evaluation. The overall goal is to figure out which method works better. I suspect I should be able to use fewer features to get comparable classification performance with the continuous model, but who knows!

For a broad overview, check out this paper (very approachable to the layman!):

http://www.cs.toronto.edu/~hinton/science.pdf

I've been trying to get a hold on Hinton's work since I saw his Google talk. I might pester you for code when you're done. :3:

ColdPie
Jun 9, 2006

OneEightHundred posted:

- The Bungie version is apparently flipped on the Z axis for some reason.

Direct3D has a backwards Z-axis, and Bungie does all of their work on MS systems, so they probably do all of their work with a backwards Z-axis.

POKEMAN SAM
Jul 8, 2004

ColdPie posted:

Direct3D has a backwards Z-axis, and Bungie does all of their work on MS systems, so they probably do all of their work with a backwards Z-axis.

-Z is up, QTIYD.

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

ColdPie posted:

Direct3D has a backwards Z-axis, and Bungie does all of their work on MS systems, so they probably do all of their work with a backwards Z-axis.
There isn't really any reason to do SH calculations in a different coordinate system from the rest of the world though.

ih8ualot
May 20, 2004
I like turkey and ham sandwiches


I've been building a web-based application that allows users to embed photography in 3D, using the Google Earth Plugin. I've been using a lot of webcam URLs, so that the resulting imagery represents a live shot of a 3D space. So, for example, the image above shows what the Eiffel tower looks like, based off of a webcam image. There are a few university cameras where you can actually watch students as they move across campus.


Click here for the full 1410x664 image.


It's easy to calibrate a camera using my system, too (given enough 2D->3D correspondences). So, in the image above, the location and orientation of the Google Earth camera has been generated automatically.


Click here for the full 1416x647 image.


Our research group also maintains the Archive of Many Outdoor Scenes, which archives webcam images, so if you give it a URL or ID that we've captured, then you can look at historical imagery. So, in the image above, that false-color image on the left represents the images of this camera that we captured during 2009. So, as you click around on the false color image, the texture on Google Earth changes as well.

http://amos.cse.wustl.edu/live3d/

midnite
May 10, 2003

It's all in the wrist

OneEightHundred posted:

Dubious update: Finally loving got quadratic SH working, also radiosity now uses a three-sample capture to get a full hemispherical degree manifold, meaning it handles contributions from shallow angles properly and overall looks exactly like it should. I've been considering going to photon mapping instead but this is so fast I really don't care.

Nice!

Question: What do you use for generating the UVs for your lightmaps? Did you write something yourself? or...

Also, have you seen this website:
http://www.paulsprojects.net/index.html

This guy is pretty crazy (he even wrote his own 'VMWare', open-sourced there), but he's got his source up for spherical harmonics, including rotation code, etc.

Edit: It looks like his rotation stuff is ZXZ and not like what you have worked out.

midnite fucked around with this message at 07:52 on Jan 22, 2010

Scaevolus
Apr 16, 2007

A simple random character generator. Next up: turning the bitmaps into brushstrokes, so I can automatically make larger or smaller characters, and render them nicely.

SlightlyMadman
Jan 14, 2005

Scaevolus posted:

A simple random character generator. Next up: turning the bitmaps into brushstrokes, so I can automatically make larger or smaller characters, and render them nicely.



Neat! Is this for creating convincing-looking alien languages or something?

Scaevolus
Apr 16, 2007

SlightlyMadman posted:

Neat! Is this for creating convincing-looking alien languages or something?

Basically. Some scientists used this method to create a message for aliens.

This paper describes the technique: you generate a bunch of random characters and ensure that they all look different. The original purpose was error correction, but it also makes them easy to tell apart visually.

Scaevolus fucked around with this message at 01:46 on Jan 23, 2010

Trabisnikof
Dec 24, 2005

Scaevolus posted:

A simple random character generator. Next up: turning the bitmaps into brushstrokes, so I can automatically make larger or smaller characters, and render them nicely.



Those look like something out of Conway's game of life. Awesome.

Votlook
Aug 20, 2005


An ant simulator in Processing. The ants walk around, looking for food (green circles). If they enter a red circle they get hurt, drop blood. Other ants can 'smell' this blood and avoid the area. Maybe I'll make a game out of it sometime.

Votlook fucked around with this message at 23:31 on Mar 21, 2022

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

midnite posted:

Question: What do you use for generating the UVs for your lightmaps? Did you write something yourself? or...
The maps are still based on the Q3 format, so it generates them automatically per-surface. I modified it to support recharting and allocate space more efficiently, but otherwise it's mostly unchanged.

quote:

Also, have you seen this website:
http://www.paulsprojects.net/index.html
Yeah, that's based on the Sony paper primarily. I hit up practically every site on the topic figuring that stuff out, the ONLY one with the matrix rotation code I've found were the Bungie slides, which they incidentally DIDN'T put in the version on their main publications page.

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh
Got bored, wrote a simple implementation of the chaos game using Boost.GIL:

Trabisnikof
Dec 24, 2005

Avenging Dentist posted:

Got bored, wrote a simple implementation of the chaos game using Boost.GIL:


That is sexy as sin.

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh
Oh, and here's a quickie using a couple different variation functions:

tripwire
Nov 19, 2004

        ghost flow

Avenging Dentist posted:

Oh, and here's a quickie using a couple different variation functions:



That is awesome!

RussianManiac
Dec 27, 2005

by Ozmaugh
Are you doing the fractal flame algo?

monsterland
Nov 11, 2003

Pardot
Jul 25, 2001




Is that a fallout mod or remake?

monsterland
Nov 11, 2003

It's a Fallout-influenced CRPG currently using sprites from Fallout: Tactics. However it is really not a replica of Fallout.

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

fishbacon
Nov 4, 2009
wonderful yet strange smell

monsterland posted:

It's a Fallout-influenced CRPG currently using sprites from Fallout: Tactics. However it is really not a replica of Fallout.

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

Looks super sweet.

monsterland
Nov 11, 2003

Mr. Fish posted:

Looks super sweet.

Thank you :)

tripwire
Nov 19, 2004

        ghost flow
Good job monsterland!

Avenging Dentist, how are you getting those pics out of the chaos game algorithm? I was inspired to try and duplicate that effect yesterday from reading about it on mathworld but the pictures it's been spitting out look nothing like what you've posted. It's possible my implementation is really buggy, but are you doing anything different algorithmically to get that look?

RussianManiac
Dec 27, 2005

by Ozmaugh

tripwire posted:

Good job monsterland!

Avenging Dentist, how are you getting those pics out of the chaos game algorithm? I was inspired to try and duplicate that effect yesterday from reading about it on mathworld but the pictures it's been spitting out look nothing like what you've posted. It's possible my implementation is really buggy, but are you doing anything different algorithmically to get that look?

It looks like he is using a fractal flame algorithm: http://en.wikipedia.org/wiki/Fractal_flame

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh

tripwire posted:

Avenging Dentist, how are you getting those pics out of the chaos game algorithm? I was inspired to try and duplicate that effect yesterday from reading about it on mathworld but the pictures it's been spitting out look nothing like what you've posted. It's possible my implementation is really buggy, but are you doing anything different algorithmically to get that look?

I'm just using regular chaos game stuff plus variation functions stolen from the fractal flame thing. It's really easy to choose bad transform functions for your iteration though.

XHydralisk
Oct 8, 2003
Morph to lurker

http://www.youtube.com/watch?v=wYLo8JD7o9w
falling sand style game made with XNA. Play with water and snow to create an ice sculpture!


A deck randomizer for games like ThunderStone and Dominion. It can read a decklist from a file and randomize it for you!

Adbot
ADBOT LOVES YOU

Super Delegate
Jan 20, 2005

ƃɐlɟ ǝɥʇ
I made a Windows Mobile application that alerts you to missed text messages and phone calls. After setup the program runs in the background, and if it detects an unread text thats been there for X minutes it alerts the user using MP3s, LED lights, and/or vibrations.



It works perfectly in my Samsung Jack, but I'm looking for testers to try it out on other phones.

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