#Picking a Library to Use for a Roguelike/Dungeon Crawler

1 messages · Page 1 of 1 (latest)

vague latch
#

AsciiPanel, Lanterna, SquidLib, Zircon. Probably more. I am having such a hard time deciding what to use. People say to just experiment, but I just don't even know where to start trying to figure out what works. Just figuring out Maven today took like 2 hours. Someone tell me what is easiest to use. Programming in Java btw. I was using AsciiPanel but the documentation kinda sucks for it, there is a tutorial but it doesn't actually explain the AsciiPanel code it is using, it assumes you know it but there is no place to learn it. I am just so lost, any help is appreciated.

stable dawnBOT
#

<@&987246399047479336> please have a look, thanks.

#

You can use </chatgpt:1108714622413963314> to ask ChatGPT about your question while you wait for a human to respond.

vague latch
#

for a school project btw

#

I really just need to pay someone to be my personal tutor lmao because i feel like im slow when i deal with this stuff sometimes

sharp garden
#

We don't really know your needs. Technically you could do it fully yourself using just System.out.print

#

If it's for a school project it might also not be allowed.

vague latch
#

i did specifically ask and i am allowed to use a library

#

idk how to put my needs into an english sentence because I barely know what these libraries have to offer/what they can do

#

out of the ones i listed, can all of them handle ascii graphics, different screens, making a terminal window, etc? and if they all can, which one has the most documentation/resources?

vague latch
nova cradle
#

what does your assignment say exactly ? Its kinda weird that they demand such a high commited project as simple assignment

vague latch
#

its like a semester project, and we chose what we are doing. for my classmates, he told them if their project idea was going to be too hard, but he said nothing to me, so he thinks i can do this/thinks that it shouldn’t be too bad. we have until late april to finish, and it was assigned like last week

sharp garden
#

Does your teacher even know you want to do something visual? They might think you were doing more a CYOA game with text based input.

vague latch
vague latch
sharp garden
#

Well yes, but if you don't know where to start... And plenty of people start purely text based.

#

I did a project like yours once, where you caught fishes/bombs. That was done without any libraries.

#

Also for a school project keep in mind where the points are. If you spend 20 hours trying to get a library to work, that's 19 hours that might be better spend on nice features/clean code/setting up version control, ...

nova cradle
#

also do not try to act like superman

#

any lib your going to use needs time to learn

#

alot of time

vague latch
vague latch
sharp garden
#

It depends on what you plan. Is it a top down/player visual. If it's just top down you can literally create a 2D array. # as walls, O for your character, * for chests, ...

nova cradle
#

if your idea is a simple ascii based , then the console is ideal. IF u want to use images, its not that extra hard to get those in. If u want full gfx, your going into a place that u need to learn gamespeed, ticks, event, controls etc etc

vague latch
sharp garden
nova cradle
#

2 months is enough with knowledge. Without, remember this -> your professor is letting u dig your own grave ( with your proposal 😉 )

#

2 months of maybe 1-2 hours a day -> no

vague latch
sharp garden
#

Print to the system console.

vague latch
#

yeah ok

sharp garden
vague latch
#

is there a way i can write a script to generate these maps at random?

sharp garden
#

Since you'd also need to do a validity check.

vague latch
#

so i could make it psudo random by making a folder of say, 100 txt files just filled with maps?

sharp garden
#

Yes

nova cradle
#

"random" is an illusion

#

start out on paper, write out what u need to do as minimum and what u want it to do

#

then work on those

#

It'll stop u from falling into the pitfall of What-If's

sharp garden
nova cradle
#

luckely the defense talk cleared up things and he gave me 80+ lolz

vague latch
#

that’s good then

nova cradle
#

not really, skimming is dangerous

#

u say ascii art

sharp garden
nova cradle
#

for on person its this

#

[]#{[^

#

for another its a fluid pixel animation

vague latch
#

so how does a txt file translate to a 2d array? to me if i made a map in a txt file, i just read the file with a scanner and check and see what actions the player can do based on where he is on the map (if a wall is to his right, he can’t go right, open a chest to the left, etc)

vague latch
#

god no

#

printing a map, giving the player a chance to do input, then update it

#

turn based

sharp garden
#

Keep in mind both of these are ascii games:

#

Hence our question

vague latch
#

left one fs

