Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411283 Posts in 69325 Topics- by 58380 Members - Latest Member: bob1029

March 29, 2024, 04:24:32 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsPlatformer on the mega drive (for now)
Pages: 1 ... 5 6 [7] 8 9 10
Print
Author Topic: Platformer on the mega drive (for now)  (Read 28810 times)
JobLeonard
Level 10
*****



View Profile
« Reply #120 on: July 12, 2021, 02:14:39 AM »

Not quite Monday yet but I can never get any work done on Mondays anyway, so this all I got done this week (which was basically this afternoon)

I have a decent, if a little plain, tileset for something like a city (done last week). No interior tileset yet. And I made a small map with it, it has a building in the center which you need to enter, and there are 3 different ways to get in. I used the same tileset for the interior, so it doesn't look good. I was planning on making a whole new tileset and have the interiors load as different levels, but I think I like having it all loaded at the same time. IT might be possible to add more tiles to this tileset but the palette is completely used already, so maybe I should reconsider using a single color palette for both planes. Something to think about.

I also improved some of my tools for importing the level, nothing major just tweaks and fixes. And I started mapping out the movement range so I can have a cheat sheet of how far the player can jump and that sort of stuff.

The level design workflow is hopelessly slow. Any changes to the level design requires running a python script that takes almost a minute to run, followed by copying and pasting some output text into a source file, and finally building the rom. I say 'hopeless' because addressing this would require either remaking the game in a modern engine in which you can edit and play quickly, or developing a sophisticated editor capable of injecting itself in a running emulator, both of which would be a project almost as ambitious as the game itself. So no, I'll keep trying to make some improvements here and there but this is what it is.

The test level in question:



For this to work as intended a few features need to be implemented:
- Crawling (not strictly necessary but would be cooler!)
- Doors
- Looking up and down
- Some form of vertical movement, like ladders or elevators etc. Mostly to give NPCs vertical movement but also to allow for vertical levels that do not rely entirely on climbing ledges.
- More dangerous challenges besides NPCs.


This last item needs some elaboration. The front door needs to be the most risky route, and at the moment nothing makes it riskier than any other route. So I'm thinking something like an automated turret or a camera system that will spawn a bunch of guards when you get spotted by it. The window route is supposed to be the second most obvious entry point, and it could be less risky by having the camera/whatever only occasionally turn right.

The rooftop entrance is the most elaborate route, it requires climbing another building, so there's some platforming involved.

Next week's deadline is yet to be defined. I need some sleep now. Take care, all  Coffee

Looks like quite a lot of stuff done to me! May you have your well-earned rest!  Coffee
Logged
diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #121 on: July 12, 2021, 09:08:54 AM »

Thanks! and rest I did :D

For next week I want to work on functionality. Despite having urges to improve the tileset and visuals, it's good enough for now and the focus shift back to gameplay.

I will now commence brainstorm rambling with myself. You are advised to stop reading.

Camera/turret system. It would be useful to have this. It's like an NPC but stationary and requires non combat solutions. A camera could be attached to a door where more NPCs would flood the area. Or close a security door somewhere.

Doors. What purpose would they serve? separating two sections, you can see the guard but the guard can't see you. That's interesting by itself. Additionally, if it's locked it can serve as a delaying mechanism and have some synergy with the camera thing.

Stairs. Maybe a simple system of doors that teleport you somewhere else. I've seen these in other games, the only problem is when it's hard to know where the door will lead, which can be solved with careful visuals. Would be simple to implement and animate.

Crawling. Can't think of a single pragmatic reason to have this, besides "hey, it's stealth, you should have to crawl through windows and vents, right?" and that's good enough for me.

Another thing I haven't given another thought in a while is sound. Part of me feels that sound propagation is over-complicating a 2D stealth game. I can't apply the same thinking of immersive sims here. On the other hand it seems it could help connect the platforming with the stealth. Jumping, running, walljumping are all noisy and suddenly you need to consider whether it's worth it to make a jump and risk alerting the guard standing nearby. It would make crawling more useful too. But I don't want to do that right now.

