GP32 A New Flexible Gp32 Coding Language


Kallipso

Still Fresh
Joined
May 13, 2004
Messages
5
I have submit this again because of the undescriptive name :), please delete the other :)

Hello, I have not worked for the UK before, but I have been coding for a long time.

I am currently in the process of developing a scripting language for developing games, its very flexible and I would like to show you a sample:

!!Title:Demo Game
!!Version:1.4
[~Start the main game
@event(start)
[~Set the resolution(640x480)
@event(res:640:480)
[~Load the tilesets and give them ID's
@event(loadtiles:base.ets:#1:sma)
@event(loadtiles:base.ets:#2:med)
@event(loadtiles:base.ets:#2:lar)
[~Display the star graphic in random locations
GFX(Display:sma:02:rand:rand)
[~Setup the players ship, begin the ships code
//Object:Ship
//Onetime
GFX(Display:lar:01:320:240)
\\
//Loop
@event(onkey:up) :: GFX(Display:lar:01:!:+2)
@event(onkey:down) :: GFX(Display:lar:01:!:-2)
\\
\\



Ok I will now explain what you have seen (it was a VERY simple code)

!!Title:Demo Game

Defines game details

[~ makes what you write a comment

@event marks the start of a code event
@event(start) starts the main game

@event(loadtiles:base.ets:#1:sma)

This loads graphics, here is how it works:

@event(loadtiles:FILENAME:SIZEGROUP:ID)

@event(res:640:480)

This sets the resolution, it is self-explanatory



//Object:Ship
//Onetime
GFX(Display:lar:01:320:240)
\\
//Loop
@event(onkey:up) :: GFX(Display:lar:01:!:+2)
@event(onkey:down) :: GFX(Display:lar:01:!:-2)
\\
\\

This created an object called 'Ship'

//Onetime
GFX(Display:lar:01:320:240)
\\

This happens only when the item is first created

//Loop
@event(onkey:up) :: GFX(Display:lar:01:!:+2)
@event(onkey:down) :: GFX(Display:lar:01:!:-2)
\\

This goes on throughout the objects life


I will need beta testers for when I release the first version of this gp32 game maker , it is win32 edit and gp32 play :)
 
I will soon put up some more commands for you to see, if you are intrested in contributing or testing please PM me and reply with comments on what you think of this
 
???
ur sample doenst explain a bit on your "scripting language", neither yours comments...
so what's this???
show us something working... how are u gonna implement this? (i cant believe your sample here make anything... sorry show me i'm wrong :ph34r: )
 
loki666 posted on May 13 2004 at 11:49 PM said:
???
ur sample doenst explain a bit on your "scripting language", neither yours comments...
so what's this???
show us something working... how are u gonna implement this? (i cant believe your sample here make anything... sorry show me i'm wrong :ph34r: )


Hmmm. Sentiment appreciated, but why not implement this scripting language in the language which 99% of the industry uses, namely C

e.g. why not make it a C library?

I wish interpreted languages would just DIE!!!
 
Last edited by a moderator:
There already is a language that does exactly what you want your language to do, make the user type no more than is ultimately neccesary. It's called Fenix, and in it's language your program would look like this:

Code:
Program Demo_Game;

//Declare global variables
Global
    sma,med,lar;

begin // start main
//Load Tiles:
sma = load_fpg("base.ets");
med = load_fpg("base2.ets");
lar = load_fpg("base3.ets");

//Set video mode
set_mode(m640x480);

//Start an instance of the Ship process
Ship();

end//end main

//Object:
Process Ship()

begin

loop

  //Graphic of this object(process)
  file = med;
  graph = 2;

  //Move the processes coordinates x/y on the screen on keypresses:
  if(key(_up))
    y += 2;
  end
  if(key(_down))
    y -=2;
  end

  //Render a frame(synchronization moment for all processes running
  frame;

end // Loop end

end//end of the process

I prefer this over your code, as it is much better readable due to less symbols. Your game certainly has potential, but it looks less flexible and especially readable than Fenix(homepage is Here).

Good luck!
 
They are unflexible when you go outside the area it is made for, as long as you bear the limits of the language in mind you can do wonderfull things with it. The pro is that you write small codes in your program, the con is that unoptimized is an understatement for the final compiled result. Doesn't mean you can't have a lot of fun with it when you stay inside the borders. And those borders do not even have to limit you that much, since in Fenix for example you can import your freshly made DLL's. I'm currently working on (this project here), and believe me, in the time that is in there you couldn't make a quarter of it in C/C++.
 
This language has been designed to be extremely powerful and flexible to create almost anything you want, you can export your applications directly to .fxe, the language you speak of seems like DIV, I know for a fact my language is far superior to this
 
Hi! Is this language compiled? or is it "mated" with the runtime code?
If it's compiled it could be very cool!
 
i think its cool to have a alternative language! especialy a "scripting language". But wouldnt it be easier to use if the syntax was more like Java or something? (like fenix) Just a thought. im not a really experienced programmer, but to me it would be easier to use my java/actionscript skills that way. Either way, its great to see something like this happening
 
Kallipso posted on May 14 2004 at 03:23 PM said:
This language has been designed to be extremely powerful and flexible to create almost anything you want, you can export your applications directly to .fxe, the language you speak of seems like DIV, I know for a fact my language is far superior to this

Then what exactly are the pro's compared to DIV/Fenix? Judging from what you showed the language 'layout' seems pretty confusing, having commands split up in groups(GFX, Event), all of which have subgroups(i.e. Display), and the parameters are always the same(in amount). Why for example isn't displaying a graphic an event too? Would be easier to have just one command instead of two, it's like having to constantly specify in which header a command is in C. I'm not all negative about it, absolutely not, this could be very good, but criticism only makes things better :)
 
Last edited by a moderator:
it's not realated to the subject but...
I hope someone makes a chatboard supported BASIC (like ZX basic) someday. To code on Gp32 ofcourse.. You can write simple programs in train/bus that way :) I don't like playing games on gp32 :)
 
Back
Top