If have login problems remove cookies and clear browser cache.



Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GAMELOFT VS JAVA GAMES
04-30-2021, 10:17 PM (This post was last modified: 04-30-2021 10:23 PM by JoseskVolpe.)
Post: #41
RE: GAMELOFT VS JAVA GAMES
(04-30-2021 07:23 PM)star cash Wrote:  You mean i can use my java phone to create java game??????

You can with this app. But i don't recommend it by experience. It takes so long and is hard to compile, have a big issue setuping libraries, is full of errors, and you would take hours or days doing stuff you could do in minutes from a PC. I don't advise its use for long projects, only for very small projects.
That's a good idea for a developers event tho: Create a simple J2ME game using only J2ME tools like PaintCAD, Opera Mini and J2ME SDK Mobile


J2ME, as a old technology, has a advantage of being possible to develop for in old and cheap PCs. Basically with a Windows XP, with a old Pentium Duo, on a CRT screen, on a old Eclipse version, and Java 1.3, you can create games and apps for it much easier and faster than on a Java phone.

[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
04-30-2021, 11:47 PM (This post was last modified: 04-30-2021 11:58 PM by JoseskVolpe.)
Post: #42
RE: GAMELOFT VS JAVA GAMES
(04-30-2021 11:44 PM)star cash Wrote:  Drop link for the app use for creating java game with java phone

http://ultraplicativos.blogspot.com/2013...le_30.html

Better mirror:
.jar  J2ME_SDK_Mobile.jar (Size: 618.6 KB / Downloads: 278)

[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
05-01-2021, 12:57 AM
Post: #43
RE: GAMELOFT VS JAVA GAMES
(04-30-2021 11:53 PM)star cash Wrote:  
(04-30-2021 11:47 PM)JoseskVolpe Wrote:  
(04-30-2021 11:44 PM)star cash Wrote:  Drop link for the app use for creating java game with java phone

http://ultraplicativos.blogspot.com/2013...le_30.html

Where should i click to start creating game

First, don't forgot to set file write/read permissions to "Allowed" or "Ask one time"

Go to "New Project...", specify your Project's name and its Folder Location, and click create. This will create a new project. > Click "Create" Soft Button and Create.
Now you should create your first package. Go to Source Packages > Left/Right Soft Key (it depends on your phone) > New > Java Package > Create > Specify your package name with dots and everything lower case (for example: "game.starcash") > right/left soft and "Finish"

Open your new package > left/right shoft > New > Java MIDlet > Name it anything > then create

A code will apear:

Code:
package game.starcash;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

public class Game extends MIDlet{

public void startApp(){
//When player opens or resume your game
}

public void pauseApp(){
//When player minimizes your game, or receives a call, or system pauses it
}

protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
//When player closes your game
}

}

Now you need to create a displayable and invoke it, you can create a new Java file for it, but you can make it inside the same file in the same class

Add the following line:

Code:
import javax.microedition.lcdui.game.GameCanvas;
class GameEngine extends GameCanvas{
protected GameEngine(boolean suppressKeyEvents) {
super(suppressKeyEvents);
//when invoked by the Game class
}

public void paint(Graphics g){
//Use this to render your game
//You can also use this to update each frame, although it will use the same thread
repaint();
}

public void Update(){
//Use this to update each frawme
}
}

Your code will look like this:

Code:
package game.starcash;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

public class Game extends MIDlet{

public void startApp(){
//When player opens or resume your game
}

public void pauseApp(){
//When player minimizes your game, or receives a call, or system pauses it
}

protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
//When player closes your game
}

class GameEngine extends GameCanvas{
protected GameEngine(boolean suppressKeyEvents) {
super(suppressKeyEvents);
//when invoked by the Game class
}

public void paint(Graphics g){
//Use this to render your game
//You can also use this to update each frame, although it will use the same thread
repaint();
}

public void Update(){
//Use this to update each frame
}
}

}

Now you invoke wit into your startApp() class and begin it
Don't forget startApp() is also used when you're resuming it, so you need to store in a variable your app was already started
Code:
boolean gameStarted=false; //False for the first startApp()
public void startApp(){
if(!gameStarted){
//First start()
}
gameStarted=true;
}

