Jump to content

Game help


bullygil
 Share

Recommended Posts

Yesterday, or a few days ago(can't remember exactly), I posted something about making sidescrolling games and I got pretty shoked up when I saw http://www.autoitscript.com/forum/index.php?showtopic=107371. I looked into the search, but it didn't helped me to much(but still helped me with ideeas).I want to make a game.I don't have a deadline or something.It's just something I want to make for fun/learning. I wrote some code, but it's far from what I want.This is what I have:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>
#include <GDIPlus.au3>
Global $characterPositionLR=20
Global $characterPositionUD=176
Global $position=0
Global $leftkey=25
Global $rightkey=27
Global $dll="user32.dll"
Global $speed=2

Opt("GUIOnEventMode",1)
$Form1 = GUICreate("Form1", 600, 249, 192, 124)
$backgroundLevel=GUICtrlCreatePic("level.jpg",0,0,600,249);2174 lvl1 width
$character=GUICtrlCreatePic("character_forward.gif",0,176,31,48)
GUISetState(@SW_SHOW)
GUISetOnEvent($GUI_EVENT_CLOSE,"exit_")

While 1
    controlCaracter()
    Sleep(10)
WEnd

Func exit_()
    Exit
EndFunc

func controlCaracter()
    If(_IsPressed($leftkey,$dll)=1) Then
        ;mergi in spate
        $characterPositionLR=$characterPositionLR-$speed
        GUICtrlSetImage($character,"character_backwards.gif")
        GUICtrlSetPos($character,$characterPositionLR,176)
    ElseIf (_IsPressed($rightkey,$dll)=1) Then
        ;mergi in fata
        $characterPositionLR=$characterPositionLR+$speed
        GUICtrlSetImage($character,"character_forward.gif")
        GUICtrlSetPos($character,$characterPositionLR,176)
    EndIf
EndFunc

DllClose($dll)

(requied files are atached below)

What I want, is some help.There are a few things I don't know how to solve:

-How to create a collision system

-How to stop image from flickering

-How to make the background scroll

Those are the first things i want to solve.It won't be a jump'n run game.Bassicaly you'l have to go to the point x to y to complete an objective.I would REALLY appreciate a little help.

Thank you ;)

post-24387-12619593039965_thumb.gif

post-24387-12619593047043_thumb.gif

post-24387-12619593055411_thumb.jpg

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...