Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411505 Posts in 69374 Topics- by 58429 Members - Latest Member: Alternalo

April 25, 2024, 07:09:16 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsLeilani's Island
Pages: 1 ... 29 30 [31] 32 33 ... 67
Print
Author Topic: Leilani's Island  (Read 411783 times)
Schoq
Level 10
*****


♡∞


View Profile WWW
« Reply #600 on: July 30, 2017, 08:37:53 PM »

BTW since this takes inspiration from Wario Land: do you plan on having any level-altering events like the drained lake and destroyed tower? I always found those pretty cool
Logged

♡ ♥ make games, not money ♥ ♡
kinnas
Level 5
*****



View Profile WWW
« Reply #601 on: July 30, 2017, 11:03:29 PM »

God dang, pixel platformers are supposed to be dead and tired but looking at the gifs this looks genuinely interesting and fun to play - what's the magic sauce there?
Logged

Ishi
Pixelhead
Level 10
******


coffee&coding


View Profile WWW
« Reply #602 on: July 31, 2017, 11:06:27 AM »


Thank you! Smiley

Finally if the main save data fails to load for whatever, I've added flow to the game to handle that.

Do you keep the previous save as a backup file just in case the main save file corrupts for some reason? I've been doing this for my games when save slots are involved, and I've noticed a lot of other devs have done the same thing.

I hadn't considered that. Since the game saves quite often (e.g. end of every level) how would you approach making a backup? Just make a backup copy when launching the game? I never reload the save files after launching the game so I wouldn't know the file was broken until next time the game is launched, so making backups after every save would potentially just make the backup corrupted too, if there had been some sort of error.

BTW since this takes inspiration from Wario Land: do you plan on having any level-altering events like the drained lake and destroyed tower? I always found those pretty cool

Yeah I really love those things in Wario Land! I'm not quite sure about this yet, I should probably think more carefully about it as I plan the world map, and decide whether I do want to include any level-altering or map-altering events. Hmm Smiley

God dang, pixel platformers are supposed to be dead and tired but looking at the gifs this looks genuinely interesting and fun to play - what's the magic sauce there?

Thank you Smiley I don't know if there's any magic, just trying my best to make a game I'd like to play myself! And spending a long time doing it...
Logged

TheGrandHero
Level 1
*



View Profile WWW
« Reply #603 on: July 31, 2017, 05:02:22 PM »

I hadn't considered that. Since the game saves quite often (e.g. end of every level) how would you approach making a backup? Just make a backup copy when launching the game? I never reload the save files after launching the game so I wouldn't know the file was broken until next time the game is launched, so making backups after every save would potentially just make the backup corrupted too, if there had been some sort of error.

Generally you just copy the existing save file every time you save the game. Some games will delete the copy as soon as the save operation is complete, but I've always kept it around just in case. What you're primarily trying to avoid by doing all this is the player losing everything if the game crashes, the OS crashes, the power goes out, et cetera in the middle of a hard drive operation leaving you with only half a save file.
Logged

Ishi
Pixelhead
Level 10
******


coffee&coding


View Profile WWW
« Reply #604 on: August 07, 2017, 12:09:15 AM »

Generally you just copy the existing save file every time you save the game. Some games will delete the copy as soon as the save operation is complete, but I've always kept it around just in case. What you're primarily trying to avoid by doing all this is the player losing everything if the game crashes, the OS crashes, the power goes out, et cetera in the middle of a hard drive operation leaving you with only half a save file.

Ah I see, that makes sense! I'm saving my main save files via the Steam API which I just pass a buffer of data to - so don't think I could do any kind of backing up there. But for the options files, and non-Steam build of the game, it would be a good feature.

World Map Month Started!

I've finally started work on the world map! The core feature set of the map will be:

- Moving along paths between levels
- Branching paths
- Secret paths reached by secret exits

And then I have ideas for various extra bits on top of this. But this is the basic starting point.

My favourite way to start this kind of task is to open up Tiled and just place some stuff down. It's easier to get an idea of what kind of data I'll be feeding into the game that way.



So, rectangle objects for levels, lines for paths. The next step is to get this data loaded into the game. I made a simple representation of the map that uses three types of data:

- Path sections: A single straight-line section of path. Links to a junction at each end.
- Junction: Automatically created at the ends of path sections. Links to one or more paths. Can also link to a level marker. Represented by a yellow rectangle in the image below.
- Level marker: Represents a level. Links to a single junction.



