Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411490 Posts in 69371 Topics- by 58428 Members - Latest Member: shelton786

April 25, 2024, 01:28:26 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsSkylight - 1st-person platform jumping and randomly generated music
Pages: 1 2 [3] 4
Print
Author Topic: Skylight - 1st-person platform jumping and randomly generated music  (Read 15905 times)
Jammo
Level 0
**



View Profile
« Reply #40 on: August 25, 2012, 11:21:49 PM »

Update! Version 0.87 is now in the OP.



Main thing is, I added continue points to make things slightly easier. However, there are only three continue points and they're single use only, so it's not much easier. They work like this:
- Hit a continue platform (they glow). Don't skip it! It stops glowing.
- Later on, you fall
- You automatically go back to the continue platform! Your score is reset to what it was when you hit the platform. All the platforms you hit after hitting the continue platform are reset to their original damage level (destroyed platforms are restored)
- If you fall again before you get to another continue platform, this time you lose.

I got a bit disheartened with this update because I had to implement a whole system for remembering the game state so I could reset it when you went back to a continue point, and I didn't know how to do it. In the end it didn't end up so hard.

I also fixed fall deaths so you don't have to fall alllll the way down to the cloud layer before you die. It's now really good at detecting when you've fallen too far to recover; so good that I've removed the R key to reset because it's no longer needed.

Hmm, liking the checkpoints. Not really sure what kind of difficulty category you're going for but the furthest I've got is about 43%, at which point I punched a wall. Not that it's particularly frustrating, it just took me a while to get that far haha.
Logged
Nition
Level 4
****


Some random guy


View Profile WWW
« Reply #41 on: August 25, 2012, 11:34:43 PM »

So what you're saying, is I need to make it possible to punch a virtual wall via the High Score screen, to prevent real-life damage.
Logged
impulse9
Guest
« Reply #42 on: August 26, 2012, 06:17:36 AM »

This is such a great idea. It would possibly be nice if you could collect items in mid-air as well, adding something to the music by doing so. The game is really mesmerizing. I played it for a while and I really enjoyed it.
Logged
Nition
Level 4
****


Some random guy


View Profile WWW
« Reply #43 on: August 27, 2012, 10:52:08 PM »

I've added a basic switchable third-person mode (press C when in-game) for those who prefer to play the game that way.



I think I've got it switching now without any weirdness happening. It should be persistent between attempts, but not through quitting and restarting. I don't really want to have it save your choice permanently, as a little passive encouragement to play in first-person. I feel it's more immersive. It's more like it's you playing.

A couple things I think it feels like it still needs:
- Little visible thrusters that fire on the robot's body so it makes some sense that he can move about in mid-air. But the whole model needs an update anyway (the 1st-person version too).
- A slight camera "bounce" when you hit a platform

I also added a basic blob shadow for the player in either view mode.

As always, latest download is in the OP.

Edit: Added view bob when hitting platforms.
« Last Edit: August 28, 2012, 06:28:10 PM by Nition » Logged
Nition
Level 4
****


Some random guy


View Profile WWW
« Reply #44 on: September 02, 2012, 04:16:29 PM »

As you can see here, I am a master of modelling and animation:

Logged
Nition
Level 4
****


Some random guy


View Profile WWW
« Reply #45 on: September 03, 2012, 09:40:45 PM »

Updated the download in the OP to version 0.90.

This is one of those updates where not much has visibly changed in the game, and maybe the marketing department comes and talks to you, and they ask what you've been doing for the past week.

That's why you always have The List:

  • Added basic gamepad support in-game (no keyboard or gamepad support in menus yet)
    Slightly spruced up the high score screen
  • Fixed "already broken" platforms and other platforms sometimes overlapping each other
  • High scores now also store and show % complete
  • Added different animations for falling and winning, so now you can flail around in like three different ways
  • When near the end, notes and chord changes will sometimes trigger on their own
  • Landing on the ROOF of your house at the end now ends the game, instead of you having to slide around to get down
  • Continue platforms temporarily lock the chord to C, so their own notes harmonise with the music
  • Added wind noise when falling fast
  • Continue point restarts are now based on the position of the continue platform, not the position of the player. Previously, if you hit the platform right in the corner or something you'd restart above that point
  • When reverting to a continue point, the camera is now angled down a bit so the player realises they're right above a platform
  • Tried to add a particle effect when hitting platforms but scaling particle systems (for the different platform sizes) is currently not possible in Unity Sad. Coming next release apparently
  • Hopefully eliminated the audio clipping in loud passages near the end of the game, but reducing overall colume when many sounds are playing
  • Background music fades out when you win or lose the game, and winning also locks chord to C
  • Increased continue point frequency slightly as I still have a lot of trouble finishing the game

