[APP] J2ME SDK Mobile - Printable Version +- dedomil.net - Mobile Games Forum (http://dedomil.net/forum) +-- Forum: Download Section (/forumdisplay.php?fid=8) +--- Forum: Mobile Games [Public] (/forumdisplay.php?fid=18) +---- Forum: Java Platform (/forumdisplay.php?fid=19) +---- Thread: [APP] J2ME SDK Mobile (/showthread.php?tid=5579) |
RE: [APP] J2ME SDK Mobile - JoseskVolpe - 06-20-2021 12:00 PM Update #4 20/06/2021 (DDMMYY) Released a new update adding neww features that'll make development easier NEEDED CHANGES: If you were already working on a game and you want to update the template features, you must do these changes:
Code: public void Update(){ Replace it as: Code: public void Update(double delta){ Change note:
Next update to do:
Notes:
delta is a double variable, wich means it handles with floatings points. Most of the times, you'll use it to handle with integer variables. You must add a conversor or a round calculator on them. For example: When you're moving a object, you most likely create a int positioning variable, like that: Code: int positionX, positionY; When you want to sync it to the FPS, you'll calculate the movements versus the time, for example, if i want it to move 30 pixels per second, you think in this pseudocode: Code: positionX -> positionX + 30 * delta; This would multiply 30 per delta. Delta is often a number for 0.0 to 1.0, for example, 0.0305. In Java, variables types is a thing, so you cannot just make this calculation as it would return an error because it's a float value parsing to a integer variable, you would like to convert it aswell as a integer: Code: positionX += (int)(30*delta); Code: positionX += (int)Math.ceil(30*delta); //You'll still need to convert as int because Math.ceil() and Math.floor() returns double values This will easily solve the problem But with low values you'll often have problem with unchangeable values, in this context, the object will be freeze on higher FPS, that's because as an integer value, it will just ignore the broken numbers, 1+0.3 will still be 1 instead of 1.3. To solve this, you can make positionX a float variable instead of a integer, and convert it when you're parsing it to another integer method, for example: Code: float positionX, positionY;
Sound is experimental, i'm still working in a complex Sound engine on my UndertaleME project, and i'll port it to this game template once it's clean, smooth and smaller. Currently, you cannot mix sounds, for example, if you're playing a music, you cannot play a SFX with it, after the final update, some devices will still not support sounds mixing because it's a Java limitation for some devices. Expect a lot of future changes and deprecations To load and play sounds, it's easy. For example, if you're going to play a music: Code: Sound music = new Sound("your_music_name.mid"); This will play the music continuosly. You can stop it by Stop() method or with Close() method to immediately free it from the RAM Put your music in 'resources' directory inside of 'src', that includes your sprites and Images For musics, it's adivsed to use .mid or .midi formats. You can use other formats like .wav, .mp3(DEPRECATED) and .amr(DEPRECATED) aswell, but has in mind they're much heavier in memory. WARNING: In the next updates, it's advised to use ONLY .midi or .mid for music and .wav for SFX. Other formats WILL be descontinued. Consider alternative formats support as already deprecated. That's due to a Java MMAPI limitation. RE: [APP] J2ME SDK Mobile - star cash - 06-20-2021 02:19 PM Nice bro RE: [APP] J2ME SDK Mobile - JoseskVolpe - 06-26-2021 07:52 AM Now J2ME SDK Mobile does looks cool on Android I included that keyboard on my fork from J2ME SDK Mobile project on GitHub, i've made a Pull Request and it'll be probably available in the next update. I'll release my settings when the next version is released because it gives some work RE: [APP] J2ME SDK Mobile - JoseskVolpe - 06-29-2021 12:18 AM Update #5 *Fixed some commentary mistakes *Minor bug fixes *Added a 16x16 icon I've added a API reference ZIP archive, that says what methods you can use in every class and what they do. Use that to get help for your code without the need to leave J2ME SDK Mobile, i've included everything you'll need to create a 2D game in there RE: [APP] J2ME SDK Mobile - JoseskVolpe - 06-29-2021 10:11 AM EMERGENCY Update #6 Download *Fixed a glitch that were causing some devices to freeze when closing the application, or not being able to minimize it, and could possibly launch-crash the game in some devices, by adding a new Thread for the Update() method instead of using startApp() thread RE: [APP] J2ME SDK Mobile - Sadiq1 - 01-17-2024 05:55 PM Please how to set the app RE: [APP] J2ME SDK Mobile - Nrookie - 08-03-2024 04:01 AM Please can you host the files on your website. I am finding it a bit difficult to access them on this server. RE: [APP] J2ME SDK Mobile - King_Dave - 08-03-2024 01:56 PM @Nrookie, if you could mention all the files you need I can help |