To close this demo map what do I really need? Door and the camera thing. I can do without crawling by just widening the entrances, and stairs by... putting ledges or whatever. So the deadline for next week is Door and camera thing!
Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #122 on: July 19, 2021, 03:29:27 AM »

I wrote an update yesterday but accidentally closed the browser before posting Facepalm

Still don't have doors! However there is a good reason for that. When I implemented NPCs I knew, but later forgot, that it was a hacky implementation and a more robust system would have to be put in place when adding more objects. So that's what I did. Now the code has a few more structs like Renderable, Interactable, Entity etc. I'm not going into details because it's not too interesting and not quite finished yet. As I add more entities it will likely require tweakings here and there.

Refactoring code is really not a lot of fun, is it? You spend days working on it, sometimes we just stare at the code thinking of all the ramifications of each change. When you think you are done there are trillions of bugs to fix before it compiles again. When it finally compiles again it works exactly as it did before you did all this. The progress is invisible.

Speaking of code, I made it open source because why not. The art assets directories are excluded so it won't compile out of the box without some tweaking; this is just to keep the actual meat of the game private. Although a lot of game data is baked into the code it doesn't matter that much; if you are a super hacker that can reverse engineer level data from binary files, go ahead you earned it.
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #123 on: July 19, 2021, 03:46:50 AM »

Quote
it's not too interesting
We'll be the judge of that!

<opens source code>

<five minutes of quick browsing>

I have no idea what is happening here
Logged
oahda
Level 10
*****



View Profile
« Reply #124 on: July 19, 2021, 04:01:00 AM »

At least it wasn't the code progress you lost! Shocked

Gonna have to hold back on checking out the code so that I can get stuff done myself, but sharing it is cool!

Refactoring code is really not a lot of fun, is it? You spend days working on it, sometimes we just stare at the code thinking of all the ramifications of each change. When you think you are done there are trillions of bugs to fix before it compiles again. When it finally compiles again it works exactly as it did before you did all this. The progress is invisible.

Thisssss. At least we understand each other when it comes to this Cheesy And now the stage is set for adding new stuff in a smoother way, like those doors, yay!
Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #125 on: July 19, 2021, 10:31:56 AM »

<opens source code>

<five minutes of quick browsing>

I have no idea what is happening here

 Cheesy sorry, neither do I and I wrote the thing.

