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
gold brick
Jun 19, 2001

no he isn't

From Earth posted:

Made a proof-of-concept of a semi-realistic lighting engine for a Roguelike over the weekend.
Don't know if you saw this, but Eric Lippert (from the C# compiler team) had a series of posts on this a while back. The code is in C#, but he spends a good deal of time discussing how he went about solving the problem.

http://blogs.msdn.com/b/ericlippert/archive/2011/12/12/shadowcasting-in-c-part-one.aspx

Adbot
ADBOT LOVES YOU

quiggy
Aug 7, 2010

[in Russian] Oof.


HappyHippo posted:

I've been considering a lite RTS. I don't think I'd base it off this though - it isn't grid based and there's no pathfinding at all.

In that case do you mind if I steal the art style and heavily base some mechanics off of it? I've been wanting to do a simple RTS for a while now but was having trouble finding a good starting place/goal.

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

HappyHippo posted:

Thanks guys


Yeah position is important. So is building new bases at the start.

And yes some games do get ridiculous. I'm thinking about adding nukes - that could prevent that sort of thing.

This one might never actually finish:


I'm running it in a VM, it's going about 1 frame per 4 seconds right now. There's so many bases that I can't count them any more, but it was about 50 for each side before it got too crowded.

One thing to help prevent this might be being pickier about where bases can be built (e.g. not on top of each other), but you're not doing collision checks right now which I assume would be problematic.

Opinion Haver
Apr 9, 2007

You could do something like 'a base can't be built within d distance of another base' and just brute-force the list of bases every time a new one gets built.

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

From Earth posted:

Up next: Shadow-casting for non-floor-to-ceiling objects (e.g., characters and low walls), diffuse lighting, and reflections if I feel up to it.
This is pretty awesome.

Is the basic idea for non-floor-to-ceiling objects that they reduce light by some percentage depending on how big they are?

And you should totally do reflection, I don't think it will be very hard, and it will really push the realism through the roof. Does everything in your world have material types?

Marsol0
Jun 6, 2004
No avatar. I just saved you some load time. You're welcome.
Non-interactive, console-based, non-curses Game of Life. Input it taken from a file at launch. It's nothing special. I just got bored on a plane.

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
I got totally distracted from the Weekly Game Jam and accidentally wrote a compiler. :doh:


Source (Forth)

Space Kablooey
May 6, 2009


Internet Janitor posted:

I got totally distracted from the Weekly Game Jam and accidentally wrote a compiler. :doh:

:stare: How does this happen?

From Earth
Oct 21, 2005

gold brick posted:

Don't know if you saw this, but Eric Lippert (from the C# compiler team) had a series of posts on this a while back. The code is in C#, but he spends a good deal of time discussing how he went about solving the problem.

http://blogs.msdn.com/b/ericlippert/archive/2011/12/12/shadowcasting-in-c-part-one.aspx

I went into this without reading up on existing algorithms, because I wanted to figure it out on my own. Scrolling through the article, it seems I do at least one thing the same (dividing the full 360 degree range into eight sections, and solving each independently), but there are some differences. Once I've got all features in, I might do a write-up of how my algorithm works.


taqueso posted:

Is the basic idea for non-floor-to-ceiling objects that they reduce light by some percentage depending on how big they are?

Not quite. Like I said, I might do a full write-up in the future, but the basic idea is that I'll project the shadow of the object onto the 256*64 image that I use to determine the light color for a given set of angles. That way, all points behind the object will sample their light color from the now-shaded area, which will make them darker. The cool thing is that it even allows for neat effects like colored glass, since that'd be as easy as slapping a blue "shade" onto the light map instead of a black one.

quote:

And you should totally do reflection, I don't think it will be very hard, and it will really push the realism through the roof. Does everything in your world have material types?

Not yet, I'll add that once I add diffusion. I hope reflection will be somewhat doable, I haven't really given it much thought yet.

Suspicious Dish
Sep 24, 2011

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

HardDisk posted:

:stare: How does this happen?

Compilers are addictive to write.

Deus Rex
Mar 5, 2005

There's no way I can release this since I don't have the Drinkify creators' permission, but I wanted to play with writing a basic Spotify app:



Predictably, the Spotify apps API is awesome to work with and a lot of fun.

Since Drinkify doesn't have an API, and their website doesn't support CORS, I had to whip up a JSON proxy. Sinatra + Heroku is awesome for doing stuff like that; I had a solution up and running in like 30 minutes :q:

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Objective C is easy.

From the web:



to the iPhone:

    

akadajet
Sep 14, 2003

