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
Synthbuttrange
May 6, 2007



Progress! I've gotten the bus to drive the way I want it to, so now I can start adding stuff like particles and passengers being thrown off on collisions. Let's just add a spawner to the bus on hit...


:stonk:

Adbot
ADBOT LOVES YOU

Rupert Buttermilk
Apr 15, 2007

🚣RowboatMan: ❄️Freezing time🕰️ is an old P.I. 🥧trick...

SynthOrange posted:



Progress! I've gotten the bus to drive the way I want it to, so now I can start adding stuff like particles and passengers being thrown off on collisions. Let's just add a spawner to the bus on hit...


:stonk:

Critical Omission: A sense of Reality.

:stare:

Fredrik1
Jan 22, 2005

Gopherslayer
:rock:
Fallen Rib

SynthOrange posted:



Progress! I've gotten the bus to drive the way I want it to, so now I can start adding stuff like particles and passengers being thrown off on collisions. Let's just add a spawner to the bus on hit...


:stonk:

I see your game is done, I've not even started :(

Mo_Steel
Mar 7, 2008

Let's Clock Into The Sunset Together

Fun Shoe

SynthOrange posted:



Progress! I've gotten the bus to drive the way I want it to, so now I can start adding stuff like particles and passengers being thrown off on collisions. Let's just add a spawner to the bus on hit...


:stonk:

Aaaaaaand compile, build, ship. :getin:

Angry_Ed
Mar 30, 2010




Grimey Drawer

SynthOrange posted:



Progress! I've gotten the bus to drive the way I want it to, so now I can start adding stuff like particles and passengers being thrown off on collisions. Let's just add a spawner to the bus on hit...


:stonk:

Critical Omission: Leaving the lid off the popcorn popper :getin:

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?
Critical Omission: bukkake bus needs porn music.

Diametunim
Oct 26, 2010


"I love watching bukkake. I mean, like, I don't know if I would personally ever do it but..."

Day 5: I went and visited the parents for 4th of July weekend, no work gets done here. I must escape.

Polo-Rican
Jul 4, 2004

