PDA

View Full Version : MIDlet Pascal



EugenioEnko
25-01-2006, 12:48 AM
http://www.midletpascal.com/
With this compiler you can make simple games for mobile phones without using Java lenguage.


FEATURES:
# generates low-level, small and fast
Java?¢,¬¢ bytecode
# full Pascal specification support
# parts of code can be written directly in Java
# SMS messaging
# HTTP connectivity
# user-interface (forms) support
# multimedia support
# user-friendly IDE
# FREE for personal use

LP
25-01-2006, 01:27 AM
I actually tried it a year ago, but for some reason the compiler crashed on my machine every time I tried to compile any code. :(

FNX
25-01-2006, 01:42 AM
Wow, looks promising! Dowloading right now!!!

Lifepower:
it seems they have released a 2.02 version on 01/14/2006 so maybe
your version was buggy/unstable/alpha or something.

I was dreaming a thing like that so I'm going to try it right now! Even if
it's 2.41 am :P

Night is young!

[EDIT 2.55 am]
Downloaded, installed, created demo project, compiled and it works!
Now i'm downloading the Java Moblile emulator to test!

LP
25-01-2006, 02:08 AM
it seems they have released a 2.02 version on 01/14/2006 so maybe your version was buggy/unstable/alpha or something.
Perhaps. The idea of generating Java bytecode out of Pascal is very interesting. Too bad it doesn't support classes, I hope it's on TO-DO list or something.

FNX
25-01-2006, 02:30 AM
bad it doesn't support classes, I hope it's on TO-DO list or something.

Well reading somethin quickly on the forums it seems it can support
external custom classes (written in java i suppose). I will get more into
this and post if I'll find a clear answer on the forum or by my own tests :)

EugenioEnko
25-01-2006, 02:32 AM
It works well in my PC. I tried ir a bit and could make an simple puzzle game for my Motorola C650.

To develop games, perhaps you will need a Mobile Emulator. The M2EE Java package have a good one.

Here a "Hello World" programm

program HelloWorld;
begin
drawText('Hello world!', 0, 0); //write text in the buffer
repaint; // blit the buffer to screen
delay(2000); //wait to end.
end.
[/code]

EugenioEnko
25-01-2006, 02:39 AM
bad it doesn't support classes, I hope it's on TO-DO list or something.

Well reading somethin quickly on the forums it seems it can support
external custom classes (written in java i suppose). I will get more into
this and post if I'll find a clear answer on the forum or by my own tests :)

It doesn't support "case of" and "enumarated types" too.

savage
25-01-2006, 08:07 AM
great bit of news, I'll post a news item about it later today.

JernejL
25-01-2006, 09:47 PM
just saw it under links menu, checking it out right now, i hope it is compatible with nokia N90..

FNX
03-02-2006, 01:42 PM
Hello,
did you see this??

http://piligrim.at.tut.by/java/

Gaming API Support 1.1 for MP! It seems great! I'll play with it ASAP!

Also, why not put a Midlet Pascal section in "Compilers and IDE" board?
In a few weeks from MP link to appear we already have 5-6 people
working on it :) Also MP forum is not so much alive as i hoped so... :roll:

savage
03-02-2006, 03:22 PM
I have already created a forum for MIDletPascal in Compilers and IDE via the Administration Panel, but it appears that WILL needs to do some kind of incantation and or dance before it will appear for all to see. So it does exist ( you'll need to trust me ), but only I can see it until WILL gets back, which I think is this week-end.

On another note, I'm finding the DrawText function unreliable as you can never guarantee that the default font size it chooses is small enough of big enough to work on all mobiles. To avoid this I'd like to use bitmap fonts where each letter is either 8x8 or 12x12. At least then I know how to space all my text.
I've managed to write a function to display numbers ( see below ), but could not find an easy way via the MIDP API to get the alphabet happening. I've probably overlooked something. Any ideas?

My number sprite routine is...
procedure DrawSpriteText( Text: string; x, y: integer );
begin
for iCounterX := 0 to Length( Text ) - 1 do
begin
DrawImage( NumberSprites[ StringToInteger( GetChar( Text, iCounterX ) ) ], x, y );
x := x + 8;
end;
end;

iCounter is a global counter variable used in all my loops.
and since this font is 8x8 that is why x := x + 8; is used to draw the next number in the string.

savage
03-02-2006, 03:25 PM
Perhaps. The idea of generating Java bytecode out of Pascal is very interesting. Too bad it doesn't support classes, I hope it's on TO-DO list or something.

I heard that when Java first came out, apparently Borland had a Pascal to Java generator in house, but they did not think it would be commercially viable, so it was shelved.

LP
03-02-2006, 04:07 PM
I heard that when Java first came out, apparently Borland had a Pascal to Java generator in house, but they did not think it would be commercially viable, so it was shelved.
If that's true, it's a bad move for Borland. They never knew what they are missing. :?

savage
03-02-2006, 04:12 PM
I heard that when Java first came out, apparently Borland had a Pascal to Java generator in house, but they did not think it would be commercially viable, so it was shelved.
If that's true, it's a bad move for Borland. They never knew what they are missing. :?

Not sure if it's true either, it was a rumour going around way back in 1995/6.

FNX
03-02-2006, 04:25 PM
I've managed to write a function to display numbers ( see below ), but could not find an easy way via the MIDP API to get the alphabet happening. I've probably overlooked something. Any ideas?


I think you don't really need my (poor) programming skills but you
might find the solution doing somethin like DXFont from DelphiX.

function "ImageFromImage" from MP lib should solve your problem :)