Luigi Thirty posted:

to the iPhone:

Hah. I joked about making this on the LCs last night.

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."

HardDisk posted:

:stare: How does this happen?

I was going to make something like a CoreWars game so I started working on a text editor, and then I realized it would be neat if I could use it as a REPL, and the next thing I know it's 10:00pm and I've built an ouroboros out of Forth.

Komet
Apr 4, 2003



Open access, linked open data catalog of Roman Imperial Coins.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

akadajet posted:

Hah. I joked about making this on the LCs last night.

People have been asking me to make it for a while, actually. Might as well. Even got Valve's official permission to use their assets and everything.

PDP-1
Oct 12, 2004

It's a beautiful day in the neighborhood.
I spent the last couple of months building an open-frame laser bed for a client, and today I got the OK to use some screenshots as a portfolio piece. I can't show any actual test data however, so everything in the image below comes from a software simulation of the hardware system that I use to test the control program.

The hardware setup consists of a Class IV source laser that shoots a beam into a test sample. The test sample is temperature controlled and spits out another laser beam at a different wavelength. There's a thermal power detector head that absorbs the output laser beam and figures out how strong it is by measuring a thermal gradient across a cooling structure, and finally there's a folded-grating spectrometer to monitor all the beam wavelengths.

All the hardware components plug into a master control program for easy operator use. If you've ever worked with vendor hardware interop you know that 90% of all hardware drivers could be pasted wholesale into the Coding Horrors thread, so I spent a lot of time hiding all the terrible interop structure inside of a set of wrapper objects an just exposing a minimal set of properties/methods that let you operate the device as if it was just another C# object. Each hardware device has to run on its own thread so they don't interfere with each other's operation, so I also made a custom databinding system to connect the device wrapper properties to the UI thread that handles all the cross-threading bullshit internally.

I wish I could show a picture of the hardware setup in operation but that'll take a lot more finagling since we have to clear images through various NDAs, IP lawyers, and ITAR regulations. The laser beams are all out of the visible range but if you turn off the lights and take a picture with a digital camera scattered light from the beams show up as a kind of electric purple color. With the silhouettes of all the control wires and cooling lines and the dark room background it just looks like some kind of demonic hell device and is all :science: as gently caress.

Ravendas
Sep 29, 2001




I'm a 2nd ed AD&D DM, and I was writing up the details for a location, when I looked at the treasure listing for ogres. Treasure type: M(Q, B, S). What the hell? Is that a lot, a little?
Instead of opening up a book and going through the tables and lists to see what's what, I wrote my own treasure generator 100% based off the 2e DMG. Every chart is in there, and I went even deeper to the items themselves. Some items have random stats and random powers and random alignments and such that the tables themselves don't describe, and most generators skip over.

Mine does it all easily from a console.

The only thing I've yet to add is the chance of a sword being intelligent, and all the things that entails.



This was simple to make, just really tedious as it was just putting in d20 and d100 chart one after another, linking them together, and poring through every item description to make sure I got all the rolls right.
Also, I have no idea how to make a UI with C++, so I've always just made console command stuff.

Zhentar
Sep 28, 2003

Brilliant Master Genius

Ravendas posted:

Also, I have no idea how to make a UI with C++, so I've always just made console command stuff.

Use Qt. It's probably the best UI framework I've worked with in any language.

shodanjr_gr
Nov 20, 2007

Zhentar posted:

Use Qt. It's probably the best UI framework I've worked with in any language.

This x1000.

If you are semi-competent with C++ you can start throwing around decent UIs with QT in one day.

Plus it's got a bunch of other frameworks that interact very nicely with each other.

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:53 on Jun 24, 2020

ufarn
May 30, 2009

Contains Acetone posted:



Improved code a lot and improved the UI a bit. Think I may add sliders for Lab color space. Also need to organize those textboxes better.
Here's an instructive guide that may be for CSS, but still shows some good pointers.

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?

yaoi prophet posted:

You could do something like 'a base can't be built within d distance of another base' and just brute-force the list of bases every time a new one gets built.

This ended up being the easiest, so I just went with that

Bonquisha Romaine
Mar 23, 2011
Does it have to be awesome super-serious stuff? I spent a little time learning javascript (coming from a C/C++ background) and got this far in a couple days learning canvas. Also, I have hooked up basic mouse capture.

Part of me wants to keep going and try to turn it into a simple game, to force me to keep learning. Another part wants to retreat crying because JS is weird and scary (typeof doesn't even do what it's supposed to half the time). A third part is thinking I'm posing this in the wrong thread.