emptyquote my posts or die
Palette switching is in! Also a simple dialogue system (there won't be much dialogue, only randomized lines between worlds)!



Not sure if this system allows me to crossfade, so I'll probably layer some crazy effect or a white flash over the screen when it switches.

Polo-Rican fucked around with this message at 18:23 on Jul 5, 2015

Mo_Steel
Mar 7, 2008

Let's Clock Into The Sunset Together

Fun Shoe

Polo-Rican posted:

Palette switching is in! Also a simple dialogue system (there won't be much dialogue, only randomized lines between worlds)!



Not sure if this system allows me to crossfade, so I'll probably layer some crazy effect or a white flash over the screen when it switches.

That talking head is fantastic too. :stare:

Rupert Buttermilk
Apr 15, 2007

🚣RowboatMan: ❄️Freezing time🕰️ is an old P.I. 🥧trick...

I have a name that anyone can use for their game, s'free!

"Confiscate or Die" (or maybe Confi-skate?). It's a skateboarding game. Critical Omission? No wipeouts. Be as confident as you can be!

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'
That moment when you realize that your idea requires you to almost make the entire game before you have a playable loop.

sighnoceros
Mar 11, 2007
:qq: GOONS ARE MEAN :qq:
I'm having a goofy Unity 2D issue, hopefully someone here can help.

I have a projectile prefab with a circle collider and rigidbody. I also have an enemy prefab with circle collider and rigidbody.

The OnCollisionEnter2D() of the projectile is set to destroy whatever it collides with and itself. But I'm seeing when shooting a mass of projectiles (think a shotgun) that some of them are bouncing off of the enemies as if they are reacting to the Unity physics engine but not actually triggering the OnCollisionEnter(). I'm thinking that the physics engine is batching the collisions, then when it goes to send the events it sees that the collided object is marked for destruction at the end of the Update loop and it decides to not send the event. But the physics simulation still happens.

Here's a .gif:



Here's the collision event:

void OnCollisionEnter2D(Collision2D coll)
{
Destroy(this.gameObject);
Destroy(coll.gameObject);
}

The projectiles are set to not collide with eachother or with the player using Unity's collision layer matrix.

Imajus
Jun 10, 2004

Thirteen!
Here is a programming update. I'm pretty happy with what we have, considering we are two artists with limited programming chops. So far we have place holder graphics with the correct isometric perspective, dialogue boxes for NPCs with portrait functionality, player movement, basic echo location style vision, and enemy movement (which isn't see here.) Art update coming soon!

floofyscorp
Feb 12, 2007

oh no fish

that's not how you swim :(

Jo
Jan 24, 2005

:allears:
Soiled Meat
Finished the fade to black and level restart on death yesterday morning. Modelled, rigged, and UV unwrapped a redshirt robot. This little guy is an enemy, but can't attack or do anything, so he'll probably just be the human shield when the player can't find cover.



Also, I suck at painting, so I might leave it untextured.

xzzy
Mar 5, 2009

Three day weekend, and I've spent like two hours at the keyboard. :downs:

At least my click-and-drag-to-move idea seems not too hard.

https://gfycat.com/SleepyNeighboringCollie

(fun is another concern entirely)

sighnoceros
Mar 11, 2007
:qq: GOONS ARE MEAN :qq:

sighnoceros posted:

I'm having a goofy Unity 2D issue, hopefully someone here can help.

I have a projectile prefab with a circle collider and rigidbody. I also have an enemy prefab with circle collider and rigidbody.

The OnCollisionEnter2D() of the projectile is set to destroy whatever it collides with and itself. But I'm seeing when shooting a mass of projectiles (think a shotgun) that some of them are bouncing off of the enemies as if they are reacting to the Unity physics engine but not actually triggering the OnCollisionEnter(). I'm thinking that the physics engine is batching the collisions, then when it goes to send the events it sees that the collided object is marked for destruction at the end of the Update loop and it decides to not send the event. But the physics simulation still happens.

Here's a .gif:



Here's the collision event:

void OnCollisionEnter2D(Collision2D coll)
{
Destroy(this.gameObject);
Destroy(coll.gameObject);
}

The projectiles are set to not collide with eachother or with the player using Unity's collision layer matrix.

Yeah this is super aggravating. Basically it looks like whenever two or more projectiles collide with the enemy at the same time, the first one flags the enemy as "going to be destroyed" and Unity doesn't send collision events for the others, even though it still simulates physics for them (causing them to bounce off). I can delay the destruction until the next frame, which causes no bounce, but causes all of the bullets that collided to be destroyed, which when an enemy gets right up in your face it basically just eats all of the projectiles from the shotgun, which is not what I want.

I tried making the bullets trigger colliders so they would just pass through instead of bouncing off but I want to be able to have enemies that take multiple shots, and non-enemy objects to interact with, and want to apply force to them from bullets. What a pain in the rear end. Anybody experienced something like this before with Unity?

Funkmaster General
Sep 13, 2008

Hey, man, I distinctly remember this being an episode of Spongebob. :colbert:

Well, I don't have much time to work on anything but this theme gave me an immediate idea, so I'm thinking of following through on it. Let me know what you think.

Unparsable: a classic text adventure game (or IF if you prefer) in the style of, say, Zork. The critical ommision is that there's no text parser, so you can't enter commands in the traditional sense. Instead, you enter them by clicking verbs and nouns in the description text to string together commands. A few gimme commands will probably always be accessible (such as 'look,' 'take,' and 'inventory').

An example puzzle:

You're in the kitchen and there's a sandwich on the table. You're hungry, but because the word "eat" isn't available to you, you can't do the obvious. Among the objects in the kitchen is a closed window. The solution is to leave the kitchen and visit the front yard where a gate is open. Since you can see the open gate from here, you can use the verb 'open' on the window. Return to the kitchen where the window is now open, look at it for a description saying so, use the verb open again to open the fridge. The description of the fridge says that it's empty, and "there's nothing here to eat," so you now have access to the verb eat, which you can use on the sandwich to cure your hunger.

The puzzles would probably get more complex than this, but the basic idea is not to hide the solution, like a usual puzzle, but rather to hide the verbs necessary to do it. I can't tell if this would actually be interesting to play, though. Thoughts?

DancingPenguin
Nov 27, 2012

I ish kakadu.

sighnoceros posted:



Here's the collision event:

void OnCollisionEnter2D(Collision2D coll)
{
Destroy(this.gameObject);
Destroy(coll.gameObject);
}


I think you might want to switch it around like this:

void OnCollisionEnter2D(Collision2D coll)
{
Destroy(coll.gameObject);
Destroy(gameObject);
}
Since otherwise Unity might destroy the GO with the script, which then makes it unable to execute the next instruction (destroying the GO it collided with).
(this.gameObject is not necessary, gameObject does the same thing.)
I might be entirely wrong here, can't try it out at the moment.

DancingPenguin fucked around with this message at 23:32 on Jul 5, 2015

Xibanya
Sep 17, 2012




Clever Betty
Day 5:



OK, now to do it again but pixely-er.

Harold Krell
Sep 10, 2011

I truly believe that anyone and everyone is capable of making their dreams come true.

:unsmigghh:
Made some special music for my special game:

https://soundcloud.com/harold-krell/untitled-sagamedev-track

Aredna
Mar 17, 2007
Nap Ghost

Funkmaster General posted:

The puzzles would probably get more complex than this, but the basic idea is not to hide the solution, like a usual puzzle, but rather to hide the verbs necessary to do it. I can't tell if this would actually be interesting to play, though. Thoughts?

I think it's a really interesting idea and seems like a new twist on puzzles in adventure games. Or maybe it's my lack of experience in the genre. Either way of anything I've seen so far in the thread this is the one I'm most interested in playing.

alf_pogs
Feb 15, 2012


I've gone from never programming anything before to having a guy fall out of a helicopter when I click on him.



Also I managed to get the cloud tiles, background colour (from a soothing palette) and a bunch of other really minor things to be randomised every time, because hey, why the hell not. What a beautiful world it is, now all I need is functional collision detection on my lousy birds / witches / everything else

Tann
Apr 1, 2009

alf_pogs posted:

I've gone from never programming anything before to having a guy fall out of a helicopter when I click on him.



Also I managed to get the cloud tiles, background colour (from a soothing palette) and a bunch of other really minor things to be randomised every time, because hey, why the hell not. What a beautiful world it is, now all I need is functional collision detection on my lousy birds / witches / everything else

Excellent! Good work!

Synthbuttrange
May 6, 2007

Also now that I know my basic idea is workable, I'll have to start looking for sound and music.

Anyone feel like whipping up a lot of children screaming and appropriate music for a game about an out of control schoolbus? :v:

sighnoceros
Mar 11, 2007
:qq: GOONS ARE MEAN :qq:

DancingPenguin posted:

I think you might want to switch it around like this:

void OnCollisionEnter2D(Collision2D coll)
{
Destroy(coll.gameObject);
Destroy(gameObject);
}
Since otherwise Unity might destroy the GO with the script, which then makes it unable to execute the next instruction (destroying the GO it collided with).
(this.gameObject is not necessary, gameObject does the same thing.)
I might be entirely wrong here, can't try it out at the moment.

Hey, tried this, no luck. The destroy doesn't actually happen immediately, Destroy() just marks the object for deletion basically "at the end of the frame".

Looks like Unity's physics interactions happen in this order:

FixedUpdate() -> Physics Simulation -> Collision Events

The result is that during the Collision Events step, all of the physics interactions have been performed already (and indeed, the velocity of the bullets during OnCollisionEnter2D has already changed due to the bounce). And there's no pre-collision event that would allow you to quickly ignore the collision based on some logic.

Current idea is to store the previous frame's velocity, then when I detect that the above bullshit has taken place, I just restore the projectile's velocity, and by the next frame the offending collider will be gone so the projectile can continue on its way.

Pentecoastal Elites
Feb 27, 2007
Probation
Can't post for 17 hours!
A few quick ideas:
- Try setting the collider type to Trigger, and using OnTriggerEnter. IIRC this is the Unity-recommended way for stuff like passthrough "impacts" and move-through triggers (Triggers and OnTrigger* are weird and problematic but they'll probably work for this)

- I think coll.gameObject.SetActive(false) will fire immediately, so doing that before tagging the gameobject for destruction might work as well

- Forget colliders and have bullets raycast. Destroy the enemy when the raycast terminates within whatever small range (the bullet sprite length, probably)

sighnoceros
Mar 11, 2007
:qq: GOONS ARE MEAN :qq:
For 1 and 3, those suggestions would probably work fine but would require me to perform my own (simple) physics calculations during collisions for things that I want to apply force to (like pushing enemies or environmental objects around with bullets). Not a huge deal but ideally I'd like to let Unity handle the physics for me.

For 2, the problem with setting that (I tried doing lots of stuff, disabling the object, the collider, moving the object to a different physics layer with no collisions, etc.), is that by the time I set that flag, ALL of the physics interactions have already been simulated for that frame. So the bullets have already "bounced" away. So now I'm just trying to detect when this happens and readjust the bullet trajectory. Seems to be working, but hitting another issue where if you create a bullet spray when an enemy is within the area where the collider will be created (like right in your face), the OnCollision* events fire before anything else. Like I literally have a projectile created that seems to never have executed the Start() event. It collides, then is destroyed, and those are the only events that ever got fired.

Edit: Was able to solve that last issue by disabling the collider in the prefab, and enabling it during the projectile's first FixedUpdate to retrieve the velocity. This basically forces it to experience at least one FixedUpdate() before colliding, which lets me store the correct velocity values to restore in the case of the projectile collisions messing up. Seems to be working pretty well now.

sighnoceros fucked around with this message at 05:04 on Jul 6, 2015

Pentecoastal Elites
Feb 27, 2007
Probation
Can't post for 17 hours!
^^^
Smart, and a better for performance than what I have below. Preserved if it helps anyone.

Aha, ok. I think I understand a little bit better.
You might want to play around with Edit > Project Settings > Physics 2D. Specifically you'll want to look at Velocity/Position Iterations and the Baumgarte settings (how quickly collisions are resolved). Cranking these up should satisfy your original code, but at a performance cost. I don't think it'll be a big deal with what you've got going, but you can give yourself a lot of leeway by spreading the bullets out just a touch.

Pentecoastal Elites fucked around with this message at 05:12 on Jul 6, 2015

That Gobbo
Mar 27, 2010
Any good tips or articles for a 2D platformer level design? The last gamedev I participated in I felt like that was easily the part I struggled with the most. Definitely something I will need to work on as I flesh out the mechanics.

Jo
Jan 24, 2005

:allears:
Soiled Meat
I'm struggling a bit with level design too. I had figured I'd go through a series of implicitly training the player. Level 1 being, "How to move," with no enemies and a small slope, forcing the player to learn mouselook and straifing. Maybe jump. However, it feels like it's playing slightly too slow. Level 2 being, you don't have to kill enemies, etc. That seems too brief, though.

Gif of level: http://gfycat.com/CavernousBigDobermanpinscher

Xibanya
Sep 17, 2012




Clever Betty


Making piles of pixels takes way too long. Next time I should just steal poo poo from Street Fighter II.

E: And only now that I'm looking at it zoomed out do I realize that I shrank her legs without meaning to. Whoops. Are there free programs that have more sprite-friendly features than photoshop?

Xibanya fucked around with this message at 07:07 on Jul 6, 2015

Ultigonio
Oct 26, 2012

Well now.

Jo posted:

I'm struggling a bit with level design too. I had figured I'd go through a series of implicitly training the player. Level 1 being, "How to move," with no enemies and a small slope, forcing the player to learn mouselook and straifing. Maybe jump. However, it feels like it's playing slightly too slow. Level 2 being, you don't have to kill enemies, etc. That seems too brief, though.
What do you mean by "it's playing slightly too slow"?

That Gobbo posted:

Any good tips or articles for a 2D platformer level design? The last gamedev I participated in I felt like that was easily the part I struggled with the most. Definitely something I will need to work on as I flesh out the mechanics.
It really depends on what you're trying to accomplish with your level design. Is it the initial part, the teaching of mechanics, or is it figuring out how to keep levels new, interesting, and fresh as the game progresses?

Jo
Jan 24, 2005

:allears:
Soiled Meat

Ultigonio posted:

What do you mean by "it's playing slightly too slow"?

It really depends on what you're trying to accomplish with your level design. Is it the initial part, the teaching of mechanics, or is it figuring out how to keep levels new, interesting, and fresh as the game progresses?

I'm uncertain about how quickly I should be pushing the gameplay. From the video, the first level is about 10 seconds long, tops. It's supposed to show the person how to move and straife. That might be a little too rudimentary, so I could just throw them straight into a level where there are enemies and stuff, but they might not know where to go. Is it too new-age to do a 'teach by example' kind of thing? Has everyone played enough FPSes to just 'get it'?

Heisenberg1276
Apr 13, 2007


Got the basics of the interaction working. HaxeFlixel is really quite nice.

Definitely need to get some art in here soon though as right now it doesn't look like much!

Shoehead
Sep 28, 2005

Wassup, Choom?
Ya need sumthin'?
Idea: Your omission is sound, and instead you have to recognize notes by the strength of your controller vibrations like Beethoven

Fredrik1
Jan 22, 2005

Gopherslayer
:rock:
Fallen Rib

Heisenberg1276 posted:



Got the basics of the interaction working. HaxeFlixel is really quite nice.

Definitely need to get some art in here soon though as right now it doesn't look like much!

This thing hypnotized me, I realized I spent probably five minutes looking at it, also I'm a giraffe.

Keket
Apr 18, 2009

Mhmm
Walk cycles are hard :downsgun:


Also Photoshop seems to have slowed down the gif, auhg.

Synthbuttrange
May 6, 2007



Good enough for tonight.

Adbot
ADBOT LOVES YOU

Macichne Leainig
Jul 26, 2012

by VG

SynthOrange posted:



Good enough for tonight.

I'm not a judge, but I'm voting for this anyway. :catstare:

  • Locked thread