https://wiki.bennugd.org/api.php?action=feedcontributions&user=Square&feedformat=atomBennu Wiki - User contributions [en]2024-03-28T17:40:40ZUser contributionsMediaWiki 1.36.2https://wiki.bennugd.org/index.php?title=General&diff=14719General2013-12-26T18:07:23Z<p>Square: /* Starting Out */</p>
<hr />
<div>== Guide: Porting to your chosen system ==<br />
<br />
This is a general guide for getting your Bennu game onto your chosen system.<br />
<br />
''' ''If you have missed the front page of this Wiki please see'' ''[http://wiki.bennugd.org/index.php?title=Bennu_Wiki Bennu_Wiki] or click on the BennuWiki logo on the top left of this page.'' '''<br />
<br />
At the time of writing this stable ports and porting processes exist for these OS or platforms:<br />
<br />
:Windows<br />
:Linux<br />
:Caanoo (a later GP2X type handheld)<br />
:GP2X Wiz<br />
:Dingux (Dingoo OS for handheld)<br />
<br />
The rest are generally unsupported by BennuGD community but still quite possible:<br />
<br />
:Playstation 2<br />
:HTML5/Chrome Native Client<br />
:Dreamcast<br />
:Haiku OS<br />
:FreeBSD<br />
:MacOS X (Intel 32 bits)<br />
:BennuGD PPA for Ubuntu 32 bits<br />
:Nintendo Wii<br />
:PSP<br />
:Pandora<br />
:Xbox<br />
:Motorola linux phone (RU)<br />
<br />
Another exciting development is - BennuGD is being ported to:<br />
<br />
:Android<br />
<br />
Expect this to be added to the "unsupported" section list very soon.<br />
<br />
'''Essential: Check out [http://bennugd.org/node/2 Downloads] page for BennuGD.'''<br />
<br />
'''You can read about current developments on any ports at bennugd.org main page in the frontpage [http://bennugd.org News] feed.'''<br />
<br />
== Starting Out ==<br />
<br />
If you have some experience with BennuGD you will have used bgdc (the compiler) and bgdi (the interpreter).<br />
<br />
Once you have downloaded the Bennu port for your chosen target platform you will find it includes bgdc.xxx and bgdi.xxx. The compiler is the part that talks to the the machine, making your bennu code into a .dcb that is usable when executed with the interpreter. Also depending on which port, you will also find the set of standard libraries for the specific machine, or not. With bennu-monolithic ports you may find the libraries are not present as seperate files.<br />
<br />
'' '''bennugd-monolithic''' - Many of recent ports are part of the bennugd-monolithic project, which enables certain machines to run Bennu successfully, including '''Wii, PSP iOS and Android.''' See josebita's [http://code.google.com/p/bennugd-monolithic/ bennugd-monotlithic] Google Code pages for information about this.''<br />
<br />
So if you haven't done so, see the [http://bennugd.org/node/2 Downloads] page of bennugd.org and retrieve the relevant port for your system - (checking that you are downloading the latest version!)<br />
<br />
== Notes on Setting Up ==<br />
<br />
Porting is quite a task sometimes. You may find you need to edit your source code, depending on requirements of the target system and the current state of the port you are using. This can be related to sound or display requirements for example. Sometimes you can find your game may not run fast enough and needs optimisation - the target system can be slower than the computer you originally wrote the game for. However this should be only attempted after testing your game! So read on!<br />
<br />
Also some preparation work is desired in your game source for the peripherals (controls) of the console or platform, so a good idea is to ascertain what controls you will be using early on. There is a section on this next in the guide!<br />
<br />
The other part of porting is getting '''the machine you want to run your Bennu game on to actually compile the game itself.''' This can be an easy process or rather tough. But you will find certain tools written by developers who have paved the way before you will make this infinitely easier.<br />
<br />
Most of all DON'T GIVE UP. You may find once your game compiles successfully with bgdc and you have a .dcb ready, there may be runtime errors when running and playing your game (with bgdi).<br />
<br />
Once you have filesystem specifics set up for your chosen platform, the thing to remember is the standard commandline process which must be performed on the machine you intend to run your game on:<br />
<br />
<code>bgdc.xxx [params] bennugame.prg</code><br />
<br />
Which naturaly takes your code and builds a dcb of your program.<br />
<br />
<code>bgdi.xxx bennugame.dcb</code><br />
<br />
This will run your program.<br />
<br />
Note: Most testing scenarios will not require you to use parameters in the compilation of your game/program.<br />
<br />
However, one common parameter used is -a which automatically packages your commonly used resources - for example FPGs, WAVs into the dcb. This is optional for you of course, but can be very beneficial. When distributing your game or homebrew, people will not see your resource files and can help protect them from further use.<br />
<br />
For further information on compile parameters you can ask bgdc itself:<br />
<br />
<code>bgdc.xxx -help</code><br />
<br />
Which prints a list of parameters and a description of their uses. '''Disclaimer: ''Be careful with these! They can sometimes crash your console or any equipment used!'' '''<br />
<br />
For any platform specific questions I will direct you to the bennugd.org community boards for each supported platform. [http://forum.bennugd.org/index.php?board=80.0 Here] you can post questions or search for answers. (This is for more advanced or searching questions about each particular console/machine).</div>Squarehttps://wiki.bennugd.org/index.php?title=Bennu_Wiki&diff=14438Bennu Wiki2013-12-24T17:45:40Z<p>Square: </p>
<hr />
<div>__NOTOC__<br />
:<big>'''... a wiki for Bennu Game Development'''</big><br />
[[Bennu ]] is a language aimed at making games. It provides countless great features aiding the coder with developing, without limiting the possibilities. See the ''Getting Started'' section for a few introductory pages!<br />
----<br />
<br />
<br />
{{Box-header<br />
| margin = 10px 0px 10px 0px<br />
| align = left<br />
| display = block<br />
| position = relative<br />
| width=49%<br />
| float = left<br />
| name = Getting started<br />
}}<br />
<font size="2"><br />
* '''[[Bennu|What is Bennu]]?'''<br />
* '''[[Setting_up_Bennu|Setting up Bennu]]'''<br />
* '''[[Beginner's tutorial]]!'''<br />
</font><br />
{{Box-footer}}<br />
{{Box-header<br />
| margin = 10px 0px 10px 0px<br />
| align = left<br />
| display = block<br />
| position = relative<br />
| width=49%<br />
| float = right<br />
| name = Downloads<br />
}}<br />
<font size="2">'''<br />
* '''[[Latest Bennu version]]'''<br />
* '''[http://bennugd.svn.sourceforge.net/viewvc/bennugd/ SVN repository]'''<br />
* '''[http://forum.bennugd.org/index.php?topic=270.0 Changelog]'''<br />
</font><br />
{{Box-footer}}<br />
{{Box-header<br />
| margin = 10px 0px 10px 0px<br />
| align = left<br />
| display = block<br />
| position = relative<br />
| width=49%<br />
| float = left<br />
| name = Documentation<br />
}}<br />
<font size="2"><br />
* '''[[Language|Bennu language articles]]'''<br />
* '''[[Modules|Module index]]'''<br />
* '''[[Tutorials|Tutorials]]'''<br />
* '''[[DLLs|3rd party libraries]]'''<br />
* '''[[General|Porting to another system]]'''<br />
</font><br />
{{Box-footer}}<br />
{{Box-header<br />
| margin = 10px 0px 10px 0px<br />
| align = left<br />
| display = block<br />
| position = relative<br />
| width=49%<br />
| float = right<br />
| name = External links<br />
}}<br />
<font size="2"><br />
* '''[http://bennugd.org Bennu Site]'''<br />
* '''[http://forum.bennugd.org Bennu Community Forum]'''<br />
* '''[http://www.booleansoup.com Booleansoup]'''<br />
* '''[http://fenixdocs.com FenixWiki]'''<br />
* '''[http://http://www.pixjuegos.com/descargas/CursoFenix2.pdf Fenix Manual by Óscar Torrente Artero (Spanish)]'''<br />
</font><br />
{{Box-footer}}<br />
{{Box-header<br />
| margin = 10px 0px 10px 0px<br />
| align = left<br />
| display = block<br />
| position = relative<br />
| width=49%<br />
| float = left<br />
| name = Latest Functions, Variables, Constants<br />
}}<br />
{{{!}} cellpadding="0px" cellspacing="1px" style="width:100%; background-color:transparent; font-size: 10pt;"<br />
{{#DPL:<br />
| addeditdate = true<br />
| userdateformat = d F Y<br />
| category = Functions{{!}}Variables{{!}}Constants<br />
| ordermethod = firstedit<br />
| order = descending<br />
| count = 5<br />
| listseparators=,\n{{!}} style="background-color:#FFF9F2;" {{!}} [[%PAGE%|'''%TITLE%''']]\n{{!}} style="text-align:right; background-color:#FFF9F2;" {{!}} %DATE% \n{{!}}-,,\n<br />
}}<br />
{{!}}}<br />
{{Box-footer}}<br />
{{Box-header<br />
| margin = 10px 0px 10px 0px<br />
| align = left<br />
| display = block<br />
| position = relative<br />
| width=49%<br />
| float = right<br />
| name = Latest Tutorials<br />
}}<br />
{{{!}} cellpadding="0px" cellspacing="1px" style="width:100%; background-color:transparent; font-size: 10pt;" {{#DPL:<br />
| addeditdate = true<br />
| userdateformat = d F Y<br />
| category = Tutorials<br />
| ordermethod = firstedit<br />
| order = descending<br />
| count = 5<br />
| listseparators=,\n{{!}} style="background-color:#FFF9F2;" {{!}} [[%PAGE%|'''%TITLE%''']]\n{{!}} style="text-align:right; background-color:#FFF9F2;" {{!}} %DATE% \n{{!}}-,,\n<br />
}}<br />
{{!}}}<br />
{{Box-footer}}</div>Squarehttps://wiki.bennugd.org/index.php?title=Special:Badtitle/NS115:Squarepush%27s_side-scrolling_Shoot%27em_Up_Tutorial&diff=9336Special:Badtitle/NS115:Squarepush's side-scrolling Shoot'em Up Tutorial2012-02-21T18:02:07Z<p>Square: </p>
<hr />
<div>need to update references to other sites. i could not download fpg and prg files<br />
<br />
RE: need to update references to other sites. i could not download fpg and prg files<br />
<br />
There is now an fpg uploaded to the wiki and linked in. Apologies.<br />
<br />
Use the wiki for the source code (.prg)</div>Squarehttps://wiki.bennugd.org/index.php?title=Special:Badtitle/NS114:Squarepush%27s_side-scrolling_Shoot%27em_Up_Tutorial&diff=9335Special:Badtitle/NS114:Squarepush's side-scrolling Shoot'em Up Tutorial2012-02-21T17:59:40Z<p>Square: </p>
<hr />
<div>[[Category:general]]<br />
[[Category:tutorials]]<br />
<br />
Starting to code your first game is always a challenge but it is also the most enjoyable part. In this tutorial we will create a simple shoot'em up, to learn more advanced things in [[Bennu]].<br />
<br />
If you are not an experienced programmer it could be of help if you avoid this tutorial for now, especially if you are not familiar with programming. If so have a look at the [[Tutorial:Beginner's_tutorial|Beginner's Tutorial]]. Otherwise, read on!<br />
<br />
If you are an experienced programmer and have yet to set up Bennu, it is recommended to first check the tutorials on how [[setting up Bennu|to set up Bennu]].<br />
<br />
Even if you know other programming languages, you may think you don't understand much of Bennu now. However, the concepts will become clearer after this tutorial.<br />
<br />
<br />
<br />
==Outlining the game==<br />
<br />
We are going to write a very basic side scrolling shoot'em up in 2d.<br />
<br />
The game resolution is to be 320x240 in 16-bit colour.<br />
<br />
The game is set across 2 levels, scrolling right. The background will scroll horizontaly, to the left, to show your ship advancing through the level. In fact this game is going to be rather similar to R-Type the arcade game - just quite simplified.<br />
<br />
You are effectively flying through a organic alien ship of some monstrous proportion, and the level is quite tunnel-like.<br />
<br />
<br />
'''Basic Game rules:'''<br />
<br />
There there are advancing waves of alien ships that fire bullets:<br />
<br />
* If you are hit by a bullet you lose some ship armour (health).<br />
* If you collide with a ship you lose all your health instantly. This means, you lose 1 ship and in losing a ship you are returned to the beginning of the level.<br />
<br />
<br />
But at the end of the level, for excitement value and playability we have a large alien ship, that is the end of level guardian!<br />
<br />
<br />
<br />
'''Summary of the Game:'''<br />
<br />
* We are programming a very basic side scrolling shoot'em up in 2d<br />
* The screen resolution is to be 320x240, with 16-bit colour depth.<br />
* The object of the game is to shoot the advancing waves of ships until they explode.<br />
* You must survive the onslaught of ships which fire bullets. Both ships and bullets can eventually destroy your ship.<br />
* After so many waves of enemy ships, you reach a large guardian (or boss) alien ship.<br />
* You must survive the weapons of the end-of-level guardian and successfully destroy it.<br />
* In doing this you complete the level!<br />
<br />
==Getting started - Setting up the screen==<br />
<br />
First of all we need to set up the screen. Firstly, the game as stated before is to be 320x240 resolution. The frame rate is to be 60 frames per second.<br />
<br />
So we start with this piece of code:<br />
<br />
<pre><br />
// Shoot'em up Tutorial Game<br />
//<br />
// A side scrolling shooter for Bennu Wiki - written by Squarepush<br />
<br />
import "mod_video"<br />
<br />
Process Main ( )<br />
<br />
Begin<br />
<br />
set_mode ( 320 , 240 , 16 , MODE_WAITVSYNC );<br />
<br />
set_fps ( 60 , 1 );<br />
</pre><br />
<br />
Firstly we have to import [[mod_video]] to later give video instructions.<br />
<br />
Then we begin the main process. [[Begin]] proceeds the start of the main process code.<br />
<br />
In the code we have [[set_mode]] to 320 width by 240 length and at 16-bit colour. The setting MODE_WAITVSYNC is a selection from [[render_flags]]. This selects (in this case) what is basically a Vertical Sync on option.<br />
<br />
Then we [[set_fps]] (frames per second) to 60 with frame skip of 1. Frame skipping is ideal if you think your game may slow down on lower spec computers, as it will decide to skip displaying a frame if needed.<br />
<br />
==Adding a background and a scroll==<br />
<br />
Now we have the screen resolution set-up, we want to add a [[scroll]] and a background. For we want the background to be independent of the game graphics.<br />
<br />
So firstly, we need to load in the game graphics.<br />
<br />
Here you can download the [[File:shootem.zip]] and .fpg contained in the .zip, for use in this tutorial.<br />
<br />
Make sure you place the FPG file ("shootem.fpg") in a suitable place for access by the program. And note the path to it, for example - "/ShootemData/shootem.fpg"<br />
<br />
So, now check out this code:<br />
<br />
<pre><br />
// Shoot'em up Tutorial Game<br />
//<br />
// A side scrolling shooter for Bennu Wiki - written by Squarepush<br />
<br />
import "mod_video"<br />
import "mod_map"<br />
import "mod_scroll"<br />
import "mod_screen"<br />
import "mod_key"<br />
import "mod_proc"<br />
<br />
Global<br />
<br />
int shootemGfx;<br />
<br />
End<br />
<br />
Process Main ( )<br />
<br />
Begin<br />
<br />
Loop<br />
<br />
shootemGfx = load_fpg ( "shootemup.fpg" );<br />
<br />
scale_mode = scale_normal2x;<br />
set_mode ( 320 , 240 , 16 , mode_waitvsync );<br />
<br />
set_fps ( 60 , 1 );<br />
<br />
SetupScreen ( );<br />
<br />
Repeat<br />
<br />
frame;<br />
<br />
If ( key(_esc) )<br />
exit();<br />
End<br />
<br />
Until ( key(_space) )<br />
<br />
Repeat<br />
<br />
frame;<br />
<br />
Until ( key(_esc) )<br />
<br />
End<br />
<br />
End<br />
<br />
Process SetupScreen ( )<br />
<br />
Private<br />
<br />
int f;<br />
<br />
Begin<br />
<br />
define_region ( 1 , 0 , 0 , 320 , 212 );<br />
start_scroll ( 1 , shootemGfx , 50 , 0 , 1 , 1 );<br />
scroll[1].speed = 1;<br />
<br />
Loop<br />
For ( f = 1 ; f < 5 ; f = f + 1 )<br />
frame;<br />
End<br />
scroll[1].x0 = scroll[1].x0 + 1;<br />
End<br />
<br />
End<br />
</pre><br />
<br />
We are importing more modules:<br />
<br />
[[mod_map]]<br />
[[mod_scroll]]<br />
[[mod_screen]]<br />
[[mod_key]]<br />
[[mod_proc]]<br />
<br />
You can if you wish, look these up to see what they enable Bennu to do. We are importing one at a time as used in the code. This is seen as good practice.<br />
<br />
Now, in the first Repeat loop, we insert an [[exit]] command, so that the game exits from here if the escape key is pressed. It ceases to Repeat if the space bar is pressed, and the Game process is called.<br />
<br />
We also prepare another loop for the game part, which we will fill in later on.<br />
<br />
In process SetupScreen we make what is called a [[region]], with [[region_define]]. In this case it is simply the game window. The first region in this tutorial is '''nearly''' the size of the screen - there is a space left at the bottom for a panel which will have a few things on it. But that is made later on in the tutorial.<br />
<br />
<br />
'''A section about scrolls:'''<br />
<br />
Next you can see we are starting a [[scroll]] by calling [[start_scroll]]. In short we use scroll [1] and choose the background graphic, which was loaded and assigned to "shootemGfx" earlier. The number of the graphic/map in the .fpg file is 100. We ask to use region 1 which we set up earlier too, with locking indicator 1, which is perfect for horizontal moving scrolls. It will also repeat-tile the background graphic for us, so it covers the whole screen's view and does not simply scroll off the screen!<br />
<br />
Lastly we employ a scroll struct variable for x movement. This works out as scroll[1].x0. The scroll movement we want is slower than 1 pixel per frame, so we have to frame ahead 4 times for every pixel movement.<br />
<br />
==First time running the game (compilation)==<br />
<br />
Now, finally you can try and compile the program!<br />
<br />
There isn't much to see, but the main thing is we have our basis for the game, with a side-scrolling background!<br />
<br />
If something went wrong in compilation, or you have a blank screen, try checking your code for errors. Also, check the file path to the .fpg file is correct.<br />
<br />
==Adding the ship==<br />
<br />
We are now going to add a new process for the ship. It will simply move around the screen, controlled by the arrow keys. Interested?<br />
<br />
Also we are making a mock title screen - when the user loads the program he/she will arrive here.<br />
<br />
Let's see the code with a ship process added:<br />
<br />
<pre><br />
// Shoot'em up Tutorial Game<br />
//<br />
// A side scrolling shooter for Bennu Wiki - written by Squarepush<br />
<br />
import "mod_proc"<br />
import "mod_grproc"<br />
import "mod_screen"<br />
import "mod_key"<br />
import "mod_text"<br />
import "mod_video"<br />
import "mod_map"<br />
import "mod_scroll"<br />
import "mod_wm"<br />
import "mod_rand"<br />
<br />
Global<br />
<br />
int shootemGfx;<br />
int ship_id;<br />
<br />
End<br />
<br />
Process Main ( )<br />
<br />
Begin<br />
<br />
Loop<br />
<br />
shootemGfx = load_fpg ( "shootem.fpg" );<br />
<br />
set_icon ( shootemGfx , 1 );<br />
set_title ( "Shoot'em Up Tutorial Game" );<br />
<br />
scale_mode = scale_normal2x;<br />
set_mode ( 320 , 240 , 16 , mode_waitvsync );<br />
<br />
set_fps ( 60 , 1 );<br />
<br />
SetupScreen ( );<br />
<br />
TitleScreen ( );<br />
<br />
Repeat<br />
<br />
frame;<br />
<br />
If ( key(_esc) )<br />
exit();<br />
End<br />
<br />
Until ( key(_space) )<br />
<br />
Game ( );<br />
<br />
Repeat<br />
<br />
frame;<br />
<br />
Until ( key(_esc) )<br />
<br />
End<br />
<br />
End<br />
<br />
Process SetupScreen ( )<br />
<br />
Private<br />
<br />
int f;<br />
<br />
Begin<br />
<br />
define_region ( 1 , 0 , 0 , 320 , 212 );<br />
start_scroll ( 1 , shootemGfx , 50 , 0 , 1 , 1 );<br />
scroll[1].speed = 1;<br />
<br />
Loop<br />
For ( f = 1 ; f < 5 ; f = f + 1 )<br />
frame;<br />
End<br />
scroll[1].x0 = scroll[1].x0 + 1;<br />
End<br />
<br />
End<br />
<br />
Process TitleScreen ( )<br />
<br />
Begin<br />
<br />
write ( 0 , 160 , 150 , 4 , "Squarepush's Shoot'em Up Tutorial Game" );<br />
write ( 0 , 160 , 170 , 4 , "PRESS SPACE TO PLAY" );<br />
<br />
REPEAT<br />
frame;<br />
UNTIL ( key(_space) )<br />
<br />
delete_text ( all_text );<br />
<br />
End<br />
<br />
<br />
Process Game ( )<br />
<br />
Begin<br />
<br />
ship_id = Ship ( );<br />
<br />
End<br />
<br />
Process Ship ( );<br />
<br />
Private<br />
<br />
int xm;<br />
int ym;<br />
<br />
Begin<br />
<br />
resolution = 10;<br />
file = shootemGfx;<br />
region = 1;<br />
graph = 1;<br />
<br />
x = 200;<br />
y = 1060;<br />
<br />
Loop<br />
<br />
If ( key(_right) || key(_left) )<br />
<br />
If ( key(_right) )<br />
If ( ! key(_left) )<br />
xm = xm + 8;<br />
end<br />
end<br />
<br />
If ( key(_left) )<br />
If ( ! key(_right) )<br />
xm = xm - 8;<br />
end<br />
end<br />
<br />
If ( xm > 24 )<br />
xm = 24;<br />
end<br />
<br />
If ( xm < -24 )<br />
xm = -24;<br />
end<br />
<br />
else<br />
<br />
If ( xm > 0 )<br />
xm = xm - 2;<br />
end<br />
<br />
If ( xm < 0 )<br />
xm = xm + 2;<br />
end<br />
<br />
end<br />
<br />
If ( key(_up) || key(_down) )<br />
<br />
If ( key(_up) )<br />
If ( ! key(_down) )<br />
ym = ym - 8;<br />
End<br />
End<br />
<br />
If ( key(_down) )<br />
If ( ! key(_up) )<br />
ym = ym + 8;<br />
End<br />
End<br />
<br />
If ( ym > 24 )<br />
ym = 24;<br />
End<br />
<br />
If ( ym < -24 )<br />
ym = -24;<br />
End<br />
<br />
else<br />
<br />
If ( ym > 0 )<br />
ym = ym - 2;<br />
End<br />
<br />
If ( ym < 0 )<br />
ym = ym + 2;<br />
End<br />
<br />
End<br />
<br />
If ( y > 1980 )<br />
y = 1980;<br />
End<br />
<br />
If ( y < 140 )<br />
y = 140;<br />
End<br />
<br />
If ( x > 3000 )<br />
x = 3000;<br />
End<br />
<br />
If ( x < 200 )<br />
x = 200;<br />
End<br />
<br />
x = x + xm;<br />
y = y + ym;<br />
<br />
frame;<br />
<br />
End<br />
<br />
End<br />
</pre><br />
<br />
The ship process is called, and the id of the process is stored in ship_id. We will need this to access the ship process id values later.<br />
<br />
As you may notice, the ship process has constants x and y co-ordinates. When you begin a new process these are usually at 0 to begin with. So we set an initial co-ordinate for them.<br />
<br />
We put the ship in region 1, but we don't attach it to the scroll as the scroll will be independent to the front game graphics.<br />
<br />
I've written some code to control the ship, which you can analyse - really most of this is to ensure the ship moves smoothly, while being at a decent rate to move around the screen. I defined xm and ym (movement factors) to act like additives to the x and y. And you can see i made a value for [[resolution]]. Which was 10. This is to ensure smooth movement again. Remember - when changing the resolution you must change all screen co-ords to match, in this case x10.</div>Squarehttps://wiki.bennugd.org/index.php?title=File:Shootem.zip&diff=9333File:Shootem.zip2012-02-21T17:55:07Z<p>Square: </p>
<hr />
<div></div>Squarehttps://wiki.bennugd.org/index.php?title=Setting_up_Bennu&diff=8441Setting up Bennu2011-07-16T03:23:12Z<p>Square: </p>
<hr />
<div>[[Category:tutorialcategories]]<br />
[[Category:setting up Bennu]]<br />
<br />
[[tutorialcategories|'''Up to Tutorialcategories''']]<br />
<br />
----<br />
<br />
Setting up Bennu.<br />
----<br />
<DPL><br />
category=setting up Bennu<br />
resultsfooter = \n%PAGES% articles about setting up Bennu<br />
mode=userformat<br />
listseparators = ,\n* [[%PAGE%|%TITLE%]],,<br />
redirects = include<br />
noresultsfooter = No pages about setting up Bennu here yet.<br />
</DPL><br />
<br />
(If you require an editor it is recommended to follow instructions for ''Setting up Bennu with ConTEXT'')</div>Squarehttps://wiki.bennugd.org/index.php?title=Functioncategories&diff=7880Functioncategories2010-06-19T01:31:56Z<p>Square: </p>
<hr />
<div>[[Index|'''Up to Index''']]<br />
<br />
[[functions|'''List of Functions''']]<br />
<br />
----<br />
<br />
Function categories.<br />
<br />
This is work in progress, so not all categories are fully documented yet, though the functions listed are documented. To see a list of all functions documented, visit the [[functions|List of Functions]].<br />
----<br />
'''Native'''<br />
<br />
<DPL><br />
category=functioncategories<br />
notcategory=dll<br />
mode=userformat<br />
columns=2<br />
listseparators = ,\n* [[%PAGE%|%TITLE%]] ({{#DPL: mode=userformat | format= | category=%TITLE% | category=functions | resultsheader=%PAGES% | noresultsheader=0}}),,<br />
redirects = include<br />
ordermethod = titlewithoutnamespace<br />
resultsfooter = \n%PAGES% function categories, holding <br />
</DPL><br />
{{#DPL: mode=userformat | format=| categoriesminmax=2, | category=Functions | notcategory=dll | resultsheader=%PAGES% | noresultsheader=0}} functions<br />
<br />
'''DLL'''<br />
<br />
<DPL><br />
category=functioncategories<br />
category=dll<br />
mode=userformat<br />
columns=2<br />
listseparators = ,\n* [[%PAGE%|%TITLE%]] ({{#DPL: mode=userformat | format= | category=%TITLE% | category=functions | resultsheader=%PAGES% | noresultsheader=0}}),,<br />
redirects = include<br />
ordermethod = titlewithoutnamespace<br />
resultsfooter = \n%PAGES% function categories, holding <br />
noresultsheader= 0 function categories, holding<br />
</DPL><br />
{{#DPL: mode=userformat | format= | categoriesminmax=2, | category=Functions | category=dll | resultsheader=%PAGES% | noresultsheader=0}} functions</div>Squarehttps://wiki.bennugd.org/index.php?title=Dup&diff=7406Dup2009-08-30T14:40:06Z<p>Square: /* Example 2 */</p>
<hr />
<div>[[category:reserved]]<br />
[[category:language]]<br />
<br />
== Syntax ==<br />
{{Syntaxdocbox}}<br />
'''Dup''' [ '''(''' <value> ''')''' ] ''';'''<br />
<br />
== Description ==<br />
The '''dup(value);''' return a space data filled with the given value.<br />
For example a 10 dup(0) return an array of 10 elements, all with a zero value.<br />
== Example 1 ==<br />
<pre><br />
import "mod_say";<br />
<br />
global<br />
array[] = 10 dup(0);<br />
<br />
begin<br />
say ( sizeof(array)/sizeof(array[0]) );<br />
end</pre><br />
<br />
This example prints 10 because the size of array is ten and the size of the first element is one.<br />
<br />
== Example 2 ==<br />
<pre><br />
import "mod_say";<br />
<br />
global<br />
int array[5] = 1 , 4 dup(0);<br />
int arrayPosition;<br />
begin<br />
for ( arrayPosition = 0 ; arrayPosition < 5 ; arrayPosition = arrayPosition + 1 )<br />
say ( array[arrayPosition] );<br />
end<br />
end</pre><br />
<br />
This example prints:<br />
<br />
1 0 0 0 0<br />
<br />
As it duplicates "0" four times in the array data.<br />
{{Keywords}}</div>Squarehttps://wiki.bennugd.org/index.php?title=Special:Badtitle/NS114:Creating_a_simple_shoot%27em_up&diff=7017Special:Badtitle/NS114:Creating a simple shoot'em up2009-04-30T22:31:02Z<p>Square: Tutorial:Creating a simple shoot'em up moved to Tutorial:Squarepush's side-scrolling Shoot'em Up Tutorial: Because i did it.</p>
<hr />
<div>#REDIRECT [[Tutorial:Squarepush's side-scrolling Shoot'em Up Tutorial]]</div>Squarehttps://wiki.bennugd.org/index.php?title=Tutorials&diff=7015Tutorials2009-04-30T22:24:12Z<p>Square: </p>
<hr />
<div>[[Index|'''Up to Index''']]<br />
<br />
[[Tutorialcategories|'''Tutorial Categories''']]<br />
<br />
----<br />
<br />
List of tutorials about Bennu. They range from beginner to advanced users.<br />
<br />
Not many on here as of yet - Wiki users add if you please!<br />
----<br />
<DPL><br />
category=tutorials<br />
mode=userformat<br />
listseparators = ,\n* [[%PAGE%|%TITLE%]],,<br />
redirects = include<br />
noresultsheader = No tutorials here yet.<br />
resultsfooter = \n%PAGES% tutorials<br />
</DPL></div>Square