Hi! Since from time to time here on \v\ programming threads tend to pop up, i thought to share something i was working on here. Like title says, i'm making an Engine that allows you to make very simplistic text based games. You can write maps with it and write events inside the map that go from simply printing text to change "tiles" in the map. It's very limited, but i really like where i'm going with it. But that's not the point. I write here because i'd like to hear more experiences people's opinion on my code, so that i can improve and make more efficient programs. I'm sure i'm going to fuck up something (i never used GitHub), but this is the link to the project: github.com/Randor-png/Text-Based.git
The java folder will contain the Engine Code, while the data folder contains the files with examples on how you write maps and events for it. Criticism on the code is vastly appreciated.
Can't, the nearer dick here is my own and i'm too much of a fat ass to reach it :(
Jackson Reed
Zig Forums is retarded. If you want actual criticism, post this in the /dpt/ thread on /g/.
Josiah Smith
Looks cool. Nice idea. I especially like being able to set up the colors very easily for the maps, good idea with that. I like it doesn't need to be limited to grid-like layouts too. That alone allows for nice freeform looking maps instead of generic-atlas-15.txt all the time. Also, yes, do as says, equally the /vg/agdg threads
Thanks! Regarding the colors, in the code i put on GitHub i deactivated colors. I use escape codes for them and i can't get them to work outside of MacOs. I'm happy you found it interesting.
Matthew Edwards
I don't really see the point of using an existing engine over just rolling your own for text based games seeing as how trivial it is to implement. Doing it yourself also lets you do more cool shit.
Blake Reed
On the note of non-grid maps, I would highly suggest adding the ability to define a symbol as a space value so it won't make the map definitions look horrible. Being able to define empty gaps easily would be nice. Then again I guess the person making the map could easily just set, say, # as black and use that. As for dealing with escape codes, not sure how Java works since I last wrote code for it in 2006 and have long since forgotten it. Good luck, they are always a bitch to deal with.
Grayson Torres
Yeah, it's very ugly to use \u0020 at the start of each row, i need to find another way to do it. Again, thank you for your feedback!
Levi Watson
Every single time i share this project someone always makes this comment. What's the deal with java?
Charles Gray
Hopefully someone in the /dpt/ thread can help you with that, I never got far enough in to Java to use complex code layouts like that. I've done similar stuff in other languages, including JavaScript, and in the cases of those it was easy enough to wrap the whole thing in a strings quotes and not use any characters that break said strings, then made a parser for that. JSes lack of care for whitespace is one of my favourite features of it. You can put a million newlines if you wanted to, as long as the next piece of text makes syntactic sense shit still works. Marvellous!
Michael Cruz
Java sucks for games and is associated with low-skilled indian codemonkeys. But you're also using a mac, so you're a lost cause anyway.
Gavin Hughes
How long are you going to stick around? I'd like to offer some in-depth critique on this; it looks pretty interesting. It seems like there's an interpreter for a tiny scripting language in here.
Caleb Flores
can't argue with that.
Asher Brown
Minecraft can be raytraced. And I'm not speaking about the shitty new Bedrock RT. It's not the year 2002 any more.
Wyatt Clark
Minecraft isn't java anymore and when it was it ran like shit. If it's not 2002 anymore, why would you still use java? Especially now when their licensing has changed.
Owen Ramirez
I'm here for as long as this thread is up. Tell me everything.
Jason Roberts
Anyone who wants to play the game will have to install Java on their machine. Almost no other popular software use it nowadays, so they will probably need to install it solely for your game.
Michael Cox
I see. To which language should i switch for a project of this type?
Jaxon Hall
Any other. I like C# for stuff like this. You probably could even write it in JS and host it as a website, considering the small scope.
Brody Ross
There's 2 versions of Minecraft. Java still works perfectly fine. Imagine playing the shitty Bedrock edition, you 12 year old.
Luke Campbell
oof man, clean up your java code, hurts to look at
it costs 50mb for hello world program iirc, by storing the whole .net library in your application folder
why bother using window language and a third-party editor compile to mac instead of just using a mac supported language
David Price
>I write here because i'd like to hear more experiences people's opinion on my code, so that i can improve and make more efficient programs. Zig Forums knows nothing about proper programming practice, i'm probably one of maybe a dozen people here who knows anything about programming and i fucking hate programming now and don't want anything to do with it. all Zig Forums knows is evaxephon is a retard (true) and that a thousand nested ifs are a bad idea (usually true). /g/ sometimes has people who know shit but there are also a ton of idiots there with bad advice if you want to know how to properly right computer programs: >learn how to use git properly >learn how to use your debugger properly >read through the full documentation on your language and understand what each function and feature offers and how they work under the surface >consider doing similar things for other popular languages that have different features so you know what yours is lacking and how to implement those features correctly (gcc and llvm are open source, you can see how functions are implemented) >find some open source projects that are interesting to you and appear to have elegant codebases and have active development and developers who have relatively high standards. make your own private branch and tool around with it a bit. >try to contribute to those projects a bit once you think you know what you're donig, even if it's just small stuff like tiny bugfixes or very small features. their devs, who are likely way more experienced than you, will probably give you feedback on your code quality if there are problems with it, especially if you are polite and ask. >a lot of decent projects also have developer irc channels or discord servers, you can always ask for advice there keep in mind that not all knowledge and advice is good. there are people out there with bad ideas. if you get advice, verify yourself that it's good advice using unrelated third party sources and/or your own brain.