There's a very rare bug where a null reference occurs and the game will miscalculate where you are, which can cause it to think you're below the platforms and hence have lost the game. I think I've stopped the bug from causing the game to think you've lost when you haven't, but now it could cause the game not to end when it should. I haven't been able to track down what's causing it yet, but as I said, it's very rare.

Next version will have either added background scenery or additional content in the level itself (or both). The version after that might actually be the real release.
Logged
Nition
Level 4
****


Some random guy


View Profile WWW
« Reply #46 on: September 04, 2012, 07:58:58 PM »

Pretty clouds, testing.


As part of doing this I took ikke998's particle cloud system and updated it to the new Shuriken system. If you're interested in using it, I posted it in that thread.
Logged
Nition
Level 4
****


Some random guy


View Profile WWW
« Reply #47 on: September 05, 2012, 03:08:54 PM »

I thought I'd share some code I wrote yesterday to create "clumps" of clouds inside an area. Hey, maybe someone can even correct my bad coding.

This could be used for any objects which you wanted to group generally together in clumps or flocks, while still maintaining random placement. I couldn't find anything via Google that did what I wanted, but there could very well exist a better algorithm for doing this already. Surely someone's wanted to make clumps of trees or animals or something in the past.

Code:
// startPos is the position of the first platform. endPos, the last platform
// Generate some clouds along the path
void MakeClouds(Vector3 startPos, Vector3 endPos) {
int numClouds = Random.Range(minClouds, maxClouds + 1); // Int random range is max exclusive
print("numClouds = " + numClouds);

int clumpiness = Random.Range(1, 26); // Choose cloud climpiness in the range 1 to 25
print("clumpiness = " + clumpiness);

// Work out the box that the clouds will fit inside
// This is a long cuboid with the path roughly in the centre
//(randomness causes the path to deviate, but usually not too much)
float midZ = (startPos.z + endPos.z) / 2f;
// Clouds don't start until a certain distance
float cloudsStartDelay = Random.Range(cloudsMinStartDelay, cloudsMaxStartDelay);
Vector3 bottomLeft = new Vector3(startPos.x + cloudsStartDelay, startPos.y, midZ - (cloudsWidth / 2));
float cloudsEndBefore = Random.Range(cloudsMinEndBefore, cloudsMaxEndBefore); // Clouds stop before the end
Vector3 topRight = new Vector3(endPos.x - cloudsEndBefore, endPos.y, midZ + (cloudsWidth / 2));

// Define cluster points. For cluster level 0, every cloud is its own cluster
int numClusters = numClouds / clumpiness;
// Bigger clumps are allowed to spread out more, because they have more clouds in them
float maxDist = 25F + (1.5F * clumpiness);
int cloudsPerCluster = Mathf.RoundToInt(numClouds / numClusters);

// Make some clouds within the box
Transform cloudContainer = GameObject.Find("CloudContainer").transform;
int curCluster = 0;
int prevCluster = -1;
Vector3 curPos = new Vector3();
int cloudCount = 0;
for (int i = 0; i < numClouds; i++) {
if (curCluster != prevCluster) {
float XPos = Random.Range(bottomLeft.x, topRight.x); // Float random range is INclusive
float ZPos = Random.Range(bottomLeft.z, topRight.z);

// Because it slopes up based on XPos
float percentThrough = (XPos - bottomLeft.x + cloudsStartDelay) / (topRight.x - bottomLeft.x + cloudsStartDelay + cloudsEndBefore);
float curYPos = Mathf.Lerp(bottomLeft.y, topRight.y, percentThrough);
float YPos = Random.Range(curYPos - (cloudsHeight / 2), curYPos + (cloudsHeight / 2));

curPos = new Vector3(XPos, YPos, ZPos);
curCluster = prevCluster;
}

Vector3 cloudPos = new Vector3(curPos.x + Random.Range(-maxDist, maxDist),
curPos.y + Random.Range(-maxDist, maxDist),
curPos.z + Random.Range(-maxDist, maxDist));

GameObject newCloud = (GameObject)Instantiate(cloud, cloudPos, Quaternion.Euler(0, 0, 0));
newCloud.transform.parent = cloudContainer.transform;

// Randomise this cloud a bit
ParticleSystem parti = newCloud.transform.particleSystem;
parti.startSize = Random.Range(15, 30);

cloudCount++;
if (cloudCount > cloudsPerCluster) {
cloudCount = 0;
curCluster++;
}
}
}