Ah well, CHECKERBOARDS!

Only registered members can see post attachments!

Ravendas
Sep 29, 2001




I'll check QT out later, thanks!

Though I don't think this kind of application (command ->output) really needs much of a UI, a D&D forum I posted it on doesn't care a bit, except for "Will this be released with a UI?"

Edit: Nice checkerboard, good practice for a new language. Now add choice of colors!

Mystery Machine
Oct 12, 2008


Been working on a little RPG. Right now, all I have is a rough battle system. HP and AT (like Final Fantasy!) bars work and animate well. The character sprites animate to cast magic, attack, or use items. The open space at the top middle is where the magic and item menus open into after you click them. I need to get spells and items working. From there, I gotta make it so enemies attack you when their AT gets full. From there, I gotta code in stuff actually dying.

I'm not artistic, at all, and I'm a novice programmer (1 year of experience in an AP class in high school, and half a semester in college), so I'm really proud of this project. It's also my first time using Python.

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

Ravendas posted:

I'll check QT out later, thanks!

Though I don't think this kind of application (command ->output) really needs much of a UI, a D&D forum I posted it on doesn't care a bit, except for "Will this be released with a UI?"

Edit: Nice checkerboard, good practice for a new language. Now add choice of colors!

Making a GUI with C#/.net is really easy compared to C++ (in my experience) so that might be something to try out if learning a little C# sounds interesting to you. That said, I have nothing against command-line tools.

PresidentCamacho
Sep 9, 2009
I was playing with FontForge and @font-face to swap characters. Really just playing with ways to obfuscate HTML.

SuicideSnowman
Jul 26, 2003


Very early screenshot of a 2D space shooter I'm working on. My goal is to make a multiplayer based shooter (think a more modern version of the old Subspace Continuum game).

shrughes
Oct 11, 2008

(call/cc call/cc)

SuicideSnowman posted:



Very early screenshot of a 2D space shooter I'm working on. My goal is to make a multiplayer based shooter (think a more modern version of the old Subspace Continuum game).

Are you aware of the Discretion project?

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Doesn't sound like the sort of project you should go blabbing about on internet forums. :razz:

SuicideSnowman
Jul 26, 2003
I've read a little about it. I plan on taking my game in a different direction though.

mst4k
Apr 18, 2003

budlitemolaram

SuicideSnowman posted:

(think a more modern version of the old Subspace Continuum game).

This looks really, really nice. I know it's just one screenshot but it still looks good. Keep working on it man! Subspace is probably one of my all time favorite games (DSB4Life) and it just keeps slowly dying.... :( I mean it is like 15 years old now I guess though.

Red Mike
Jul 11, 2011

SuicideSnowman posted:

(think a more modern version of the old Subspace Continuum game).

Subspace is still modern, drat it. :smith:

But seriously, that already looks great. Add even bare-bones gameplay to it, and I'd be playing it during work breaks for sure.

Griffith86
Jun 19, 2008
working on a POS system for a company.

Login Screen

Main Window

Search View

(my hosting)

Griffith86 fucked around with this message at 22:36 on Mar 22, 2012

G-Dub
Dec 28, 2004

The Gonz

Griffith86 posted:

working on a POS system for a company.

I don't know why but I have always wanted to do something like this. Also the software for ATMs. That looks really nice. What are your tools?

Griffith86
Jun 19, 2008

G-Dub posted:

I don't know why but I have always wanted to do something like this. Also the software for ATMs. That looks really nice. What are your tools?

Thanks, right now it's really early in the development stages and those are mockups so it will probably be dramatically different before we are done.

It will all be web based though and serve about 30 stores.

Scaevolus
Apr 16, 2007

Griffith86 posted:

working on a POS system for a company.

(my hosting)

Is this for a touchscreen? You should make all the buttons and text as large as possible-- it will make the users' lives easier.

Griffith86
Jun 19, 2008

Scaevolus posted:

Is this for a touchscreen? You should make all the buttons and text as large as possible-- it will make the users' lives easier.

Eventually yeah, I'm already planning for that I was just getting the rough idea down then I was going to go back and make adjustments for it.

Adbot
ADBOT LOVES YOU

Pfhreak
Jan 30, 2004

Frog Blast The Vent Core!

Griffith86 posted:

Eventually yeah, I'm already planning for that I was just getting the rough idea down then I was going to go back and make adjustments for it.

Also, you may want to be more deliberate in your use of color. For example, red indicates both void and pay, which are opposite actions, right? Blue means options and list products? The lines in the payment area seem to blur/smunge together.

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