Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: Goto, Sprites... help! =0

  1. #1

    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)?

  2. #2

    Goto, Sprites... help! =0

    GOTO was probably not included in this version of Pascal as it's generally seen as "A Bad Thing".

    Check the Delphi Basics definition of GOTO and you'll see what I mean.

    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. is a very good site for a Pascal language reference. (although it does focus on Delphi, it's just the Pascal language with a few extras)

    Wikipedia has a page for MIDLet Pascal.

    P.S. Welcome to the forum

  3. #3

    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

  4. #4

    Goto, Sprites... help! =0

    Do someone have experience of using sprites in MP (also using API gaming support)?

  5. #5

    Goto, Sprites... help! =0

    Quote 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 :?

  6. #6

    Goto, Sprites... help! =0

    Ah! I wondered if I was the only person left using MIDlet now at least I know there are at least 2 tumbleweeds in this forum...

    I guess you have looked around this forum and have seen this link; seems not active 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...
    Determined to crack this programming lark...

  7. #7

    Goto, Sprites... help! =0

    Hi Chobley,
    I read in the forum about these add-ons for MB
    I retrieved this link:
    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:
    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?

  8. #8

    Goto, Sprites... help! =0

    Thanks for this updated link;

    I should give it another go...

    I THINK I may have used this creator;

    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;

    proc RefreshScreen;

    As far as I know there is no UnloadImage(); type command...

    P.S. yes...the GOTO and labels: command is sorely missed ! But using logic...i.e boolean conditions you should be able to over come this in your games...
    Determined to crack this programming lark...

  9. #9

    Goto, Sprites... help! =0

    Go..TOmb We'll try to survive :thumbup:
    Thanx again, Chobley
    Just a doubt: using Repaint after every background re-printing command causes a flashing animation?

  10. #10

    Goto, Sprites... help! =0

    I know what you mean, that's what I thought...(being from a BASIC background in the days of home sprites)

    Just make sure you have got everything on screen you wish to show whilst calling Repaint;

    When drawing an image or in fact, any other drawing command; it writes stuff to a "buffer" when you call 'Repaint' it appears instantly and flicker free...

    Use Repaint when you need it as it is apparently slow, however writing to the "buffer" is not.
    Determined to crack this programming lark...

Page 1 of 3 123 LastLast


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Comodo SSL