I mean, declare an array like alphabet_array['a', 'b',....'0','1',....'?','!'...]
then you have an alphabet image that have letters and numbers and
symbols in the same order as your array.

Once you get the letter pos in the array you call a ImageFromImage and
get the 8x8 tile from the alphabet image..

That should work i think.. but i may be wrong :oops:

savage
03-02-2006, 04:49 PM
TIP : Do NOT use ImageFromImage if using MIDP 1.0. It loses transparency information. Apparently it works in MIDP 2.0.
It is also very s l o o o o w, at least it was for me. In the end I ended up spending one lunch-time cutting each bitmap out of composite so that I could make use of the transparency and stored everything into image arrays. This worked well and everythin speeded up quite nicely.

I think I'll use the alphabet array and do look-ups. I swear I remember less each year :(.

FNX
03-02-2006, 05:23 PM
Well, actually i never used such function because i always prefer to have
different images for everything, even if i have 20 resouce files or more..

I was reading the help and i saw that function that i thought would have
done what you were aiming to do. Anyway thanx for the tip, i'll remember
it for future stuff :)

tux
03-02-2006, 08:40 PM
does anyone have any idea how to download the games with a nokia 2650? i tried one but it just showed a page of text :(

savage
09-02-2006, 01:32 PM
WILL has activated the MIDletPascal forum over @ http://www.pascalgamedevelopment.com/viewforum.php?f=65

savage
16-04-2006, 02:39 PM
Hi Tux, did you manage to download any MP games? Have you worked out how to visit webpages?
It looks like the Nokia 2650 only supports MIDP 1.0 API, so I don't think any MIDP 2.0 games will work on it, unless the phone is upgradeable.

Chobley
18-11-2007, 11:09 AM
Many thanks for this forum on your site. I'm beginning to learn Pascal with a move to mobile application development, and have picked up some hints from the posts on your site.

I've tested both Blitzbomber and Stopwatch on my phone so you now know that they also work on Sony Ericsson P990i...

I don't know if anyone has dabbled recently with MIDlet Pascal...?

I've noticed now in a few virus scanners that the "Psuedo Trojan" that seems to be attached as a stigma to MIDlet Pascal seems to have gone?

I.e the Midlets you create, now scan clean...

savage
18-11-2007, 01:10 PM
Hi Chobley, welcome to the forums.
I have not looked at MidletPascal for about 1 year, because the compiler seems to have been abandoned. It's great that the virus scanners no longer identify them as viruses.

Are you working on anything interesting?

Chobley
18-11-2007, 02:36 PM
Thanks for your interest Savage...

If MIDlet Pascal has been abandoned I don't know why...there website is not active and it's such a nice little product to use. Guess like loads of things out there on the web that is a niche product becomes either hard to find or not in great demand...

I'm from a BASIC background and have used Procedure based languages in the past...I'm returning to programming after about 14 years abscence and that was on only on an amateur basis at the time. How things have changed, OOP for instance...and Windows...! OK so I'm familiar a little bit with Windows again and how things work :-)

Project wise - just done loads of little things just to test how things work on mobile phones...I have loads of ideas for a big game but they are a long way off whilst I'm still - if not, forever learning!!