Clumpiness is an extremely scientific term by the way.

« Last Edit: September 06, 2012, 09:28:56 PM by Nition » Logged
Nition
Level 4
****


Some random guy


View Profile WWW
« Reply #48 on: September 06, 2012, 10:36:24 PM »

I've put up version 0.91. This is likely to be the last free release so get it while you still can. Assuming no major issues, the next release will be the real 1.0 paid version (I'm still thinking $3US), although I still have a bit to do before then.

This release adds clouds. I'm still tweaking them a little but they're basically there. I found a bug in the above source code so I've made a minor edit to the Y position calculation, in case anyone's copied it already.



Logged
Windybeard
Level 4
****



View Profile
« Reply #49 on: September 07, 2012, 05:28:32 AM »

cool game, i found i both frustrating and relaxing. An interesting combo (frustrating in a good way)
Logged

trurkowski
Level 1
*



View Profile WWW
« Reply #50 on: September 07, 2012, 04:10:00 PM »

Very Cool, I've always wondered how procedurally generated music works. Is there a backtrack that the piano keys always stick to the same key?

Great job!!!
Logged

Sound Design & Music Composition<br />http://soundcloud.com/trurkowski
Agaki
Level 0
*



View Profile WWW
« Reply #51 on: September 08, 2012, 05:07:14 AM »

Great stuff, love the idea behind it. Sometimes the clouds would get in the way abit though, but maybe that's because I was always looking directly downward or something.

Awesome concept though!
Logged

theSoupSmith
Level 0
**



View Profile WWW
« Reply #52 on: September 08, 2012, 09:49:33 AM »

Looks and sounds great!

Are those the final models for the feet? Its the only suggestion I could find from watching the amazingly pretty trailer.
Logged

Crescent is a multiplayer, 2d space shooting adventure where the player explores a vibrant, life-filled nebula by blasting asteroids and using the precious crystals within to synthesize controllable versions of the many creatures that inhabit it! Check out our devlog!
Swaggermuffin
Level 1
*


View Profile
« Reply #53 on: September 08, 2012, 10:08:24 AM »

The controls could /really/ use some tightening up. Also, not being able to see where you're going because of clouds is a bitch.

Pretty good stuff, otherwise.
Logged
Nition
Level 4
****


Some random guy


View Profile WWW
« Reply #54 on: September 08, 2012, 03:45:13 PM »

Very Cool, I've always wondered how procedurally generated music works. Is there a backtrack that the piano keys always stick to the same key?

Great job!!!

There's a set of chords based on the key of C. The chords change somewhat randomly, and the piano notes are always one of the notes from the triad of the current chord.

Looks and sounds great!

Are those the final models for the feet? Its the only suggestion I could find from watching the amazingly pretty trailer.

Nah, I need to fix up the player model a bit. It will still be a blocky robot though, because I'm terrible at 3D modelling. But hopefully it will be a better-looking blocky robot.

Re people saying the clouds get in the way, yeah, I messed up there. It's unfair when you can't see where you're going because of some random chance cloud that appeared on the path. So far the game has always been fair (it never generates a jump you can't make for instance) and I don't want that to change. I'm going to push a small update to make the clouds fade out a bit when you're near, once I work out how to do that!
Logged
Nition
Level 4
****


Some random guy


View Profile WWW
« Reply #55 on: September 09, 2012, 05:49:39 PM »

I've put up a small update to Skylight (0.92) because I felt there were two significant issues with the 0.91 release.

