Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Steinbock

#31
merry christmas from the mountains too
#32
Danke für den Tip, aber die Geschwindigkeit ist in etwa dieselbe, egal ob unter WIN oder WIZ. Werde mal schauen ob ich beim WIZ eventuell über INLINE einen Workaround finde. :doubt:
#33
Ok.

1. Fall:
Crossfading (fliessender Übergang von 2 Bildern -> kann ich mit ALPHAMODE umgehen.

2. Fall:
Ich schreibe eine Mode7-Routine (ähnlich Mario Kart auf SNES).
Dazu möchte ich in einem Buffer die Grafik erstellen und danach auf den aktuellenScreen bringen. Dies ist aber mit SETPIXEL zu langsam.
#34
Hallo zusammen

Gibt es in GLBasic die Möglichkeit direkt in den Bitmapbuffer eines Sprites zu schreiben auser mit SETPIXEL?
#35
double dot? ;/
#36
That's the whole truth.  :good:
#37
If you mean an attached "ZIP-code", then there is none.
In the first part it's a small "motivation" to do a little own work.  =D
#38
Ok. Should be fixed.  :whistle:
#39
Simple tilemap editor is now available.
See "EDIT" in first post topic http://www.glbasic.com/forum/index.php?topic=2950.0
#40
Of course!   =D
Original sourcecode is written in Delphi. Please give me a week or two, so i can
rewrite it in GLBASIC. I think this makes more sense.
#41
OGG-File is zipped in attachement (maybe other need it too).

I'm using
Code (glbasic) Select
PLAYMUSIC "./isdo/sfx/music.ogg",TRUE
MUSICVOLUME 0.8



[attachment deleted by admin]
#42
QuoteSteinbock: Are you saying that the game stutters for you too?
Yes.

With my own program MP3 stutters but OGG works fine.
#43
By me it works with OGG (MP3 stutters too). WIZ-FW 1.0.0 and newest downloadable glbasic demo-version 6.247.
#44
Try to play the music as OGG instead of MP3.
#45
In the last part we look, how to add a power-up and thus change the shotpower.
Then finally we add a backgroundmusic and some soundeffects. As always there is an attachement with samplecode.

If you worked through the 6th part, you know, we have 2 different enemytypes: ENEMY1 and ENEMY2.
In the program we can see ENEMY2 as RED enemy. Now this one shall, if it is hitted, leave a power-up.
For this we just have to add an object in our EnemySCRIPT.
Code (glbasic) Select

                ObjectADD(ID_POWERUP,Object.PosX[ix],Object.PosY[ix])

The script for the power-up item on the other hand you will find in file items.gbas.
Code (glbasic) Select

        CASE ID_POWERUP
            SELECT Object.State[ix]
                CASE 1
                    IF Object.PosX[ix]>-16
                        DEC Object.PosX[ix],0.5
                    ELSE
                        Object.State[ix]=0
                    ENDIF
            ENDSELECT
            DRAWSPRITE SPR_POWERUP,Object.PosX[ix],Object.PosY[ix]
            SetCollBox(ix,0,0,15,15)
            IF CheckCollPlayer(ix)=COLL_PLAYER
                Object.State[ix]=0
                PLAYSOUND(SFX_EXTRA,GetPan(Object.PosX[ix]),0.7)
                SPR_SHOT=24
            ENDIF
    ENDSELECT

We check this item on collision with the player. If a collision occurs, we close the item in the objectlist and change our shot.

Now to the sound. This is an easy thing under GLBasic.
In file level000.gbas we load our soundeffects and allocate them a constant.
Code (glbasic) Select

    LOADSOUND "./isdo/sfx/shot.wav",SFX_SHOT,4
    LOADSOUND "./isdo/sfx/explosion.wav",SFX_EXPLOSION,4
    LOADSOUND "./isdo/sfx/extra.wav",SFX_EXTRA,4

Thereafter we load our backgroundmusic, setting the volume and play it.
Code (glbasic) Select

    PLAYMUSIC "./isdo/sfx/music.wav",TRUE
    MUSICVOLUME 0.9


In GLBasic a soundeffect will be played with the command PLAYSOUND.
If you look on the ItemSCRIPT for example
Code (glbasic) Select

                PLAYSOUND(SFX_EXTRA,GetPan(Object.PosX[ix]),0.7)

the soundeffect with ID SFX_EXTRA will be played with a volume of 0.7.
Function GetPan in our library causes, the effect sounds depending of objectposition (left/right).

Ok. That's it. Now i hope to helped some of you with this tutorial. And as i said, if i can help someone, i will try to do.

As a little bonus you can download here isdo_090406.zip - 11.13MB a 1min section of my project I.S.D.O. The playercollision is off. The backgroundmusics origin: "MOD-Archiv".
Code (glbasic) Select

Steuerung->WIN:
  startmenu:  cursorkey up/down = menucursor up and down
              "x"-key           = select menuentry
  game:       cursorkey up/down = move
              "x"-key           = shoot
              ENTER-key         = return to startmenu

And now enjoy!!  =D


   

[attachment deleted by admin]