I'm still working (and learning) on tilemaps with Simple Tiled Implementation...
So that takes care of all my map's data, then about world interactions, it's designed to work with love.physics (has some plugins included to manage that)
Though, I was only planning basic actions in the map : Collisions, interactions with objects, tile-by-tile movement... the basic stuff...
It's my first experience with love physics, and at first glance, it looks a bit overkill for such features.
So I'd want to hear from more advanced programmers if it would be wise to use love.physics to manage such basic actions, or if I'd be better to simply make my own modules...
Thank you!
Worth using love physics for basic rpg-like map?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Worth using love physics for basic rpg-like map?
Currently working on game music...
Re: Worth using love physics for basic rpg-like map?
I'm no expert but I suspect doing basic tile-based collisions might be easier. I've used the love physics a few times and it has it's uses but I'm not sure a dungeon crawler is one of them.
Current project:
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
- BrotSagtMist
- Party member
- Posts: 612
- Joined: Fri Aug 06, 2021 10:30 pm
Re: Worth using love physics for basic rpg-like map?
This depends on how your world looks:
A chessboard like tilemap that doesnt move> overkill
Free angles and moving objects on a not tiled floor> maybe.
For tiled worlds collision detect is just super easy, it only gets hard when you try to dial with diagonal borders, aka half filled tiles.
The concept basically is:
Take the position of a wall, x and y, divide it by its size and round the number and then use that as a key to set a true:
Walls[math.floor(x/tilesize)][math.floor(y/tilesize)]=true
then you can have your objects walking around by a simple:
if Walls[math.floor(nextstepx/tilesize)][math.floor(nextstepy/tilesize)] then ... apply the step etc.
A chessboard like tilemap that doesnt move> overkill
Free angles and moving objects on a not tiled floor> maybe.
For tiled worlds collision detect is just super easy, it only gets hard when you try to dial with diagonal borders, aka half filled tiles.
The concept basically is:
Take the position of a wall, x and y, divide it by its size and round the number and then use that as a key to set a true:
Walls[math.floor(x/tilesize)][math.floor(y/tilesize)]=true
then you can have your objects walking around by a simple:
if Walls[math.floor(nextstepx/tilesize)][math.floor(nextstepy/tilesize)] then ... apply the step etc.
obey
Re: Worth using love physics for basic rpg-like map?
I guess I'm better not going too complicated for now so I'll try avoid physics, then... [phew!]BrotSagtMist wrote: ↑Sat Sep 11, 2021 5:10 am A chessboard like tilemap that doesnt move> overkill
Free angles and moving objects on a not tiled floor> maybe.
I'll probably have to add it myself right into STI, but this is already a pretty good clue, that should be fine!BrotSagtMist wrote: ↑Sat Sep 11, 2021 5:10 am Take the position of a wall, x and y, divide it by its size and round the number and then use that as a key to set a true:
Walls[math.floor(x/tilesize)][math.floor(y/tilesize)]=true
then you can have your objects walking around by a simple:
if Walls[math.floor(nextstepx/tilesize)][math.floor(nextstepy/tilesize)] then ... apply the step etc.
Once more, thank yall very much to stay around there and help people!
[You can probably guess it already, but this is much appreciated!]
Currently working on game music...
Re: Worth using love physics for basic rpg-like map?
There's also a Bump plugin. Bump is much simpler.
Re: Worth using love physics for basic rpg-like map?
I gave a try on bump and figured quite a few things (I realized I had to download Bump apart because I thought the bump.lua in STI plugins folder would already contain everything )
Do you know if I could make interaction detection on the map through bump? (e.g. NPCs, buttons, sensors)
Currently working on game music...
-
- Party member
- Posts: 512
- Joined: Wed Oct 05, 2016 11:53 am
Re: Worth using love physics for basic rpg-like map?
You don't need to do anything special with bump to detect any interactables. Just have some flag (eq. isInteractable) in the objects in the objects you put into the bump world, and then pass a filter that detects them - whether it happens during the player movement step, or as a separate queryRect call.
Who is online
Users browsing this forum: Google [Bot], secretsue92 and 82 guests