#

possibly changing colors of some of the elements if possible but def the left picture

#

so when i was using asciipanel, the big problem i ran into was generating the rooms how i wanted them. i was trying to go for square rooms with 1 wide corridors connecting them, but the tutorial i used generated “caves/caverns.” I couldn’t figure out how to change it. would that be possible to procgen without a library?

nova cradle
#

Don't over complex yourself

#

PG things need a verifier aswell to see if they are feasable. I know u stated that u like to be game dev, but don't apporach it like that for the moment

#

if u write a loga that can make a maze for example on its own. Then u start with basic checks, entry point, exit point, no empty spaces ( grid with 4 walls ), but then u need to write the code to see that it can actually be solved

vague latch
#

hmmm. how would you recommend I go about this then? I want my game im making to have high replayability, but im not sure how to make it have that without pg

nova cradle
#

start with the most basic approach

#

make a file with a maze / dungeon

#

then start working on the actions

#

if u get those working and u still got time over, then u can go banana's on things u want to add ( as u got a program that works withing your assignemnt )

vague latch
#

hmm ok. start with a single map and make it work with that, then make it bigger and better later

nova cradle
#

yes, get it working

vague latch
#

and i won’t need a library for this? just basic java?

nova cradle
#

yeah

#

thats where the part of a working program comes into play. If u get that and u have the good style of coidng ( layers seperated ) u can add gfx libs and database or whatever u want later on

#

but for now, single file with a dungeon, and get your map interactable the way it needs to be

vague latch
#

after i get the map and interactions done, do i continue to make the character/enemies, etc or would i go back and add procgen and then do all that

nova cradle
#

do u know Oop ?

vague latch
#

that’s the class im in rn lol

#

so kinda?

nova cradle
#

yeah, wasnt sure on that answer when u said character / enemies

#

Oop wise those are the same

vague latch
#

i would do a parent class like “creature” or something and then child classes “player” and “enemy”? or do i not even need to do all that?

nova cradle
#

creature is a good parent

vague latch
#

i would need to make methods or scripts or something for the enemies to move though right? because the main difference between them and the player is that the player is controlled by a person?

nova cradle
#

scripts is another language ...

#

and what is the difference between a human and a pc move ?

#

the keypress ?

#

its just a matter of tapping the next step. If its a player, its input. If its a npc, its another method , for example move. If blocked by another creature, check attack etc etc etc

#

do not focus on those for the moment, focus on getting a dungeon and making it interactible. Once u get that done, all the rest is very easy to add

rugged mist
#

@vague latch strictly speaking "laterna" is the most popular by github stars

#

idk anything about its quality though

vague latch
#

they were advising me last night to go without a library. i would like to use one but if its going to take too much time to learn it then its probably not worth it to use

#

would i need to use jframe tho? looking at documentation for that and im not sure

hollow cobalt
#

@vague latch I don't have a library recommendation, but there's nothing wrong with using one if you want to. What I would do in your place is use Java AWT to make a graphical application. (Most people would probably use Swing but I'm a weirdo.) I would start with a class I'd call Camera.java which would have toWorld() and toScreen() methods for translating between world and screen space. I say this because that's what I did in JavaScript and I'm happy with the results. I'm trying to solve a different world generation problem than you are (I'm making the inside of a space ship, rather than a dungeon) but I personally would do that in Java as well just to keep everything in one code base. To be clear, that's a design preference. Using a script would be perfectly valid. I could sketch something out for you as a starting point, but I don't have time to do that today. Maybe later this week. You said this project is due in April, right?

vague latch
hollow cobalt
#

Swing is more advanced.

#

Give me until Friday. I'll find some time to make a simplistic starting point that draws a square grid. You can then extend that to make your rogue-like game on top of. You'll have to figure out how to draw the characters and make the rules of the game, but at least you'll have a framework where you can draw one cell at a time instead of having to figure out how to get started. You don't have to use it at all if you don't like what I come up with. I might try my hand a dungeon crawling game and this is a good excuse to get started.

vague latch
#

dude you are so helpful thank you so much

hollow cobalt
#

Haha don't thank me yet: I haven't provided anything helpful so far. I've got my Camera.java set up. I think I've got all the event stuff wired properly but I still have to make a sample application to test it properly. Also, there's no threads or frame updates just yet.