Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About Burty

  • Rank
  1. Burty

    A quick question

    Ahh see here is the problem! I need this to work for both Java and C++ so i need the preprocessor to sub in the string where its used. So can a define do this? The const char wont do the job for what i need of it. Thanks guys!
  2. I want to use a #define for a string #define COPYRIGHT1_STRING © 2004 2005 Will that work or do the spaces break it? Do i need to use quotes?
  3. Hi Zalman. Thanks for you responce. Read a lot of your post before on J2ME. Thanks for the responce. The reason i have to do this is not for practical use but to show that i can understand this kind of thing & have a head for optimisation. i think i have solved it. I have one memory optimised function and 1 speed optmised function. Dont see where i can improve either. void drawNumber1(int n, int x, int y) // mem optimised { String str3 = Integer.toString(n); n=0; try { while ( true) { x += drawChar(str3.charAt(n), x, y); n++; } } catch (Exception e) { //System.out.println("Error funct 1 n at :"+n); } } void drawNumber2(int n, int x, int y) // speed opti { String str2 = Integer.toString(n); char char_array[] = str2.toCharArray(); // call a method once and have an array to increase speed. int xx=x; //make vars local for speed int yy=y; int array_index=0; try { while ( true) // remove bounds check and catch the exception { xx += drawChar(char_array[array_index], xx, yy); array_index++; } } catch (Exception e) {} }
  4. I only call it for the number of chars there are. There is no way around calling it. I 'have' to use it. Its the rest of my code that i am concerned with. Is there away to reduce the mem use or away to make it faster. Maybe its as good as it gets but this is not my area of expertise so thats why i'm interested in your input on the subject.
  5. First of all. handle_char is a black box function the prints out a char to the screen and returns the width of that char. I am writing handle_Number to print an int to the screen. I know an int can be more the than 1 char so i need to 1) Get the number of chars that make up the int. 2) so i convert the int to a string and use .lenght() on it. Then i convert the string to a char array so i can pass in the chars 1 by 1 into the back box function handle_char. I use the return value(width of the last char printed) from handle_char to update the next position to draw the next character belonging to the number I am trying to print to the screen. The x and y passed to the handle_Number function are the achors to draw the number at. So i draw the first char of the number at x and increment x for every char with the return from handle_char. I'm writing 2 versions of this function. 1 optimised for speed 2 optimised for memeory Wireless developement is on slow devices with limited memory so thats whats important.
  6. Hi Pipo! I didnt think there were pointers in Java !!?? I may be wrong. (but I hope really hope the last 2 years of working with Java have though me something). Burt
  7. OK here is the code. void handle_Number(int n, int x, int y) { String srt1 = Integer.toString(n); int num_chars = str1.length(); char char_array[] = str1.toCharArray(); n=0; while ( n < num_chars) { x += handle_char(char_array[n], x, y); n++; } } int handle_Char(char a_char, int an_int) { return 4; // 4 for example sake god be any number } Need to learn what kind of stuff here takes alot of cycles (slow) & what takes alot of memory
  8. I'm pretty good at optmising game code by design but when it come to optimising the use of strings etc i need to learn some more. Here is my code writen to be fast as is obvious at the moment. IS there anything you recommend i look into to make this faster. IS there away around using any of the methods i have used? Updated code below Thanks for any tips [Edited by - Burty on May 20, 2005 4:21:58 AM]
  9. MSCONFIG is not on my WIN2K. Or so it says. Program will not let me unistall. Tried Safe mode. The unistall button has disappeared from the list. Hence why i'm trying to clean it from my system myself. So need to clean all traces from the reg and anywhere else on the system it is hiding. So any other pointer would be much appreciated. Brian
  10. I cant do an unistall of Norton through the unistall functionality that comes with the program. It cant close one of its process so can complete the unistall. So i have renamed the Norton/Symantec folders so the program cant run when i boot up the machine. When the system opens up now i get some warnings saying some .dlls can be found etc so where in the reg to i have to edit to get rid of these warnings. Will there be some start up area of the reg where i can fix this? Win2k is the OS by the by! Thanks guys!
  11. I would like to make some animated gifs from screen shots off my game for a web page. Are there programs that will record the screen frame by frame so you can later go back and use the images to make your animated gif? If not do any of you have any good tricks to make this process easier? Thanks, Burt
  12. I have a load of mp3 and a P900 with a about 40mb of mem space left on it so I can keep some mp3s on it to listen to while traveling about. I also have a mini disk and when moving the mp3's across to it, it gives me 3 options for sound quality with the best quality using a bigger file and the worst producing a smaller file. Can this be applied to mp3 files also? As I would like to shrink my mp3's so I can get more on my phone! Thanks for the advice! B
  13. I have to set up a network later between 2 computers that are connected in to a hub which has a broadband router connected to it. Both computers can access the internet with no problems. They are using TCP/IP and obtain and IP Address automatically and obtain DNS Server address automatically. I would like for both computers to see each other. For both computers to access the internet i dont think i can change the TCP/IP settings so is there away to make both computers see each other? Should i add maybe another protocol such as NetBEUI to each of the computers LAN settings and then they should be albe to see each other? Any help/advice would be appreciated as i'm a Networking noob! Thanks again guys!
  14. I got the Utilty of the Seagate site. I have now got the disk formated. I am trying to boot of my Win2k CD but its not happening. If i boot off the win95 Dos boot disk and load a CD driver and then go to the disk it can read the disk with no problems. (Got to take more care of my CD's. Might have to give MS a call and see if they'll swap it with a new one if i send it back.. though there not supporting 2k anymore are they?.. ummm ). I have been looking on the FreeDOS site to see if they have an app for making a boot-disk since the one that Dell made seems to be a bit windy. But they talk alot about boot floopies and ISO files but i cannot find a floopy disk maker. Can anybody suggest how to get the OS installed now? Have an IDE HDD that i could use as the OS Drive (20GB). Anybody know of other good boot floopy disks that would server my purpose. I think if i can get the system booted off a floopy with CD-rom support and detect the HDD and then do an install using winnt (not the 32bit version) i might be able to get the system going. Then install an OS onto the RAID SATA driver later on. Again thanks for the help.
  15. I'm trying to install a 150gb raid SATA hdd. What i have done so far is download a prog from Dell called cdenab.exe that creats a Win95 based dos disk that loads CD ROM drivers(bootable disk). So i boot off that disk and load the cd-drivers. I FDISK the HDD driver. Create 1 partiton. Then restated. Booted off Disk and tried Format c: It said all data on fixed disk will be lost. 49,99.93m (Its a 150bg drive) It started to Format and then seems to pause on 9 %. So i rebooted machine off disk again and tried the same thing and this time is got as far as 12% and has been stuck here for over an hour. Can somebody advise how i can get this disk formated? Maybe the problem is with the prog/disk utility i am using from Dell since it is a Win95 based dos app? Any ideas how i can get this disk formatted? Many thanks for you help.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!