Jump to content

Game Swords


NewBe
 Share

Recommended Posts

Hello right away I want to start off by saying my english isn't the best :)

I have created a game although it's still long from finished but it's off to a good start I guess.

It's based on this game

Fighting

the reason for me posting it is because I want it to look it's best :) but be for I tell you what I mean by that have a look at it so far

This is when you first create your character the GUI looks exactly like this

Posted Image

This is when you want to load or create a new character or even update the game

Posted Image

you'll notice on the left and right hand sides of the GUI are characters they switch randomly everytime

I am looking for people to make weapons and monsters and a shop keeper ;) hehe this game will be addictive if I ever finish it ^_^

I would also like idea's that may make the game better you might want to play the game above first and yes you do level up in this game!

Link to comment
Share on other sites

ok here is an example but it's buggy and not even finished

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.2.10.0
 Author:         myName

 Script Function:
    Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here


;GUICtrlSetData($Label1 , GUICtrlRead($Label1) - _Damage())

#include <Misc.au3>
#include <GUIConstants.au3>
Global $Character , $Loader , $SetGui , $Name , $SS_REALSIZEIMAGE , $Dummy = "Do Not Delete.Dum" , $Settings = "Settings.ini" 

If Not FileExists($Dummy) Then 
    FileWrite($Dummy , "User = " & @UserName & @CRLF & "Computer = " & @ComputerName & @CRLF & "Entry = 1")
    _Create()
Else
    _Load()
EndIf
    
While 1 
    Sleep(1000)
WEnd

Func _Create()
$Character = GUICreate(""  , 555 , 150 , Default , Default , $WS_POPUP)
$Dwarf = GUICtrlCreatePic(@ScriptDir & "\Resources\Images\Dwarf.jpg", 0, 0, 115, 151 , BitOR($SS_NOTIFY, $SS_REALSIZEIMAGE ,$WS_CLIPSIBLINGS))
$Knight = GUICtrlCreatePic(@ScriptDir & "\Resources\Images\Knight.jpg", 110, 0, 115, 151 , BitOR($SS_NOTIFY, $SS_REALSIZEIMAGE ,$WS_CLIPSIBLINGS))
$Prince = GUICtrlCreatePic(@ScriptDir & "\Resources\Images\Prince.jpg", 220, 0, 115, 151 , BitOR($SS_NOTIFY, $SS_REALSIZEIMAGE ,$WS_CLIPSIBLINGS))
$Warrior = GUICtrlCreatePic(@ScriptDir & "\Resources\Images\Warrior.jpg", 330, 0, 115, 151 , BitOR($SS_NOTIFY, $SS_REALSIZEIMAGE ,$WS_CLIPSIBLINGS))
$Wizard = GUICtrlCreatePic(@ScriptDir & "\Resources\Images\Wizard.jpg", 440, 0, 115, 151 , BitOR($SS_NOTIFY, $SS_REALSIZEIMAGE ,$WS_CLIPSIBLINGS))
GUICtrlSetTip($Dwarf, "The Dwarf is small but yet very powerful" & @CRLF & "he'll crush anybody who tries to walk in his path" , "Dwarf")
GUICtrlSetTip($Knight, "The Knight is strong but his combat gear slows" & @CRLF & "him down but that doesn't make him someone you want to mess with" , "Knight")
GUICtrlSetTip($Prince, "The Prince was and still is a great warlord" & @CRLF & "he will use force if his slaves don't make use of theirselfs" , "Prince")
GUICtrlSetTip($Warrior, "The Warrior is a master of combat and" & @CRLF & "will kill anyone who tries to get in his way" , "Warrior")
GUICtrlSetTip($Wizard, "The Wizard is old but wise he knows" & @CRLF & "how to kill anybody with his powerful forces" , "Wizard")
;Spelling Check = 0
WinSetOnTop($Character , "" , 1)
GUISetState(@SW_SHOW)