About the non interesting stuff, it's basic code structuring problem. It's something I struggle with (particularly in C since I'm new to its coding paradigm) so it might actually be interesting to share my solution and struggles. But ATM it's likely to change a few more times.

Thisssss. At least we understand each other when it comes to this Cheesy And now the stage is set for adding new stuff in a smoother way, like those doors, yay!

hahah Thinking about this today. There is some effort in machine learning to write code lately, which is interesting but will possibly remain too limited for many years. But we just might live long enough to see and use a refactoring AI! "Computer, clean up my code. And create a new struct called this and get rid of those two others structs" *sips coffee*

Been trying to make a simple dumb door for two weeks now. I'm feeling confident now! Coffee
Logged

oahda
Level 10
*****



View Profile
« Reply #126 on: July 19, 2021, 10:50:17 AM »

I believe! No AI needed! Coffee
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #127 on: July 20, 2021, 01:09:49 AM »

I remember that there was this huge thread somewhere (on Twitter maybe?) about how doors in games were actually a much bigger deal than people think. Probably mostly regarding game physics though
Logged
diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #128 on: July 23, 2021, 05:27:35 AM »

Just a quick visit to drop this gif



DOOOOOOORS
Logged

oahda
Level 10
*****



View Profile
« Reply #129 on: July 23, 2021, 05:28:57 AM »

Yaaaassss Coffee
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #130 on: July 23, 2021, 07:34:36 AM »

Woohoo!

Also, found the article:

https://lizengland.com/blog/2014/04/the-door-problem/
Logged
diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #131 on: July 23, 2021, 03:03:47 PM »

haha that's a fun article. Already passed it around to other people!

Let's see if I can push a camera system until monday! if I don't get caught on cleaning up the code (there are some really, really ugly stuff in there)
Logged

bayersglassey
Level 0
***



View Profile
« Reply #132 on: July 24, 2021, 09:45:05 PM »

https://github.com/diegzumillo/StealthMetroidMD/blob/master/notes.txt#L20-L21
Quote
- AI behavior:
-- maybe they shouldn't jump off cliffs

Hehe.
Logged
JobLeonard
Level 10
*****



View Profile
« Reply #133 on: July 25, 2021, 07:37:49 AM »

Diegzumillo: "...although given the misery they caused me while implementing them I really want them to"
Logged
diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #134 on: July 25, 2021, 08:50:39 AM »

 Cheesy

It just dawned on me that people might actually read stuff I write there. When I was looking for a job I replaced all the previous commit comments with professional looking ones. But I saved a screenshot

Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #135 on: July 25, 2021, 01:44:01 PM »

Camera working!



The way it's set up is that it will "interact" with some entity when it sees the player, in the gif above it opens the door below when it sees the player. This is a pretty flexible system! I could create invisible entities that act like boolean operators and make highly complex interactions. I expect a camera to just sound an alarm and spawn guards, but locking doors sound interesting too.

It took another refactor to get it all working properly. It was unnecessarily complicated, to the point where I had commands that were chains of pointers like self->child->parent->secondcousin->type.thing. And it was causing weird problems. Sometimes it would crash the program but not always! (I had never seen a mega drive software crashing until now)

Now it's much better! A quick summary: There is one class called Entity, in it there's a Union of specific classes like, Door, Camera etc. There is a list of entities. Instead of iterating over the whole list of entities to find something you can interact with, there are lists of interactables, collidables etc, that store just indices to the entities array. Entity also has pointers to functions depending on the type of collider. For example, if it's an entity that updates every frame it has a pointer to an update function. Each subtype of entity will point this to its specific update function.


I am going to take the week off this project. I'll be attending an online conference this week. Not sure if I'm trying to keep in touch with the world of physics research or just in plain denial that I'm out of it haha.
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #136 on: July 25, 2021, 11:02:43 PM »

It's really starting to look alive with all the animated elements!
Logged
oahda
Level 10
*****



View Profile
« Reply #137 on: July 26, 2021, 02:58:52 AM »

Ohh, when you first talked about a camera I thought you were gonna work on the game camera Cheesy This is a cool and unexpected mechanic, all the rest of the graphics gave me the impression of this being in some non-technological setting.
Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #138 on: July 26, 2021, 08:07:25 AM »

Ohh, when you first talked about a camera I thought you were gonna work on the game camera Cheesy This is a cool and unexpected mechanic, all the rest of the graphics gave me the impression of this being in some non-technological setting.

The setting is unusual for sure! I'm coming up with things as I go. I quite like this uncertain duality but I need to know what I'm doing first.

My thinking so far is that humanity exists on top of ruins of the ancient and technological civilization. So a lot of technology is 'harvested' and used without any deep understanding of it. This is my head canon until I come up with something better.
Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #139 on: July 30, 2021, 02:31:40 PM »

Now that the week is over I can resume this project. Last time I worked on this I had doors and cameras. But the cameras inflicted no consequences yet, so I need to work on that.

I have two conflicting ideas to solve but, before describing them, some clarification is required. Whenever I say "door" I don't mean the door above that lays perpendicular to the viewing plane, I mean doors on the back walls, where you can't see the other side.

Door as stairs: you go in, the camera shifts to another door above or below, and you come out of it.

Doors as NPC spawn point. An alarm is set off and the door opens to put 2 more guards around there.

The conflict is because the former you can enter and the latter you can't. I don't like this.

As I write this I am inclined to implement doors as spawn points only, because it's a really useful thing to have, and there are other methods of vertical locomotion I could implement, albeit with a bit more work than a teleport-door.

I'd appreciate any thoughts!  Coffee

Logged

Pages: 1 ... 5 6 [7] 8 9 10
Print
Jump to:  

Theme orange-lt created by panic