You are browsing as a guest. Sign up (or log in) to start making projects!

Not Alone, But Together

  • 9 Devlogs
  • 13 Total hours

A 2d platformer with local co-op. Can be played by 2 people on same device or online as long as they are connected to the same network. You should also beware that the game is DIFFICULT, I made the level hard because I didn't have the time and energy for making different levels with different difficulties. So, I instead made one hard one. Note: I had worked on this game for around a month before joining this thing

Ship #1

I made a 2d platformer with local co-op.
The challenging part was gravity and online.
And a short reflection would be that i should've worked with delta time, which i had completely forgotten about. Thinking back, it would've really helped me with fixing the movement in online. That'll be good to remember for future projects.

  • 9 devlogs
  • 13h
  • 10.72x multiplier
  • 137 Stardust
Try project → See source code →
Open comments for this post

50m 35s logged

FINISHED! I removed some unnecessary files and some parts of the code which were no longer needed. Now i’m finally done with this project, now i know that this is not the best game especially with the online not being perfect and the game not responding when looking for connections, but the reason for that is that this was my first time working with networking, so i learned basic networking as i was making this game. I also learned a lot of things from this project such as animations and some basic pixelart (I only made the levers and modified the buttons to how i needed them). So, yeah. That was it :). The reason for the text being so cramped up is because for some reason I seem to be unable to use enter to change line.

0
0
4
Open comments for this post

47m 43s logged

the game is finished or is it? I think I’m finished because I have got online to work and did some polishing BUT online can still be laggy because the networking code blocks the rest while waiting for a msg. Yesterday it came to my mind that i should’ve used delta time to fix the lags in online from the beginning but it might be a little too late now. Maybe i’ll give it a try and see if i manage to fix it with that, other than that im finished with the game.

0
0
4
Open comments for this post

1h 18m 18s logged

Online should now be working without any errors and in normal speed.

To fix the speed issue i just increased the speed of the characters while in online. I adjusted the speed based on how slow it was for me, now i don’t know if that was due to my internet being very slow or something else, so it is possible that for some people online would seem too fast but i hope that does not happen. I’ll try to test online on a different network if i get a chance but for now I’ll be focusing on polishing.

0
0
2
Open comments for this post

2h 9m 35s logged

FINALLY!

I finally got online to work BUT it feels like it’s running on 0.5x the speed of the offline version. I also found out that this only happens when running online on two different devices, so it doesn’t feel slow when you both host and join on the same device.

To fix that i might try to double the fps in online but what if someone has really good internet, that might make the game really fast for them. So, I’m planning on doubling the fps limit from 120 to 240 for online and see if it still feels really laggy and if it feels like that. Then I will maybe test for a while and see if i need to add a button so the player can choose between 120 or 240fps based on how much they’re lagging.

AND I also made a text box so the player can type the host’s ip, almost forgot about this lol

below is a screenshot of the text box

0
0
2
Open comments for this post

1h 5m 13s logged

I got it!

After trying for a while, I think i finally fixed online. Before I was sending the raw coordinates and setting them but that was making my collision/camera system behave weirdly. After trying many things, I tried to code it in a way that it uses the inputs and the coordinates.

So, now the game in online takes the inputs and calculates the new coordinates and collision. And to avoid desyncs because if i only use inputs, It WILL desync at some point, so i used the distance form:
√((x1 − x2)2 + (y1 − y2)^2)
(y2 != y *2 it means the 2nd and first x/y)
By using the distance formula, I can now calculate the distance between the players accross the different devices. Which means that i can use the inputs when the characters are slightly desynced and when they are desynced a lot, I can just straight up use the coordinates.

I also have to fix the gui because i had forgotten that the player also needs to put in the ip of the host. Because of that online doesn’t work accross different devices right now. To fix that I’ll have to use a module such as the pygame gui module or fix it myself with pygame. I’m leaning more towards doing myself because I don’t really want to learn the pygame gui module and imo it should take less time if i do it myself.

0
0
2
Open comments for this post

2h 21m 13s logged

I have fixed movement and interaction in online, but now there is something wrong with the camera system. It seems like they aren’t synced which changes the game mode for one of the players.

I tried to fix it in different ways, I even asked AI for help but I didn’t really understand anything. So, I’m thining about rewriting the online code, it shouldn’t take that long because its just the offline one with networking and some small changes.

0
0
2
Open comments for this post

2h 15m 43s logged

After coding, testing and debugging for a while, I got online multiplayer to work on LAN. But it is still pretty buggy.

Problems i have noticed so far:

  • the animations aren’t smooth, but glitchy and laggy
  • the person joining can’t jump
  • Levers can’t be activated. But the reason to that is that i haven’t sent any data regarding the levers yet because I first want to fix the movement between the devices.
  • Other tiny bugs

Tbh the code rn is pretty messy and full of bugs because i just focused on fixing the connection and transfering data between the host and the one joining, that’s why pretty much everything is buggy in online rn.

So, i’ll have to work with some debugging now.

0
0
2
Open comments for this post

1h 43m 40s logged

It’s me again!

I’ve just been trying out sockets these last hours and i think i have the basics down now. So, i might start with implementing them to the game.

About what i said in the last devlog - that i wanted to add a backstory and maybe even a level editor. I don’t think that I want to spend more time on this project, because I already have spent a lot on it.

My new plan is to just add multiplayer on local network and call it a day.

0
0
2
Open comments for this post

15m 54s logged

Before i start with what i am doing/going to do in the upcoming days I’d like to talk about what i have done so far.

Before joining this thing i had worked on this game at school, since it was my final project for the python course. I have worked on it for around 20 hours or maybe more than that, but i worked on it a lot in my free time because i really liked the idea of this game.
I wanted to combine the sideview of mario and it takes two, I’m not a graphics designer so it obviously doesn’t look the best. Most assets were taken from itch.io and i have modified most of them and made some small things like levers and pressure plates myself.

For now:
Summer break is here (well not really. Right now while writing this i have 4 more school days left). After not working on this project for around 2 weeks or so, I have started again. This time I’m planning on adding multiplayer on local network with the help of sockets in python and write a little about the story of the game, I might as well add a simple level editor, but that’s the last thing im thinking of doing.

As of now, i have started working on the online part and currently am working with the menu, so you can select online and then select host or join.

Below is a screenshot of the base game running

0
0
5

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…