The junctions tie everything together in a nice simple way, because:
- Path sections don't need to know about Level Markers at all
- If I add more map features (e.g. things that can be interacted with that aren't levels) then they will also link to junctions
- Actors that move around the map (e.g. Leilani) can navigate the whole thing using only Path Sections and Junctions, they also don't need to care about Level markers.

Next I started getting the flow in for unlocking paths and levels.



When the level is completed, it tells its junction to propagate the "unlocked" state. So the junction will unlock any relevant paths that lead from that junction. When the path has done it's unlocking animation, it tells the next junction to propagate the "unlocked" state. If the junction links to a level then it'll unlock the level, otherwise it'll unlock more paths. So the unlock state naturally flows through the map with very little effort.

Path sections are aware of whether they are a secret path or not (secret paths are orange in the gif above). So finding a secret exit simply unlocks secret paths instead of normal paths.

Paths are also directional, which is just based on the direction that I drew the path in Tiled. Leilani can walk along a path section in either direction, but it can only be unlocked from one end. The gif below demonstrates this: after using the secret exit to skip a level, you then continue to progress "forwards" through the map. This ensures that even if you skip to an unfamiliar part of the world map, you won't be confused about which direction to progress in.



Finally, I hooked all this stuff into the save data, and the loading and completion of real levels. I also added Leilani, currently represented by a blue triangle.



Traversing the paths and junctions is pretty simple to implement, and uses the junctions to decide most of the logic. For example when the player presses Right, the Leilani actor asks the junction for a path section that leads to the right, and if one exists, starts moving along it. Then when Leilani reaches the end of a path section, she asks the junction "are you a stopping point?" - which could mean that the junction has a level linked to it, or multiple paths to choose from. If the junction isn't a stopping point, it'll instead tell Leilani which path to automatically start moving along next.
« Last Edit: August 07, 2017, 12:14:37 AM by Ishi » Logged

JobLeonard
Level 10
*****



View Profile
« Reply #605 on: August 07, 2017, 12:35:43 AM »

Sounds like an immutability-based approach is the sanest option, since it's inherently non-destructive
Logged
fireboy
Level 0
***



View Profile
« Reply #606 on: August 07, 2017, 07:29:28 AM »

Liked it!

This will be a great game
I'm waiting for him
Logged

nathy after dark
Level 8
***


Open Sourceress


View Profile WWW
« Reply #607 on: August 07, 2017, 11:35:43 AM »

Following! Hand Any Key
Logged

Photon
Level 4
****


View Profile
« Reply #608 on: August 07, 2017, 01:09:52 PM »

Congrats on getting started with Steam stuff. You may be a ways off from release, but getting that particular ball rolling can certainly be an exciting one.

I enjoyed the trailer as well. Footage and music were both excellent. However, I've started to notice that despite the scenery looking really smooth, some of the environments feel a bit empty. I get that places like a beach can have that feeling of expansiveness and scale, but right now it almost looks like each location is too isolated, if that makes any sense. Maybe you could add more foreground scenery? Like on the beach levels, you could have some denser bush foliage to give the sense that a lush island is just beyond the beach.
« Last Edit: August 07, 2017, 01:19:51 PM by Photon » Logged
jctwood
Level 10
*****



View Profile WWW
« Reply #609 on: August 08, 2017, 12:47:43 AM »

Very excited to see the world map come together!
Logged

Ishi
Pixelhead
Level 10
******


coffee&coding


View Profile WWW
« Reply #610 on: August 13, 2017, 06:52:23 AM »

However, I've started to notice that despite the scenery looking really smooth, some of the environments feel a bit empty. I get that places like a beach can have that feeling of expansiveness and scale, but right now it almost looks like each location is too isolated, if that makes any sense. Maybe you could add more foreground scenery? Like on the beach levels, you could have some denser bush foliage to give the sense that a lush island is just beyond the beach.

Yeah some of the environments could do with more detail and stuff. More plants and foliage especially is on my todo list! There are other level themes/backgrounds I need that I haven't even started yet though, so those will probably come first.

World map progress - first pass graphics

I've begun adding proper graphics to the world map this week.



This was very early progress - I just got some tiles loaded and drawing in the game. Unlike the tiles I render during gameplay, the world map properly supports all the tile mirroring, flipping and rotation that the tiled editor can support. The world map's top-down view makes this kind of stuff really useful, for example a grass-to-sand transition tile can work for 4 different directions.

I also support adding as many tile layers as I need to the world map. So basically any number of tile layers that I throw into the Tiled map file will be drawn by the game. This will allow me to layer up tiles in any way I want so I can hopefully use that to make the world map more visually interesting.

Height layers



I then expanded the layering functionality so that Leilani can actually move between different layers. So she can walk under something (e.g. a bridge) and then loop around and walk across the top of it! It looks a bit odd in this gif because of the weird placeholder graphics, but I can eventually use this to make the world map feel more 3D.

Attaching tiles to paths

The debug graphics in my previous post showed that after completing a level, the paths leading to the next level appear with an animation. This is easy to represent with debug lines, but I needed to now attach proper graphics to the paths.

As mentioned before, the best way to approach this is to start on the editor side, and plan out how I want to author this data. I don't want to have to manually attach a separate chunk of path graphics to every single path on the map. But I also don't want to fully automate the path graphics using just code, because I want paths to look different from each other (e.g. footsteps on the beach, dirt track on the grass).

I decided that a single tile layer would be attached to a set of path objects:



Each section of path is reduced to a single line, with a start point and end point. (So the dirt trail in the above image is 3 separate sections). Each path section grabs its tiles automatically from the tile layer, by simply checking which tiles intersect with the path section's straight line.

The following image shows each section of path making all its tiles visible as it is unlocked.



I then use the stencil buffer as a mask to reveal each path section's tiles over time, rather than displaying them all instantly.



I'm really happy with how well this worked! One thing worth pointing out is that I made sure the level marker graphics are just big enough to totally cover an entire tile on the map. That way I never have to worry about how the end of the path section looks, because it's always hidden underneath the marker.

A bit of polish

Finally let's get some animations and particles and a touch of screenshake into this thing:



That makes a big difference!
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #611 on: August 13, 2017, 07:11:23 AM »

A very deft and subtle touch of screenshake Giggle
Logged
Photon
Level 4
****


View Profile
« Reply #612 on: August 14, 2017, 05:22:42 AM »


The smoke is a nice touch on making the path appearance smooth.

I really like the amount of technical detail you put into these posts. I've done some work with Tiled and seeing what you do makes me optimistic about what can be accomplished using it. :D
Logged
Josh Bossie
Level 3
***


Fly Safe, Pup


View Profile WWW
« Reply #613 on: August 14, 2017, 09:13:02 AM »


The smoke is a nice touch on making the path appearance smooth.

I really like the amount of technical detail you put into these posts. I've done some work with Tiled and seeing what you do makes me optimistic about what can be accomplished using it. :D

Agreed. I love following this topic as gamer and developer.
Logged

nathy after dark
Level 8
***


Open Sourceress


View Profile WWW
« Reply #614 on: August 14, 2017, 09:42:30 AM »

Add another person to the pile who enjoyed reading in-depth about your work with Tiled. Stuff like the multiple layers and whatnot, I was never able to get right in my experiments with Tiled and LibGDX.
Logged

Ishi
Pixelhead
Level 10
******


coffee&coding


View Profile WWW
« Reply #615 on: August 14, 2017, 11:25:42 AM »

Thank you all, it's really nice to hear that the detail is appreciated!

There's a bit more detail I thought about going into when I wrote the post, but I left it out as it was getting kinda long. But I'll cover it now since you are all so enthusiastic Coffee

Using Layer Groups in Tiled



To help with achieving the multiple height layers demonstrated in this gif, I made use of Tiled's layer groups.



I'm not sure if this feature was only recently added to Tiled - either way I've never used it before.

The lowest level groups - "Overlay" and "Base" - are the two height layers. Any paths, levels or tile layers contained in the "Overlay" group will be drawn above anything in the "Base" group. So in this case, using Tiled's groups is just a convenient way of telling the game which of the Tiled layers belong together in a single height layer.

The Leilani sprite knows which path it's currently on, so it can find out which height layer it's on. It is drawn immediately after the rest of the height layer has been drawn, so if Leilani is on the "Base" layer, her sprite is drawn underneath the "Overlay" layer, allowing her to walk under a bridge/whatever.

Let's look at exactly what is contained on each layer.

Overlay/Paths/Objects


Overlay/Paths/PathTiles


Overlay/Tiles


Base/Paths/Objects


Base/Paths/PathTiles


Base/Tiles


In my previous post I described how each path section automatically grabs the tiles that it intersects with from the PathTiles layer. But here we have path sections on multiple layers, and multiple PathTiles layers. So how do the paths know which layer to look at?

You guessed it - layer groups! Path sections (which are the green lines in the Objects layers) will only grab tiles from PathTiles layers which are in the same group as them.

Hopefully this is interesting! Tiled has so many little features like this. I encourage you to explore what it can do and to use / abuse all of its features to make your level-editing as painless as possible! Always remember that some extra code work now can save hours of editing time in the future.
Logged

Louard
Level 2
**


View Profile WWW
« Reply #616 on: August 18, 2017, 11:10:16 AM »

Your world map is looking pretty dang sweet, man! Really like the path reveal and the "jumping into level" anim as well!
Logged

-Louard
louardongames.blogspot.com
Ishi
Pixelhead
Level 10
******


coffee&coding


View Profile WWW
« Reply #617 on: August 23, 2017, 12:19:02 PM »

World map progress - Week 3!

What's new in the world map:

UI



First pass UI - not final visuals, but it's functional! It shows the player's total shell and computer chip counts, and the current level name and chips collected.

I also went for a border - it seems a common thing for a world map screen, and helps to further differentiate it from the main gameplay once you're in the level.

Jumping



A different type of path section, which Leilani jumps over instead of running. It's just a nice visual touch.

Plant Paths



Some paths can be unlocked by spending shells to recover a plant, which grows into a new path! Needs a few more UI animations and things. More details about shells at the end of this devlog.

Camera following path unlock



The camera now follows paths as they unlock. It moves the focus point of the camera towards the centre of a rectangle that encompasses the ends of all unlocking paths.

Shells!

I've been thinking more about what the point of the collectable shells is. Since the game doesn't have lives, I can't just hand out an extra life for every 100 shells.

Previously on this devlog I mentioned that I wanted to avoid situations where the player could replay levels just to grind for shells. But I've changed my mind on that CoffeeHand Thumbs Up Right My plan is:

  • Shells are collected during gameplay. Dying maybe incurs a small shell penalty? But doesn't remove all the shells you collected since the checkpoint.
  • At the end of the level, shells are added to your global total.
  • Shells can be spent on the world map to open up additional paths. Also can be spent to buy powerups. Note that in the gif above the vine path contains a new level - but probably most of the time I would use it to unlock optional shortcuts around the world, and little things like that.

My reasoning for these mechanics are:

  • In some levels the player can smash loads of blocks to collect some shells, which is fun, but suddenly feels pointless if you die and lose all those shells. I would prefer players to always feel incentivised to keep collecting.
  • Computer chips collected since the last checkpoint are lost if you die, so it seems harsh to also take all the shells away.
  • Growing plants on the map reinforces the theme of recovering the island, and working with nature! (Leilani likes plants even if she regularly beats up the island's animals)
  • I think being able to grind for shells is preferable to imposing harsh restrictions, such as "you collected 100 shells, but last time you played this level you collected 90, so I'm only adding 10 to your total"

Logged

Canned Turkey
Guest
« Reply #618 on: August 23, 2017, 12:59:12 PM »

I love this!!
So excited to play when it's finished, you put care into every tiny detail and it really shows.
Logged
Louard
Level 2
**


View Profile WWW
« Reply #619 on: August 25, 2017, 06:23:27 AM »

Regarding Shells...

I painted myself into an old-school corner in Suzy Cube by including lives. They became the justification for coins.. Well.. to the player.. design-wise, coins have their own value...

I have to say, I'm into what you're proposing to do with shells and I agree that 'growing' shortcuts is quite thematic.

As for the shell penalty on death... Perfect opportunity for communication by having the shells fly out of little Leilany upon death.. Kinda like rings flying out of Sonic when he get's hit.

Anywho.. As always, she's lookin' slick AF. Keep it up!
Logged

-Louard
louardongames.blogspot.com
Pages: 1 ... 29 30 [31] 32 33 ... 67
Print
Jump to:  

Theme orange-lt created by panic