{"id":25,"date":"2018-02-22T09:38:31","date_gmt":"2018-02-22T09:38:31","guid":{"rendered":""},"modified":"2023-11-27T07:20:53","modified_gmt":"2023-11-27T07:20:53","slug":"alternate-reality-x-update","status":"publish","type":"post","link":"https:\/\/landbeyond.net\/wordpress\/2018\/02\/22\/alternate-reality-x-update\/","title":{"rendered":"Alternate Reality X &#8211; update"},"content":{"rendered":"[video:youtube:5cqpFr0LDNw]\n<p>This is is about the process of converting from C++ to Java. I took over fixing alternate reality X. I found this game a couple of years ago, Acrin has done a great job recreating alternate reality. This is a game I played many hours during high school as an young adult. When I found this game on the internet several years ago, I was very excited. The Acrin started this but is\u00a0 not able to complete it, so I&#8217;ve taken up the quest to complete it. Not being able to complete it is no surprise to me,\u00a0 the original was not completed either.\u00a0 Maybe it is devine to not be completed.\u00a0 The Acrin had many visions for alternate reality, one of those visions was to be able to play it on multiple operating systems. I have taken it over and decided that I will try and continue his visions. So I have converted the game to Java, this way it will be an easy switch to other operating systems. I&#8217;m using the Java Light Weight Gaming Library, it has support for Windows, Mac and Linux. This way as the programmer there is nothing to be done to support all three different operating systems we will not have to maintain any differences between revision.<\/p>\n<p>I have been programming since the 80s but as graphical programmer. My background is business software and website design. I started converting this back into in December. It took me several weeks of looking into openGL. During this time I wrote several test applications to figure out how to use opengl and LWJGL.<\/p>\n<p>The major challenge in the conversion was the opengl and the sound libraries. Java lightweight Java gaming Library did not have support for PNG picture files and OGG audio files. I wanted to use version 3 of the library to be current with openGL and with the library.\u00a0 So I had to take the time to learn to go to read those in and convert them into it opengl format. Between the graphics Library the audio library that took the better part of \u00a0December.<\/p>\n<p>So all of the opengl code has been changed and rewritten into JAVA,\u00a0 the openGL calls are the same but little to no of the original code is left.\u00a0 All the drawing of thecity walls have be deleted and created into a new classes and more optimize.\u00a0 Not really need since when it comes to openGL this game is very little of a challenge.\u00a0 This is not a true 3D world,\u00a0 what you see is the only part of the world that is draw.\u00a0 I think that is GREAT, Acrin kepted it like the original concept.\u00a0 Many pluses to the attention to details of the original 8-bit game.<\/p>\n<p>The Next Step was converting C++ to Java. That part was not to hard of the project, luckly this is a very small project from what I&#8217;m used to handling.\u00a0 So it only took about 2 weeks to convert the entire project.\u00a0 Some of the bigger things to convert into Java is that there is no &#8220;STRUCT&#8221; in Java.\u00a0\u00a0 Closest thing is a class,\u00a0 so I converted all the &#8220;STRUCTS&#8221; into a Java class.\u00a0 The next things is the lack of UNSIGNED variables in Java.\u00a0 This made reading in the binary files handling to be rewritten.\u00a0\u00a0 Because when using a byte to read in a single byte, it converted it to a SIGNED number so many values end up negative.\u00a0 So every byte had to converted so you cast bits to prevent a signed value.<\/p>\n<p>Nice thing about the conversion and being simply is String conversion.\u00a0 Strings in Java are use easy to use and do much more then C++.\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>Check out my short youtube video of a small clip of the game running in Java.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is is about the process of converting from C++ to Java. I took over fixing alternate reality X. I found this game a couple of years ago, Acrin has done a great job recreating alternate reality. This is a game I played many hours during high school&hellip;<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-25","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/landbeyond.net\/wordpress\/wp-json\/wp\/v2\/posts\/25","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/landbeyond.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/landbeyond.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/landbeyond.net\/wordpress\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/landbeyond.net\/wordpress\/wp-json\/wp\/v2\/comments?post=25"}],"version-history":[{"count":1,"href":"https:\/\/landbeyond.net\/wordpress\/wp-json\/wp\/v2\/posts\/25\/revisions"}],"predecessor-version":[{"id":312,"href":"https:\/\/landbeyond.net\/wordpress\/wp-json\/wp\/v2\/posts\/25\/revisions\/312"}],"wp:attachment":[{"href":"https:\/\/landbeyond.net\/wordpress\/wp-json\/wp\/v2\/media?parent=25"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/landbeyond.net\/wordpress\/wp-json\/wp\/v2\/categories?post=25"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/landbeyond.net\/wordpress\/wp-json\/wp\/v2\/tags?post=25"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}