If this is your first visit, be sure to check out the FAQ by clicking the link above. You have to register before you can post.

If you have recently signed up, please make sure you log in so that your activity is registered. This is required for automatic promotions to work and to ensure your account is not deleted during the registration process.

Goto, Sprites... help! =0

Hello every1!
I'm new to MP and its forum.
I'm just starting writing my first appls with this software.
I have some simply questions:
- Does exist command GOTO in MP? If not, how can I jump forward or backward in my prgm (without using commands repeat-until or forward with procedures)?
- Do exist commands to create sprites?
- Where can I find a complete list of available commands in MP (yes, I read help file in MP)?
Thanx!

Pascal is a very elegant language with much better solutions to all coding problems where a GOTO might have originally been used.

I was actually surprised to learn that the GOTO command even existed for Pascal. I thought it was a BASICism.

This is the most I've written the word GOTO in the last 10 years.

I am curious as to why you don't want to or can't use commands like repeat or while? They should be available in the MIDLet Pascal language. I've not personally used it so I don't know for sure, but I'd be very very surprised if they hadn't included such fundamental features in the language.

Goto, Sprites... help! =0

Procedures and repeat-until command are includeded in MP.
As said I'm new to MP and Pascal itself.
Sure we can do the same without this command, especially if it's so dangerous.
I don't know why some compilers includes Labels + GOTO + more Pascal commands and others don't.
But if MP could do that (without crashing or generating bugs) it would not be such a crime!
For a beginner as I am, It would be interesting to have a complete list of MP commands; somewhere I read the one in MP help file is uncomplete.
P.S. Thank you for your answer

Goto, Sprites... help! =0

Originally Posted by jasonf

I was actually surprised to learn that the GOTO command even existed for Pascal. I thought it was a BASICism.

I think it's more an ASSEMBLYism. It makes a lot of sense in asm, but not in Pascal, neither in Basic that are teacher languages. Ironically C should have a GOTO, because it seems to approach the lowest level of high level languages.

Probably the reason MP doesn't have it, is because the Java virtual machine doesn't allow it :?

...it seems not active anymore...it was a set of libraries to add sprite capabilities for MIDLet Pascal by Piligrim...unfortunately I'm a beginner too and had trouble understanding how to implement.

However, I've used the LoadImage and DrawImage functions that are within MIDlet Pascal anyway to customise my own "sprites" and used maths X,Y based as well on the size of the images to make my own collision detections, not necessarily pixel perfect in some cases but it has been a start to making games...

Goto, Sprites... help! =0

Hi Chobley,
I read in the forum about these add-ons for MB
I retrieved this link:http://piligrim.blog.tut.by/?s=game+support
Hope it's correct. Soon I will make some test.
I arrived to MP very late (and just) 'cause I crashed my old, long lived, basic mobile and I bought my first one with J2me support (SE w810i).
So pascal gurus don't get bored/angry and forget my GOTO question if you find it offensive! also, expect more beginner query.
Mobilebasic costs too much, is too slow, and it doesn't compile but just converts basic language when prgm runs (read on various net ratings). The only thing interesting may be sprite statements implementation, but I don't have experience about it.
Also I found this:http://www.tauschke.com/products/uicreator/index.html
They say "you can use every language which can create Midlet forms (like Java, MidletPascal or MobileBasic)"... :roll: It's free for personal use.
I read your sprite "simulation" using MB custom statements. Very interesting for me. How do you delete the previous sprite (image) position before printing the next one? Or this is not a problem using MB graphic statements?

Goto, Sprites... help! =0

I will check later when I have more time! To be honest if I did; I did not look at it very long as had the PASCAL coding bug at the time - but thanks for this...

and quote;

" read your sprite "simulation" using MB custom statements. Very interesting for me. How do you delete the previous sprite (image) position before printing the next one? Or this is not a problem using MB graphic statements?"

Answer: Basically Refresh the screen; i.e in your game play repaint the back ground, and your "spites"...i.e;