1. Sometimes clouds would form across the path and significantly block the player's view. This especially sucked later in the game where platforms are more sparse. This seemed unfair and, although the levels are "random", I feel they're always been "fair" in the past. The game never generates a jump you can't make, for instance.
This has been addressed by making the clouds fade out when the player is close by, so they can be see through.

2. The cloud system I was using - based on Unity's Shuriken particle system - was killing performance. Drawing the clouds could take something like 50% of the game's processing time. So I've rewritten the whole cloud system to use billboarded meshes instead. On my low-end test machine, framerate has doubled.



New gameplay video:

Logged
Nition
Level 4
****


Some random guy


View Profile WWW
« Reply #56 on: September 25, 2012, 02:13:35 PM »

Finally it's done! Turns out, releasing a game is pretty nerve-racking.

So, there's now a demo of 1.0 available, and I've put the full version up on my website for USD $2.50. Sorry, no more free full version now that it's done. Skylight is fairly "casual", although it's not easy to get to 100%, and it's a lot more complex than your average flash game. So hopefully that's a reasonable price point.


My next aim is to get it on Desura as another purchase option. Later, maybe an ad-supported version on a portal like Kongregate (maybe with sponsorship? I'm not sure how hard that is to get).

Changelog for version 1.0, from 0.92:
NEW AND CHANGED
- Added flocks of birds
- Added a locked bonus mode (unlocks on getting to 100%)
- Added a "lamp platform" which is basically just a normal platform with a light on it, to look cool and help out a little near the end
- Other minor adjustments to level generation (both performance and layout related)
- Improved performance somewhat
- No minor chords play when you're past 75%. Other minor edits to music generation
- Improved robot 3D model a little and added visible "thrusters" when moving
- Added mute button on main screen and pause menu
- Made the instructions screen sightly tidier
- Spotlight now turns off again when light level gets high
- Tweaked view bob when hitting a platform in 3rd person a little
 
BUG FIXES
- Fixed platforms sometimes double-registering a collision, causing erroneous score and extra damage
- Fixed the music engine sometimes playing the same sound multiple times at once
- Fixed clearing high scores also resetting mouse invert setting
- Fixed audio volume not adjusting correctly to compensate for many sounds at once, occasionally causing clipping
- Fixed clouds not updating to face you when in 3rd-person mode (revealing the terrible secret that the clouds are actually groups of 2D planes)
- Fixed unfocusing and refocusing the app while paused making the music start playing



« Last Edit: September 25, 2012, 02:29:35 PM by Nition » Logged
Nition
Level 4
****


Some random guy


View Profile WWW
« Reply #57 on: September 27, 2012, 08:16:38 PM »

I've updated the full version (and the demo actually) to version 1.1, after making a few changes based on feedback from the first day of release and other stuff I wanted to fix. Anyone who bought the game before I updated it to 1.1 has been sent a link with an updated download. This won't be a common thing (or I would have built a proper updater), this is probably a one-off.

Version 1.1
  • Fixed a bug where occasionally broken platforms would generate right in front of the start point (maybe every 50 games or so)
  • Added a few "stars" floating around right near the end (nothing fancy)
  • Slight tweaks to level generation. Fixed a problem where the platform for the special ending was sometimes too low and would cause you to lose and win at the same time
  • Added support for changing the mouse sensitivity. Press - or = on the keyboard. Settings are saved.
Logged
Jupiter_Hadley
Level 0
***



View Profile WWW
« Reply #58 on: January 20, 2013, 08:20:57 AM »

Hello. I really like this game. I made a little lets play of it if you want to check it out Smiley



Logged
Nition
Level 4
****


Some random guy


View Profile WWW
« Reply #59 on: January 20, 2013, 12:03:43 PM »

Hey, thanks! Great to see someone doing a Let's Play as well where it isn't their first time playing, which ends up being just a video of them falling off all the time.

The full version is essentially the same thing but the level is a lot longer (300 platforms versus... about 50 I think in the demo?), it gets a lot darker by the end, and as such there are a few continue points along the way where you get one retry if you fall. There are "note platforms" which bounce you a bit higher and play some different music and lamp platforms just for a bit of light, and the normal music has more possible parts.
Logged
Pages: 1 2 [3] 4
Print
Jump to:  

Theme orange-lt created by panic