how to clear screen of text
BlitzMax Forums/BlitzMax Beginners Area/how to clear screen of text
| ||
i searched but couldnt find anything anyways, i am making a text adventure game what is the equivilent command of cls in console. if thats what its called or is there one? thanks :) |
| ||
http://74.86.81.120/Community/posts.php?topic=84673#957169 Jim Brown also has a more elaborate Console library that adds a bunch of related commands -- you should be able to find it if you search the forums. |
| ||
Thanks. I guess my searching skills are not up to par. :P |
| ||
B, I've just had a look at your website and the space game looks really cool! Here's a hint you might find useful - you can convert floats to strings, and then remove some or all of the 0's from the number, before displaying. This will prevent awkward looking values such as "$14.0000000". You could just have "$14" or "$14.00" instead. :) |
| ||
@Czar hey thanks! you dont know how good that sounds as none of my friends care for my little space game except one and he is quite busy at the moment. so would I use the string(variable#) command? and then the Chr() and find() commands? cuz then that would .... wait can i just convert it to an int? ---> int(variable#) and actually I have redone alot of my code as i just got really good at types and i converted all the ship variables to types as well as changing alot of the floats to integers as when i started this project a year ago i had no idea what the difference between ints and floats were. im working on the space pirates and stars next. im actually working on that project as we speak. do you have MAC or PC? i have both however the reason I have yet to upload the PC version is that my PC can only run screen resolution 1024x768 and my MAC runs at 1280,800 which is what the game is coded for and when I change the graphics w,h,d command for 1024x768 on my PC it looks kinda funny as the stars drawn in the background are all messed up. i dont wanna recode all the stuff for a lower resolution as most PC's nowadays i assume can run 1280x800... right? i guess i could set separate variables for everything when drawing it to the screen and keeping it all relative to the screen width/height. but that sounds like way too much work for me... (lazy i know that is why it has taken so long to get THIS far) any ideas on better ways to achieve this? EDIT: UPLOADED Alpha_v4 for MAC |
| ||
Hi, I don't have any sample code to hand. If you don't want any decimals, converting to int would be fine. If you want X decimal places, convert to string and then find the position of the full stop. Then grab to that position + X. Check that there is a full stop in the float first, otherwise your code could give odd results. (Consider a very large float, eg 5E10 no . in there) I have a PC. My monitor can do 1280x800 but it's squished (I don't have widescreen), 1280x1024 is the prefered resolution. Some people will still have old monitors that can only do 800x600 or 1024x768. It depends how far you are willing to go to accomodate those users. If you plan on commerically releasing your game, 1024x768 support is a must. If it's just a project for fun, don't worry :) |
| ||
I guess my searching skills are not up to par. :P I find it a lot easier to search these forums through google than through the built-in search functionality: Just go to google.com, and add a 'site:blitzmax.com' to your query to limit the results to those from this website. |
| ||
@xlisior thanks. thats a great idea. @Czar thanks for the info. ill just make my programs for 1024x768 from now on. might as well if i want anyone to play it. also, how do i find the position of the full stop in a string? i dont usually mess around with strings. thanks guys |
| ||
s.FindLast(".") returns the last position of a full stop in the string, or -1 if no full stop is found. (also, s.Find(".") will return the first position) |
| ||
ok cool thanks. i like the $14.00 idea rather than $14.0000 or just $14 thanks for all the help guys. |