While 1
    $Msg = GUIGetMsg()
    Switch $Msg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Dwarf
            _Finalize("Dwarf")
        Case $Knight 
            _Finalize("Knight")
        Case $Prince
            _Finalize("Prince")
        Case $Warrior
            _Finalize("Warrior")
        Case $Wizard
            _Finalize("Wizard")
    EndSwitch
WEnd
EndFunc

Func _Load()
$Loader = GUICreate("Play", 315, 150 , Default , Default , $WS_POPUP)
GUISetBkColor(IniRead(@ScriptDir & "\Resources\Profiles\" & $Settings , "Don't Edit Me" , "Loader" , "0xF1F3F3") , $Loader)
$Char1 = GUICtrlCreatePic(@ScriptDir & "\Resources\Images\" & _Chars() & ".jpg" , 0, 0, 115, 151, $SS_REALSIZEIMAGE)
$Char2 = GUICtrlCreatePic(@ScriptDir & "\Resources\Images\" & _Chars() & ".jpg" , 200, 0, 115, 151 , $SS_REALSIZEIMAGE)
$New = GUICtrlCreateButton("New...", 120, 0, 75, 25, 0)
$Load = GUICtrlCreateButton("Load...", 120, 25, 75, 25, 0)
$Setting = GUICtrlCreateButton("Settings", 120, 50, 75, 25, 0)
$Update = GUICtrlCreateButton("Update", 120, 75, 75, 25, 0)
$Credits = GUICtrlCreateButton("Credits", 120, 100, 75, 25, 0)
$Exit = GUICtrlCreateButton("Exit", 120, 125, 75, 25, 0)
GUISetState(@SW_SHOW)

;If $Char1 = $Char2 Then
;   Do
;   GUICtrlSetData($Char2 , @ScriptDir & "\Resources\Images\" & _Chars() & ".jpg")
;   Until Not $Char1 = $Char2 ;seems like this function works 
;EndIf

While 1
    $Msg = GUIGetMsg()
    Switch $Msg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $New
            GUIDelete($Loader)
            _Create()
        ;Case  $Load
        Case $Setting
            GUIDelete($Loader)
            _Settings()
        Case $Update
            MsgBox(0 , "" , "No Updates")
        Case $Credits
            
        Case $Exit
            Exit
    EndSwitch
WEnd
EndFunc

Func _Chars()
    $Ran = Random(1 , 5 , 1)
    If $Ran = 1 Then 
        Return "Dwarf"
    ElseIf $Ran = 2 Then
        Return "Knight"
    ElseIf $Ran = 3 Then
        Return "Prince"
    ElseIf $Ran = 4 Then
        Return "Warrior"
    Else
        Return "Wizard"
    EndIf
EndFunc

Func _Settings()
$SetGui = GUICreate("Set...", 150, 260)
$Background = GUICtrlCreateButton("Background Colour", 0, 0, 150, 25, 0)
$Set = GUICtrlCreateRadio("Settings", 0, 25, 150, 17)
$Lod = GUICtrlCreateRadio("Loader", 0, 50, 150, 17)
$Fig = GUICtrlCreateRadio("Fights", 0, 75, 150, 17)
$All = GUICtrlCreateRadio("All", 0, 100, 150, 17)
$PicLeft = GUICtrlCreatePic(@ScriptDir & "\Resources\Images\" & _Chars() & ".jpg" , 0, 120, 70, 70)
$PicRight = GUICtrlCreatePic(@ScriptDir & "\Resources\Images\" & _Chars() & ".jpg" , 80, 120, 70, 70)
$Char1 = GUICtrlCreateButton("Char 1", 0, 192, 70, 25, 0)
$Char2 = GUICtrlCreateButton("Char 2", 80, 192, 70, 25, 0)
$RanOn = GUICtrlCreateRadio("Random On", 0, 220, 150, 17)
$RanOff = GUICtrlCreateRadio("Random Off", 0, 240, 150, 17)
GUICtrlSetState($Set , $GUI_CHECKED)
GUICtrlSetState($RanOn , $GUI_CHECKED)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            GUIDelete($SetGui)
            _Load()
        Case $Background
            $Colour = _ChooseColor(2, 0x000000 , 2)
            If Not @Error Then 
                GUISetBkColor($Colour, $SetGui)
                IniWrite(@ScriptDir & "\Resources\Profiles\" & $Settings , "Don't Edit Me" , "Settings" , $Colour)
                IniWrite(@ScriptDir & "\Resources\Profiles\" & $Settings , "Don't Edit Me" , "AllToggle" , 0)
            ElseIf GUICtrlRead($Lod) = $GUI_CHECKED Then
                GUISetBkColor($Colour, $Loader)
                IniWrite(@ScriptDir & "\Resources\Profiles\" & $Settings , "Don't Edit Me" , "Loader" , $Colour)
                IniWrite(@ScriptDir & "\Resources\Profiles\" & $Settings , "Don't Edit Me" , "AllToggle" , 0)
            ;ElseIf GUICtrlRead($Fig) = $GUI_CHECKED Then
            ;   GUISetBkColor($Colour, $Fight)
            ;   IniWrite(@ScriptDir & "\Resources\Profiles\" & $Settings , "Don't Edit Me" , "Fight" , $Colour)
            ;IniWrite(@ScriptDir & "\Resources\Profiles\" & $Settings , "Don't Edit Me" , "AllToggle" , 0)
            Else
            IniWrite(@ScriptDir & "\Resources\Profiles\" & $Settings , "Don't Edit Me" , "All" , $Colour)
            IniWrite(@ScriptDir & "\Resources\Profiles\" & $Settings , "Don't Edit Me" , "AllToggle" , 1)
            IniWrite(@ScriptDir & "\Resources\Profiles\" & $Settings , "Don't Edit Me" , "Fight" , $Colour)
            IniWrite(@ScriptDir & "\Resources\Profiles\" & $Settings , "Don't Edit Me" , "Loader" , $Colour)
            IniWrite(@ScriptDir & "\Resources\Profiles\" & $Settings , "Don't Edit Me" , "Settings" , $Colour)
            EndIf
    EndSwitch
WEnd
EndFunc

Func _Finalize($Dub)
    GUIDelete($Character)
    $Name = InputBox($Dub , "Enter a name for your hero" , $Dub , "" , 200 , 50) 
    If $Name = ""  Then 
        Exit
    ElseIf @Error = 1 Then
        Exit
    ElseIf FileExists(@ScriptDir & "\Resources\Profiles\" & $Name & ".ini") Then
        MsgBox(0 , "" , "that name already exist")
        _Finalize($Dub)
    Else
        IniWrite(@ScriptDir & "\Resources\Profiles\" & $Name & ".ini" , "Characters" , $Dub , $Name)
        IniWrite(@ScriptDir & "\Resources\Profiles\" & $Name & ".ini" , "Characters" , "Level" , 0)
        IniWrite(@ScriptDir & "\Resources\Profiles\" & $Name & ".ini" , "Characters" , "Health" , 100)
        IniWrite(@ScriptDir & "\Resources\Profiles\" & $Name & ".ini" , "Characters" , "Speed" , 1)
        IniWrite(@ScriptDir & "\Resources\Profiles\" & $Name & ".ini" , "Characters" , "Damage" , "10")
        IniWrite(@ScriptDir & "\Resources\Profiles\" & $Name & ".ini" , "Characters" , "Exp" , 0)
        IniWrite(@ScriptDir & "\Resources\Profiles\" & $Settings , "Don't Edit Me" , "All" , 0xF1F3F3)
        IniWrite(@ScriptDir & "\Resources\Profiles\" & $Settings , "Don't Edit Me" , "AllToggle" , 1)
        IniWrite(@ScriptDir & "\Resources\Profiles\" & $Settings , "Don't Edit Me" , "Fight" , 0xF1F3F3)
        IniWrite(@ScriptDir & "\Resources\Profiles\" & $Settings , "Don't Edit Me" , "Loader" , 0xF1F3F3)
        IniWrite(@ScriptDir & "\Resources\Profiles\" & $Settings , "Don't Edit Me" , "Settings" , 0xF1F3F3)
        ;_Play()
        Exit
    EndIf
EndFunc

;Func _Play()
;$Name = "Warrior"
;
;$Form1 = GUICreate("Form1", 633, 449)
;$Pic1 = GUICtrlCreatePic("C:\Documents and Settings\XPPRESP3\Desktop\Swords\Resources\Images\Knight.jpg", 440, 112, 115, 151, BitOR($SS_NOTIFY,$SS_REALSIZEIMAGE,$WS_GROUP,$WS_CLIPSIBLINGS))
;$Pic2 = GUICtrlCreatePic("C:\Documents and Settings\XPPRESP3\Desktop\Swords\Resources\Images\Wizard.jpg", 16, 112, 115, 151, BitOR($SS_NOTIFY,$SS_REALSIZEIMAGE,$WS_GROUP,$WS_CLIPSIBLINGS))
;$Label1 = GUICtrlCreateLabel("Health " & IniRead(@ScriptDir & "\Resources\Profiles\" & $Name & ".ini" , "Characters" , "Health" , "100") , 24, 288, 56, 17)
;$Label2 = GUICtrlCreateLabel("Level " & IniRead(@ScriptDir & "\Resources\Profiles\" & $Name & ".ini" , "Characters" , "Level" , "0"), 24, 304, 39, 17)
;$Label3 = GUICtrlCreateLabel("Exp " & IniRead(@ScriptDir & "\Resources\Profiles\" & $Name & ".ini" , "Characters" , "Exp" , "0"), 24, 320, 49, 17)
;$Label4 = GUICtrlCreateLabel("Health 0000", 440, 280, 62, 17)
;$Button1 = GUICtrlCreateButton("Attack", 24, 352, 75, 25, 0)
;$Button2 = GUICtrlCreateButton("Finish", 112, 352, 75, 25, 0)
;GUISetState(@SW_SHOW)


;While 1
;   $nMsg = GUIGetMsg()
;   Switch $nMsg
;       Case $GUI_EVENT_CLOSE
;           Exit
;       Case $Button1
;           GUICtrlSetData($Label1 , GUICtrlRead($Label1) - _Damage())
;   EndSwitch
;WEnd
;EndFunc
Link to comment
Share on other sites

Could you please supply the images?

When I ran it, the only thing that happened is an inputbox appeared, and asked for my character name.

When I supplied one the console kinda went crazy for a moment, and then the application ends.

No errors, no warnings.

EDIT: Ok I ran it for a second time and this time I get a menu.

I will toy around with it for a bit more. =]

Edited by MaudKip
Link to comment
Share on other sites

Yeah had to run twice to get it too work, you should supply images. You have a long way to go, but basing on the picture you should be off to a good start. Good luck!

images and sounds will be supplied when the project is complete :)

Link to comment
Share on other sites

Im also making a similar game. Im a good bit futher, but still needs lots of work. I am using sqlite for the character loads, enemy loads, updates . . . As of right now, my characters run across the bottom of the screen and fight. :) nice to see someone else playing with the idea.

Link to comment
Share on other sites

Im also making a similar game. Im a good bit futher, but still needs lots of work. I am using sqlite for the character loads, enemy loads, updates . . . As of right now, my characters run across the bottom of the screen and fight. :) nice to see someone else playing with the idea.

Thanks I actually love games were you level up or making your person/towers better

Link to comment
Share on other sites

Games kinda like Diablo II LOD?

kinda like. -but I use different formulas, weapon types, character types, skill types (most everything is different really but still a skills based game.)

http://www.arcadeboredom.com/games/464/swo...ll-version.html

this is what my game is like. As of now I dont have shops- but my character, and enemy's are way cooler.

imagine two guys walking cross your screen. -you still see your background :) although I am thinking of changing out the background (a stretched gui) to make a better visual setting

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...