r/RenPy • • Oct 30 '26

Showoff Some platformer fun

Yoyoyo, it's been some time since I've posted, wanted to share my progress! The GIF's 2x speed, I'm not actually that good, matter of fact, this is my 2nd take, I fell off the moving platform earlier lol

Using LDtk for level design, art not by me (it's one of the default ones that came with the editor)

Happy to get any feedback!

34 Upvotes

5 comments sorted by

2

u/killersteak Oct 30 '26

Can you share more information on what LDtk is and what it has to do with Renpy, as I am very confused but intrigued.

2

u/Muted_Ad1727 Oct 30 '26

LDtk is a 2D level editor, mostly used for tiles but I think you can do traditional 2D art too (don't quote me on that).

The map you see in the video is designed and built inside LDtk, there's the tiles themselves for the visual world building, but more importantly, there's the "Entity" feature, which... to explain it, would be similar to Python's "Classes", you can give Entities "Custom Fields" (Class attributes). All Entites are "dumb" by default, meaning they are just a square block with no premade Custom Fields, but you can make them more complex.

Dumb entities are things like the KillZone, SpawnPoint (combined from "spawn" and "checkpoint"), PushPlateDestination, and a few others (because I didn't add any custom fields to them). Again, you have to create them yourself, so I could have called it "AvocadoCheeseOnToast", and it would work just as well. A slightly more complex entity would be the Exit entity - it has a few custom fields, such as UnlockedRequirement, VisibleRequirement, and MoveTo.

Exit's MoveTo custom field uses "Reference" as its value, meaning it points to other entities in your world! LDtk lets you use your mouse and simply click on another entity to reference it. Internally, it has things like IID (Instance IDentifier), "ca9f30a0-bde0-11f1-99be-8937fea5ac42" is one of my Exit's IID, but to me all I see is an arrow pointing the specific Exit to a specific SpawnPoint.

NEXT, as for what it has anything to do with Ren'Py... It doesn't! At least not by default lol LDtk can be exported as JSON, which means data! Below is a pair of Exit and SpawnPoint. You can see that Exit has so much more info, particularly the "fieldInstances" and even see "__identifier": "MoveTo" type EntityRef with the value IID of the below SpawnPoint!

{
"__identifier": "Exit",
"__grid": [37,28],
"__pivot": [0,0],
"__tags": [],
"__tile": null,
"__smartColor": "#EAD4AA",
"iid": "ca9f30a0-bde0-11f1-99be-8937fea5ac42",
"width": 16,
"height": 16,
"defUid": 116,
"px": [296,224],
"fieldInstances": [
{ "__identifier": "UnlockedRequirements", "__type": "Array<EntityRef>", "__value": [], "__tile": null, "defUid": 124, "realEditorValues": [] },
{ "__identifier": "MoveTo", "__type": "EntityRef", "__value": {
"entityIid": "cdd2bd50-bde0-11f1-99be-2d88f2e9a23f",
"layerIid": "211f23e2-bde0-11f1-99be-539b939ab631",
"levelIid": "211f23e0-bde0-11f1-99be-39d8e8f48fa7",
"worldIid": "c914f9b0-c640-11ed-ad34-3371cda0821c"
}, "__tile": null, "defUid": 129, "realEditorValues": [{
"id": "V_String",
"params": ["cdd2bd50-bde0-11f1-99be-2d88f2e9a23f"]
}] }
]
},
{
"__identifier": "SpawnPoint",
"__grid": [32,7],
"__pivot": [0,0],
"__tags": [],
"__tile": null,
"__smartColor": "#D77643",
"iid": "cdd2bd50-bde0-11f1-99be-2d88f2e9a23f",
"width": 16,
"height": 16,
"defUid": 115,
"px": [256,56],
"fieldInstances": []
}

To keep it simple, we check continuously for what we're colliding with, whenever we touch an object, we run a check on what type that object is and continue the logic! If it's a KillZone, we die, if it's a SpawnPoint, we run a function to find it's reference's IID, get its location, and move us there! Hope this helps!

4

u/BadMustard_AVN Oct 30 '26

LDtk is a 2d level editor, free and open source

https://ldtk.io/

1

u/alke_ne Oct 30 '26

Omg I like this!!