ID:151913
 
So Im making a game (actually a couple) and they use a lot of on screen text because I dont use the panel set up and have a full screen set up for my game. I have already coded a system for on screen display but I feel that it isnt the best solution. Looking through all the demos they do it the same way and was wondering what everyone else thought would be a better way.

Right now im coverting the text string to a list and creating objects for each character in the text string. It works fine and I got it working (with dynamic spacing for each letter and word wrap), but i feel that there has to be a better way.

Also on the same note Im wondering because i was wanted to make the chat box on screen and semi transparent but doing that much changing of the screen with this method would cause lag with lots of players
NightJumper88 wrote:
Right now im coverting the text string to a list and creating objects for each character in the text string. It works fine and I got it working (with dynamic spacing for each letter and word wrap), but i feel that there has to be a better way.

There is a better way; look up the DmiFonts library.

Lummox JR
In response to Lummox JR
I have looked at it before and its like the same process just better handled, ive just seen that there was suppose to be map text supported in ver 4 and was wondering if it was there yet.

And I am looking at your library to see what i need and dont and modify it to work best with my stuff
In response to Lummox JR
Ok so Ive been playing with your library and cant seem to get it to work right. Also was wondering if this is more efficient cause it seems to do a lot more stuff than what im doing right now. but this is what im trying to do so you can see

In response to NightJumper88
NightJumper88 wrote:
And I am looking at your library to see what i need and dont and modify it to work best with my stuff

The thing about libraries is that you don't need to modify them to work with your stuff. You include the library in your project, and use the features it was packaged with, and don't use the features you don't need for now (but which may be needed later or in a different project).
In response to Kuraudo
I know that but i like to recode everything out of the library in my own style to make sure i understand whats actually going on that way if i find something it cant do I know what i need to do to fix it. Also I like to change it to fit my situation cause normally you can get the most efficient way to do things that way
In response to NightJumper88
If you're going to do something stupid like that, then you're getting rid of the entire point of using a library. It's like buying a brand new Ferrari and then replacing everything with rusted out parts just so you can call it your own.
In response to Popisfizzy
Actually I look at it like learning how to build a classic roadster with your own hands to use your metaphor. I learn more this way than if I were to just stick a library in there and not look at how the coding works. Id rather have a little worse game and know how everything works in it than have code that I dont know what it does. Libraries are great for people who are looking to piece stuff together but im willing to take the time to learn so thats what I do.

90% of the time nothing really changes I end up with almost the exact same thing but with different variable names and formatted so I can read it better, because usually (and especially with Lummox) the library is coded in a great way and are just hard to understand, like most other programming your own style of formatting makes it easier for you to read.
In response to NightJumper88
NightJumper88 wrote:
Actually I look at it like learning how to build a classic roadster with your own hands to use your metaphor. I learn more this way than if I were to just stick a library in there and not look at how the coding works. Id rather have a little worse game and know how everything works in it than have code that I dont know what it does. Libraries are great for people who are looking to piece stuff together but im willing to take the time to learn so thats what I do.

90% of the time nothing really changes I end up with almost the exact same thing but with different variable names and formatted so I can read it better, because usually (and especially with Lummox) the library is coded in a great way and are just hard to understand, like most other programming your own style of formatting makes it easier for you to read.

Fizz is right--it's still ridiculous. Often deconstructing such a library wouldn't aid you much in figuring out how to make your own, and the library is already built with customization in mind. Taking apart a car may give you a little insight into what it does but it won't help you determine how to make your own from scratch--only research will help there. You're really missing the point of libraries here.

Most advanced programmers have no problem using third-party libraries. They realize there's significant value in not reinventing the wheel. I offer that with a grain of salt of course, because BYOND's code is full of third-party-written controls that had to be tweaked heavily to work in our software the way we wanted them to--most of that, however, had a lot to do with general Windows wonkiness and much less with the internal structure of the code in question. DM libraries, the well-written ones anyway, tend to be more robust. I submit that it is unlikely you'll find something worth tweaking in DmiFonts that it doesn't already do for you.

Lummox JR
In response to Lummox JR
I agree and your libraries are always the best (while hard to read and understand a little above my coding level), but like I was saying a lot of it is just deciphering what your doing and finding the logic behind it that way I understand it more, also tweaking the variables and procs to match my style to be able to go through and remember whats going on better. I dont have a problem using libraries in my code, I just like to figure out the logic behind them.


But on a different not Ive manage to figure out the library and have started using it, but im seeing a delay in the output already, compared to simple method of doing it. Now I was wondering if I should create the iconsets for all the NPCs when they are created so that when a player talks to an NPC they dont have to create the iconset everytime and if that would speed it up.

Also I was wondering if there is a way to shorten the gap between the lines right now I can only seem to get it to draw one line per icon which i would prefer to get it a little closer than that.