Page 1 of 1

SO...?

Posted: Fri Dec 18, 2009 2:46 pm
by Student
Hi everyone! I have a "small problem". I want to do a 2D-game where u could shoot and there would be enemies to shoot (and they would shoot at u too :D ). And of course u would have healthbar and when u get hit, u would lose health (and when health runs out, u would have 2 more lives left). If u can tell me what kind of code i would need for this, i could do rest of what it needs. And early thanks for help or that u have tried to help :D !

Re: SO...?

Posted: Fri Dec 18, 2009 3:14 pm
by Awaclus
You need types, integers and objects.

Re: SO...?

Posted: Fri Dec 18, 2009 4:18 pm
by Jonez
From Learning Center (press f8), see lessons" #11. Kartat 2" (= Maps 2), "#19. Painovoima" (= Gravity) and for bullets lesson "#18. Ammukset 2".

The comments are in finnish but you should be able to understand the code. If you don't know what a certain command does, double click it (or press f1) and the manual opens up. The explanations are in finnish but the comments in the examples are in english, so with patience you should be able to learn the code.

Here are a few commands and functions you should look up (see the example codes, they are in english):

Code: Select all

Repeat ... Forever ... Until    //Starts and ends a loop
DrawScreen                      //Draws the screen

SCREEN                          //Set screen size and type, aka. resolution.

For ... Next                    //For ... Next - loop.
While ... Wend                  //While ... Wend -loop

//For large information handling, like bullets, enemies etc.
Type ... End Type
Dim

//Objects... Very handy for beginners.
LoadObject()
CloneObject()
MoveObject
TranslateObject
PointObject

//Images
LoadImage()
DrawImage()

//Camera commands
MoveCamera
TranslateCamera

//Text commands
Text
AddText

//conditions.
If
Case

//See wiki for functions.
Function
If you don't have any experience in programming, see this wiki article about conditions: Conditional

Re: SO...?

Posted: Fri Dec 18, 2009 6:55 pm
by Student
Joo Jonez oon kyl suomalaine =D

Re: SO...?

Posted: Fri Dec 18, 2009 7:22 pm
by tuhoojabotti
Suomalainen, no miksi ihmeessä sä sitten kirjotat englanninkieliselle alueelle?

Re: SO...?

Posted: Fri Dec 18, 2009 7:36 pm
by Herra Siili
Jonez wrote:

Code: Select all

...

//Images
LoadImage()
DrawImage()

...
The command DrawImage doesn't need brackets.
Komento DrawImage ei tarvitse sulkuja.

Re: SO...?

Posted: Fri Dec 18, 2009 7:40 pm
by Awaclus
tuhoojabotti wrote:Suomalainen, no miksi ihmeessä sä sitten kirjotat englanninkieliselle alueelle?
Problems-alue tuli ensimmäisenä vastaan eikä älynnyt sitten kelata alaspäin? Tai toivoi saavansa nopeammin vastauksen alueella, jota käyttävät kaikki?

Re: SO...?

Posted: Sat Dec 19, 2009 12:22 am
by Student
No kysyin vaan väärästä kohdasta... En huomannu suomen kielistä aluetta

Re: SO...?

Posted: Sat Dec 19, 2009 10:28 am
by kaneli2000
A small offtopic; shall we disgust in English?

Re: SO...?

Posted: Sat Dec 19, 2009 12:52 pm
by Astigma
kaneli2000 wrote:A small offtopic; shall we disgust in English?
Yes, you should. I think that there was a quite good answer for the original question so I do not see reason why not to lock this topic. The topic title is not acceptable and, as I said, you should speak English only in this area.