And invoke your GameEngine

Code:
GameEngine engine;

public void startApp(){
//When player opens or resume your game
    if(!gameStarted){
        //First start()
        engine = new GameEngine(false);
        }
        gameStarted=true;
        
        
        Display.getDisplay(this).setCurrent(engine);
}

Your code will look like this:

Code:
package game.starcash;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.lcdui.game.GameCanvas;

public class Game extends MIDlet{

boolean gameStarted=false; //False for the first startApp()
GameEngine engine;
    
public void startApp(){
//When player opens or resume your game
    if(!gameStarted){
        //First start()
        engine = new GameEngine(false);
        }
        gameStarted=true;
        
        
        Display.getDisplay(this).setCurrent(engine);
}

public void pauseApp(){
//When player minimizes your game, or receives a call, or system pauses it
}

protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
//When player closes your game
}

class GameEngine extends GameCanvas{
protected GameEngine(boolean suppressKeyEvents) {
    super(suppressKeyEvents);
//when invoked by the Game class
}

public void paint(Graphics g){
//Use this to render your game
//You can also use this to update each frame, although it will use the same thread
repaint();
}

public void Update(){
//Use this to update each frawme
}
}

}

You are almost there, now you need to create a new thread, or in a easier way for this example, create a loop for the Update() method into the GameEngine, running separated from the paint() Thread:

Code:
while(true) {
            engine.Update();
        }

You can also use Thread.sleep() for limiting the FPS, but Java phones are very slow in performance so you won't need it at all, only for emulators, wich has FPS Limit in their settings

Now this is your first Game Engine code:W

Code:
package game.starcash;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.lcdui.game.GameCanvas;

public class Game extends MIDlet{

boolean gameStarted=false; //False for the first startApp()
GameEngine engine;
    
public void startApp(){
//When player opens or resume your game
    if(!gameStarted){
        //First start()
        engine = new GameEngine(false);
        }
        gameStarted=true;
        
        
        Display.getDisplay(this).setCurrent(engine);
        
        while(true) {
            engine.Update();
        }
}

public void pauseApp(){
//When player minimizes your game, or receives a call, or system pauses it
}

protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
//When player closes your game
}

class GameEngine extends GameCanvas{
protected GameEngine(boolean suppressKeyEvents) {
    super(suppressKeyEvents);
//when invoked by the Game class
}

public void paint(Graphics g){
//Use this to render your game
//You can also use this to update each frame, although it will use the same thread
repaint();
}

public void Update(){
//Use this to update each frawme
}
}

}

Follow the comment instructions, and good work :3

You will see there'll be nothing dispaying on your game, or it'll be stuck in the loading time. It's because there's nothing for it to paint on the screen. Play with the g variable (Graphics class) on the paint() method and have fun

[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
05-01-2021, 01:01 AM (This post was last modified: 05-01-2021 01:03 AM by Abidemhie.)
Post: #44
RE: GAMELOFT VS JAVA GAMES
Someone upload somewhere else

The sdk

how i want to net my enemies here in this forum.....***** the haters
Visit this user's website Find all posts by this user
Quote this message in a reply
05-01-2021, 01:07 AM
Post: #45
RE: GAMELOFT VS JAVA GAMES
The app that he gave link for...
Someone should upload directly or give another link

how i want to net my enemies here in this forum.....***** the haters
Visit this user's website Find all posts by this user
Quote this message in a reply
05-01-2021, 01:13 AM
Post: #46
RE: GAMELOFT VS JAVA GAMES
I cant download...
Language barriers and stuffs

how i want to net my enemies here in this forum.....***** the haters
Visit this user's website Find all posts by this user
Quote this message in a reply
05-01-2021, 01:14 AM
Post: #47
RE: GAMELOFT VS JAVA GAMES
(05-01-2021 01:01 AM)Abidemhie Wrote:  Someone upload somewhere else

The sdk

http://dedomil.net/forum/showthread.php?tid=5579

[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
05-01-2021, 01:49 AM
Post: #48
RE: GAMELOFT VS JAVA GAMES
Thanks bro.

how i want to net my enemies here in this forum.....***** the haters
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: 6 Guest(s)