If have login problems remove cookies and clear browser cache.



Post Reply 
 
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[APP] J2ME SDK Mobile
06-20-2021, 12:00 PM (This post was last modified: 06-29-2021 12:21 AM by JoseskVolpe.)
Post: #17
RE: [APP] J2ME SDK Mobile
Update #4 20/06/2021 (DDMMYY)

Released a new update adding neww features that'll make development easier

Download

NEEDED CHANGES:
If you were already working on a game and you want to update the template features, you must do these changes:
  • Replace your Update() void function in dedomil.yourgame.Game class. It's probably looking like this:
Code:
public void Update(){
//Code
}

Replace it as:
Code:
public void Update(double delta){
//code
}

Change note:
  • Added delta-time on Update() method, making it easier to sync updates with the FPS (READ NOTE #1)
  • Added a Image loading class
  • Added a Sound engine class (READ NOTE#2)

Next update to do:
  • Add a simple separated documentation, with descriptions about Graphics, Sprite, MMAPI and GameEngine's methods. So featurephones developers won't need to write everything in a notebook or leave the application to search the web all time anymore, with the exception when it's really needed

Notes:
  • Note 1

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;
positionX += 1; //1 pixel per update
g.drawImage(i, positionX, positionY, 0);

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);
You can also round it with Math.ceil() or Math.floor():
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;
positionX += 30*delta; //Notice you don't need to convert it on here anymore because it's now a floating point variable
g.drawImage(i, (int)(positionX), (int)(positionY), 0); //Instead, you're converting it here ;3
This will solve the problem

  • Note 2

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");
music.Loop();

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.

[size=xx-small]Signature[/size]
[URL=https://www.exophase.com/user/JoseskVolpe/][IMG]https://card.exophase.com/2/0/45687.png?1612237163[/IMG][/URL]

[align=justify][size=x-small][b]OwO ¿¿¿What is this??? *wags tail*
Take my beret plz 7w7 ~[/b][/size][/align]
Find all posts by this user
Quote this message in a reply
06-20-2021, 02:19 PM
Post: #18
RE: [APP] J2ME SDK Mobile
Nice bro
Find all posts by this user
Quote this message in a reply
06-26-2021, 07:52 AM
Post: #19
RE: [APP] J2ME SDK Mobile
Now J2ME SDK Mobile does looks cool on Android

[Image: vDJD04F.png]

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

[size=xx-small]Signature[/size]
[URL=https://www.exophase.com/user/JoseskVolpe/][IMG]https://card.exophase.com/2/0/45687.png?1612237163[/IMG][/URL]

[align=justify][size=x-small][b]OwO ¿¿¿What is this??? *wags tail*
Take my beret plz 7w7 ~[/b][/size][/align]
Find all posts by this user
Quote this message in a reply
06-29-2021, 12:18 AM (This post was last modified: 06-29-2021 10:11 AM by JoseskVolpe.)
Post: #20
RE: [APP] J2ME SDK Mobile
Update #5
Download

*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

[size=xx-small]Signature[/size]
[URL=https://www.exophase.com/user/JoseskVolpe/][IMG]https://card.exophase.com/2/0/45687.png?1612237163[/IMG][/URL]

[align=justify][size=x-small][b]OwO ¿¿¿What is this??? *wags tail*
Take my beret plz 7w7 ~[/b][/size][/align]
Find all posts by this user
Quote this message in a reply
06-29-2021, 10:11 AM
Post: #21
RE: [APP] J2ME SDK Mobile
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

[size=xx-small]Signature[/size]
[URL=https://www.exophase.com/user/JoseskVolpe/][IMG]https://card.exophase.com/2/0/45687.png?1612237163[/IMG][/URL]

[align=justify][size=x-small][b]OwO ¿¿¿What is this??? *wags tail*
Take my beret plz 7w7 ~[/b][/size][/align]
Find all posts by this user
Quote this message in a reply
01-17-2024, 05:55 PM
Post: #22
RE: [APP] J2ME SDK Mobile
Please how to set the app
Visit this user's website Find all posts by this user
Quote this message in a reply
08-03-2024, 04:01 AM
Post: #23
RE: [APP] J2ME SDK Mobile
Please can you host the files on your website. I am finding it a bit difficult to access them on this server.
Find all posts by this user
Quote this message in a reply
08-03-2024, 01:56 PM
Post: #24
RE: [APP] J2ME SDK Mobile
@Nrookie, if you could mention all the files you need I can help :-)

[color=green][b]King_Dave[/color][/b]
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)