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.
#Picking a Library to Use for a Roguelike/Dungeon Crawler
1 messages · Page 1 of 1 (latest)
<@&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.
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
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.
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?
is this something that would be better than using a library? i am assuming not bc if it was libraries wouldn’t exist
what does your assignment say exactly ? Its kinda weird that they demand such a high commited project as simple assignment
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
It depends on how complex your needs are. A dungeon crawler could just be a 2 dimensional array where each cell is a character, and you can just loop over that.
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.
i was originally looking at doing that but since i want to be a game dev i figured id better start early
i don’t know, i did mention ascii graphics in my proposal so he probably knows
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, ...
hmm ok, that is a good point
also do not try to act like superman
any lib your going to use needs time to learn
alot of time
how would i go about doing something like this?
do you think its not worth using a library then? how much time is a lot? is two months enough?
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, ...
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
is there a way to make this procgen, so that each time the game is played, it is different? im kind of looking for that as well. i used asciipanel and made a map generator that is procgen, but i didn’t feel like i was getting it/learning anything. i was mainly following a tutorial
It's enough time, but what will that bring you points wise? You showcase you can add a dependency to maven, and use a library. Will that net you more points and knowledge than showing you can do something yourself?
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
by the console, you just mean no library, using print statements?
Print to the system console.
yeah ok
Certainly. But it would likely be easier if you just provided some level maps in a text file, and randomly loaded one of them. You can always switch this bit out later.
is there a way i can write a script to generate these maps at random?
Yes, a lot of ways. But that goes a bit deep.
Since you'd also need to do a validity check.
so i could make it psudo random by making a folder of say, 100 txt files just filled with maps?
Yes
"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
At a certain point I dislike when teachers do that/skim too swiftly. I had a teacher accept my proposal, and then complain I bypassed one of their hidden "challenges" with my design. It's not my fault I had a flexible design.
i almost lost a year due to the prof skimming lol
luckely the defense talk cleared up things and he gave me 80+ lolz
that’s good then
Not really, it led to a lot of anxiety.
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)
no animations no
god no
printing a map, giving the player a chance to do input, then update it
turn based
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?
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
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
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 )
hmm ok. start with a single map and make it work with that, then make it bigger and better later
yes, get it working
and i won’t need a library for this? just basic java?
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
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
do u know Oop ?
yeah, wasnt sure on that answer when u said character / enemies
Oop wise those are the same
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?
creature is a good parent
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?
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
@vague latch strictly speaking "laterna" is the most popular by github stars
idk anything about its quality though
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
@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?
yeah like late april, dont have a specific date yet. what is the difference between swing and awt? why would someone choose one over the other? and yeah, if you would be willing to sketch something out, that would be so awesome! if you wanted to you have plenty of time, im still kinda in my research phase
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.
dude you are so helpful thank you so much
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.