Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

891474 Posts in 33544 Topics- by 24778 Members - Latest Member: sleepyzombie

June 19, 2013, 07:45:30 PM
TIGSource ForumsDeveloperFeedbackDevLogsBanshee Engine : For all your ANSI needs!
Pages: [1] 2 3 ... 20
Print
Author Topic: Banshee Engine : For all your ANSI needs!  (Read 13755 times)
_Madk
Level 10
*****

Love, love is a verb Love is a doing word ~♪


View Profile
« on: August 13, 2012, 12:40:05 PM »









One dev's experience with the Banshee engine
« Last Edit: February 06, 2013, 08:52:35 PM by _Madk » Logged

herror
Level 2
**



View Profile WWW Email
« Reply #1 on: August 13, 2012, 12:52:26 PM »

Posting to follow. Really liking what you have so far!  Hand Thumbs Up Right
Logged

C
Level 9
****



View Profile WWW
« Reply #2 on: August 13, 2012, 01:00:50 PM »

Following Beer!
Logged

Andy Wolff
Level 10
*****


-------


View Profile WWW Email
« Reply #3 on: August 13, 2012, 01:25:44 PM »

I really like how you've made those green halls
Logged

DustyDrake
Level 9
****



View Profile
« Reply #4 on: August 13, 2012, 03:09:29 PM »

Oooh, shiny.
Logged

_Madk
Level 10
*****

Love, love is a verb Love is a doing word ~♪


View Profile
« Reply #5 on: August 13, 2012, 03:25:58 PM »



Logged

_Madk
Level 10
*****

Love, love is a verb Love is a doing word ~♪


View Profile
« Reply #6 on: August 13, 2012, 04:57:18 PM »

saving and loading is implemented. you can save the game at literally any time and the entire game state is very tidily saved.

I also want to take a moment and demand praise for all the work I've put into efficient memory management so that, if you were to so choose, you could have literally thousands of maps and even the most laughably low-specs computer should be able to run it without any problems whatsoever.

edit: with 33 scripted entities in the map a computer with an x86 GenuineIntel ~2992 Mhz processor (graphics card largely irrelevant, program ram requirements low enough that it doesn't matter either) clocks in at 60-70 fps. with 11 scripted entities in the map it clocks in at 100-120. with 2 scripted entities, 150-200. note that this is in debug mode and not release mode, and the game is normally capped at 20 fps.

in other words, I am the proud owner of an unhealthy obsession with optimization
« Last Edit: August 13, 2012, 05:07:58 PM by _Madk » Logged

_Madk
Level 10
*****

Love, love is a verb Love is a doing word ~♪


View Profile
« Reply #7 on: August 13, 2012, 05:52:17 PM »



note that this is on my sweet-ass laptop, not the aforementioned crappy computer
Logged

eigenbom
Level 10
*****



View Profile WWW
« Reply #8 on: August 14, 2012, 01:29:03 AM »

am following this, love smiley faces
Logged

Ashking
Level 10
*****


king of kings


View Profile
« Reply #9 on: August 14, 2012, 01:53:27 AM »

Following!
Logged
_Madk
Level 10
*****

Love, love is a verb Love is a doing word ~♪


View Profile
« Reply #10 on: August 14, 2012, 05:06:49 AM »

my file dialog brings all the boys to the yard

« Last Edit: August 14, 2012, 05:24:39 AM by _Madk » Logged

eyeliner
Level 10
*****


I'm afraid of americans...

hollow_digger@hotmail.com
View Profile WWW Email
« Reply #11 on: August 14, 2012, 08:12:21 AM »

Pineapples anywhere?
Logged

I'm doing this: Ballin' (held) and Sky Line
_Madk
Level 10
*****

Love, love is a verb Love is a doing word ~♪


View Profile
« Reply #12 on: August 14, 2012, 08:37:58 AM »

it's not in the game or anything but you can have this


I would love to have some help making the game. if anyone is interested in helping with scripting, art, and/or level design please send me a pm.

even more than that if I ever want to publish this I need a publisher or something and I don't know how a company works. if you know of an independent or small games company that might have an interest in this and would play nicely with my stuff then I'd really appreciate an introduction. this is a fully-fledged game creation engine and I'm hesitant to release it as freeware when I might be able to use it to fund college and shit.
« Last Edit: August 22, 2012, 12:24:01 PM by _Madk » Logged

_Madk
Level 10
*****

Love, love is a verb Love is a doing word ~♪


View Profile
« Reply #13 on: August 14, 2012, 10:42:54 AM »

console candy

Code:
14/08/12 - 02:39:24 PM : BEGIN GAME DATA DUMP
14/08/12 - 02:39:24 PM :  game name: Titan
14/08/12 - 02:39:24 PM :  player entity name: Vick
14/08/12 - 02:39:24 PM :  screen dimensions: 47,29
14/08/12 - 02:39:24 PM :  default message box height: 8
14/08/12 - 02:39:24 PM :  scheme file path: titan/graphics/scheme.bsc
14/08/12 - 02:39:24 PM :  framerate: 20
14/08/12 - 02:39:24 PM :  screenshot directory: titan/screenshots/
14/08/12 - 02:39:24 PM :  BEGIN SAVE DATA DUMP
14/08/12 - 02:39:24 PM :   (no saved data)
14/08/12 - 02:39:24 PM :  END SAVE DATA DUMP
14/08/12 - 02:39:24 PM :  BEGIN SCRIPT DATA DUMP
14/08/12 - 02:39:24 PM :   file path: titan/main.lua
14/08/12 - 02:39:24 PM :   contains function: "initialized"
14/08/12 - 02:39:24 PM :   contains function: "main"
14/08/12 - 02:39:24 PM :   contains function: "menugetsavefile"
14/08/12 - 02:39:24 PM :   contains function: "menuload"
14/08/12 - 02:39:24 PM :   contains function: "menuquit"
14/08/12 - 02:39:24 PM :   contains function: "menuresume"
14/08/12 - 02:39:24 PM :   contains function: "menusave"
14/08/12 - 02:39:24 PM :   contains function: "runonce"
14/08/12 - 02:39:24 PM :  END SCRIPT DATA DUMP
14/08/12 - 02:39:24 PM :  BEGIN MAP DATA DUMP
14/08/12 - 02:39:24 PM :   map name: casino2
14/08/12 - 02:39:24 PM :   mask path: titan/maps/casino/casino2mask.bam
14/08/12 - 02:39:24 PM :   art path 0: titan/maps/casino/casino2.bam
14/08/12 - 02:39:24 PM :   art path 1:
14/08/12 - 02:39:24 PM :   art path 2:
14/08/12 - 02:39:24 PM :   contains warp: at: 47,29, dimensions: 1,3, target: (position: 1,20,0, layer: 0, map: "casino1")
14/08/12 - 02:39:24 PM :   BEGIN ENTITY DATA DUMP
14/08/12 - 02:39:24 PM :    entity name: Key
14/08/12 - 02:39:24 PM :    entity dimensions: 1,1
14/08/12 - 02:39:24 PM :    position: 36,37,0, layer: 0, map: "casino2"
14/08/12 - 02:39:24 PM :    char: 44 (,), fg: 76, bg: 166
14/08/12 - 02:39:24 PM :    entity is hidden?: 0
14/08/12 - 02:39:24 PM :    entity is solid?: 0 (solid=0, overridesolid=-1)
14/08/12 - 02:39:24 PM :    entity has done runonce?: 1
14/08/12 - 02:39:24 PM :    portrait file path: titan/maps/casino/key106.bam
14/08/12 - 02:39:24 PM :    BEGIN SCRIPT DATA DUMP
14/08/12 - 02:39:24 PM :     file path: titan/maps/casino/../../scripts/key.lua
14/08/12 - 02:39:24 PM :     contains global: "keydata" = "Casino Room 106 Key"
14/08/12 - 02:39:24 PM :     contains global: "text" = "You pick up off the floor a shiny key of white gold and it has the number "106" engraved along its side."
14/08/12 - 02:39:24 PM :     contains function: "activated"
14/08/12 - 02:39:24 PM :     contains function: "runonce"
14/08/12 - 02:39:24 PM :    END SCRIPT DATA DUMP
14/08/12 - 02:39:24 PM :    BEGIN SAVE DATA DUMP
14/08/12 - 02:39:24 PM :     (no saved data)
14/08/12 - 02:39:24 PM :    END SAVE DATA DUMP
14/08/12 - 02:39:24 PM :   END ENTITY DATA DUMP
14/08/12 - 02:39:24 PM :   BEGIN ENTITY DATA DUMP
14/08/12 - 02:39:24 PM :    entity name: Room 100
14/08/12 - 02:39:24 PM :    entity dimensions: 1,1
14/08/12 - 02:39:24 PM :    position: 13,13,0, layer: 0, map: "casino2"
14/08/12 - 02:39:24 PM :    char: -1, fg: -1, bg: -1
14/08/12 - 02:39:24 PM :    entity is hidden?: 0
14/08/12 - 02:39:24 PM :    entity is solid?: 1 (solid=1, overridesolid=-1)
14/08/12 - 02:39:24 PM :    entity has done runonce?: 0
14/08/12 - 02:39:24 PM :    portrait file path: titan/maps/casino/doors/door100.bam
14/08/12 - 02:39:24 PM :    BEGIN SCRIPT DATA DUMP
14/08/12 - 02:39:24 PM :     file path: titan/maps/casino/../../scripts/door.lua
14/08/12 - 02:39:24 PM :     contains global: "locked" = "1"
14/08/12 - 02:39:24 PM :     contains function: "activated"
14/08/12 - 02:39:24 PM :     contains function: "deinitialized"
14/08/12 - 02:39:24 PM :    END SCRIPT DATA DUMP
14/08/12 - 02:39:24 PM :    BEGIN SAVE DATA DUMP
14/08/12 - 02:39:24 PM :     (no saved data)
14/08/12 - 02:39:24 PM :    END SAVE DATA DUMP
14/08/12 - 02:39:24 PM :   END ENTITY DATA DUMP
14/08/12 - 02:39:24 PM :   BEGIN ENTITY DATA DUMP
14/08/12 - 02:39:24 PM :    entity name: Room 101
14/08/12 - 02:39:24 PM :    entity dimensions: 1,1
14/08/12 - 02:39:24 PM :    position: 13,18,0, layer: 0, map: "casino2"
14/08/12 - 02:39:24 PM :    char: -1, fg: -1, bg: -1
14/08/12 - 02:39:24 PM :    entity is hidden?: 0
14/08/12 - 02:39:24 PM :    entity is solid?: 1 (solid=1, overridesolid=-1)
14/08/12 - 02:39:24 PM :    entity has done runonce?: 0
14/08/12 - 02:39:24 PM :    portrait file path: titan/maps/casino/doors/door101.bam
14/08/12 - 02:39:24 PM :    BEGIN SCRIPT DATA DUMP
14/08/12 - 02:39:24 PM :     file path: titan/maps/casino/../../scripts/door.lua
14/08/12 - 02:39:24 PM :     contains global: "locked" = "1"
14/08/12 - 02:39:24 PM :     contains function: "activated"
14/08/12 - 02:39:24 PM :     contains function: "deinitialized"
14/08/12 - 02:39:24 PM :    END SCRIPT DATA DUMP
14/08/12 - 02:39:24 PM :    BEGIN SAVE DATA DUMP
14/08/12 - 02:39:24 PM :     (no saved data)
14/08/12 - 02:39:24 PM :    END SAVE DATA DUMP
14/08/12 - 02:39:24 PM :   END ENTITY DATA DUMP
14/08/12 - 02:39:24 PM :   BEGIN ENTITY DATA DUMP
14/08/12 - 02:39:24 PM :    entity name: Room 102
14/08/12 - 02:39:24 PM :    entity dimensions: 1,1
14/08/12 - 02:39:24 PM :    position: 13,23,0, layer: 0, map: "casino2"
14/08/12 - 02:39:24 PM :    char: -1, fg: -1, bg: -1
14/08/12 - 02:39:24 PM :    entity is hidden?: 0
14/08/12 - 02:39:24 PM :    entity is solid?: 1 (solid=1, overridesolid=-1)
14/08/12 - 02:39:24 PM :    entity has done runonce?: 0
14/08/12 - 02:39:24 PM :    portrait file path: titan/maps/casino/doors/door102.bam
14/08/12 - 02:39:24 PM :    BEGIN SCRIPT DATA DUMP
14/08/12 - 02:39:24 PM :     file path: titan/maps/casino/../../scripts/door.lua
14/08/12 - 02:39:24 PM :     contains global: "locked" = "1"
14/08/12 - 02:39:24 PM :     contains function: "activated"
14/08/12 - 02:39:24 PM :     contains function: "deinitialized"
14/08/12 - 02:39:24 PM :    END SCRIPT DATA DUMP
14/08/12 - 02:39:24 PM :    BEGIN SAVE DATA DUMP
14/08/12 - 02:39:24 PM :     (no saved data)
14/08/12 - 02:39:24 PM :    END SAVE DATA DUMP
14/08/12 - 02:39:24 PM :   END ENTITY DATA DUMP
14/08/12 - 02:39:24 PM :   BEGIN ENTITY DATA DUMP
14/08/12 - 02:39:24 PM :    entity name: Room 103
14/08/12 - 02:39:24 PM :    entity dimensions: 1,1
14/08/12 - 02:39:24 PM :    position: 13,28,0, layer: 0, map: "casino2"
14/08/12 - 02:39:24 PM :    char: -1, fg: -1, bg: -1
14/08/12 - 02:39:24 PM :    entity is hidden?: 0
14/08/12 - 02:39:24 PM :    entity is solid?: 1 (solid=1, overridesolid=-1)
14/08/12 - 02:39:24 PM :    entity has done runonce?: 0
14/08/12 - 02:39:24 PM :    portrait file path: titan/maps/casino/doors/door103.bam
14/08/12 - 02:39:24 PM :    BEGIN SCRIPT DATA DUMP
14/08/12 - 02:39:24 PM :     file path: titan/maps/casino/../../scripts/door.lua
14/08/12 - 02:39:24 PM :     contains global: "locked" = "1"
14/08/12 - 02:39:24 PM :     contains function: "activated"
14/08/12 - 02:39:24 PM :     contains function: "deinitialized"
14/08/12 - 02:39:24 PM :    END SCRIPT DATA DUMP
14/08/12 - 02:39:24 PM :    BEGIN SAVE DATA DUMP
14/08/12 - 02:39:24 PM :     (no saved data)
14/08/12 - 02:39:24 PM :    END SAVE DATA DUMP
14/08/12 - 02:39:24 PM :   END ENTITY DATA DUMP
14/08/12 - 02:39:24 PM :   BEGIN ENTITY DATA DUMP
14/08/12 - 02:39:24 PM :    entity name: Room 104
14/08/12 - 02:39:24 PM :    entity dimensions: 1,1
14/08/12 - 02:39:24 PM :    position: 13,33,0, layer: 0, map: "casino2"
14/08/12 - 02:39:24 PM :    char: -1, fg: -1, bg: -1
14/08/12 - 02:39:24 PM :    entity is hidden?: 0
14/08/12 - 02:39:24 PM :    entity is solid?: 1 (solid=1, overridesolid=-1)
14/08/12 - 02:39:24 PM :    entity has done runonce?: 0
14/08/12 - 02:39:24 PM :    portrait file path: titan/maps/casino/doors/door104.bam
14/08/12 - 02:39:24 PM :    BEGIN SCRIPT DATA DUMP
14/08/12 - 02:39:24 PM :     file path: titan/maps/casino/../../scripts/door.lua
14/08/12 - 02:39:24 PM :     contains global: "locked" = "1"
14/08/12 - 02:39:24 PM :     contains function: "activated"
14/08/12 - 02:39:24 PM :     contains function: "deinitialized"
14/08/12 - 02:39:24 PM :    END SCRIPT DATA DUMP
14/08/12 - 02:39:24 PM :    BEGIN SAVE DATA DUMP
14/08/12 - 02:39:24 PM :     (no saved data)
14/08/12 - 02:39:24 PM :    END SAVE DATA DUMP
14/08/12 - 02:39:24 PM :   END ENTITY DATA DUMP
14/08/12 - 02:39:24 PM :   BEGIN ENTITY DATA DUMP
14/08/12 - 02:39:24 PM :    entity name: Room 105
14/08/12 - 02:39:24 PM :    entity dimensions: 1,1
14/08/12 - 02:39:24 PM :    position: 34,13,0, layer: 0, map: "casino2"
14/08/12 - 02:39:24 PM :    char: -1, fg: -1, bg: -1
14/08/12 - 02:39:24 PM :    entity is hidden?: 0
14/08/12 - 02:39:24 PM :    entity is solid?: 1 (solid=1, overridesolid=-1)
14/08/12 - 02:39:24 PM :    entity has done runonce?: 0
14/08/12 - 02:39:24 PM :    portrait file path: titan/maps/casino/doors/door105.bam
14/08/12 - 02:39:24 PM :    BEGIN SCRIPT DATA DUMP
14/08/12 - 02:39:24 PM :     file path: titan/maps/casino/../../scripts/door.lua
14/08/12 - 02:39:24 PM :     contains global: "locked" = "1"
14/08/12 - 02:39:24 PM :     contains function: "activated"
14/08/12 - 02:39:24 PM :     contains function: "deinitialized"
14/08/12 - 02:39:24 PM :    END SCRIPT DATA DUMP
14/08/12 - 02:39:24 PM :    BEGIN SAVE DATA DUMP
14/08/12 - 02:39:24 PM :     (no saved data)
14/08/12 - 02:39:24 PM :    END SAVE DATA DUMP
14/08/12 - 02:39:24 PM :   END ENTITY DATA DUMP
14/08/12 - 02:39:24 PM :   BEGIN ENTITY DATA DUMP
14/08/12 - 02:39:24 PM :    entity name: Room 106
14/08/12 - 02:39:24 PM :    entity dimensions: 1,1
14/08/12 - 02:39:24 PM :    position: 34,18,0, layer: 0, map: "casino2"
14/08/12 - 02:39:24 PM :    char: -1, fg: -1, bg: -1
14/08/12 - 02:39:24 PM :    entity is hidden?: 0
14/08/12 - 02:39:24 PM :    entity is solid?: 1 (solid=1, overridesolid=-1)
14/08/12 - 02:39:24 PM :    entity has done runonce?: 0
14/08/12 - 02:39:24 PM :    portrait file path: titan/maps/casino/doors/door106.bam
14/08/12 - 02:39:24 PM :    BEGIN SCRIPT DATA DUMP
14/08/12 - 02:39:24 PM :     file path: titan/maps/casino/../../scripts/door.lua
14/08/12 - 02:39:24 PM :     contains global: "keydata" = "Casino Room 106 Key"
14/08/12 - 02:39:24 PM :     contains global: "locked" = "1"
14/08/12 - 02:39:24 PM :     contains global: "targetmap" = "casino3"
14/08/12 - 02:39:24 PM :     contains global: "targetx" = "9"
14/08/12 - 02:39:24 PM :     contains global: "targety" = "3"
14/08/12 - 02:39:24 PM :     contains function: "activated"
14/08/12 - 02:39:24 PM :     contains function: "deinitialized"
14/08/12 - 02:39:24 PM :    END SCRIPT DATA DUMP
14/08/12 - 02:39:24 PM :    BEGIN SAVE DATA DUMP
14/08/12 - 02:39:24 PM :     (no saved data)
14/08/12 - 02:39:24 PM :    END SAVE DATA DUMP
14/08/12 - 02:39:24 PM :   END ENTITY DATA DUMP
14/08/12 - 02:39:24 PM :   BEGIN ENTITY DATA DUMP
14/08/12 - 02:39:24 PM :    entity name: Room 107
14/08/12 - 02:39:24 PM :    entity dimensions: 1,1
14/08/12 - 02:39:24 PM :    position: 34,23,0, layer: 0, map: "casino2"
14/08/12 - 02:39:24 PM :    char: -1, fg: -1, bg: -1
14/08/12 - 02:39:24 PM :    entity is hidden?: 0
14/08/12 - 02:39:24 PM :    entity is solid?: 1 (solid=1, overridesolid=-1)
14/08/12 - 02:39:24 PM :    entity has done runonce?: 0
14/08/12 - 02:39:24 PM :    portrait file path: titan/maps/casino/doors/door107.bam
14/08/12 - 02:39:24 PM :    BEGIN SCRIPT DATA DUMP
14/08/12 - 02:39:24 PM :     file path: titan/maps/casino/../../scripts/door.lua
14/08/12 - 02:39:24 PM :     contains global: "locked" = "1"
14/08/12 - 02:39:24 PM :     contains function: "activated"
14/08/12 - 02:39:24 PM :     contains function: "deinitialized"
14/08/12 - 02:39:24 PM :    END SCRIPT DATA DUMP
14/08/12 - 02:39:24 PM :    BEGIN SAVE DATA DUMP
14/08/12 - 02:39:24 PM :     (no saved data)
14/08/12 - 02:39:24 PM :    END SAVE DATA DUMP
14/08/12 - 02:39:24 PM :   END ENTITY DATA DUMP
14/08/12 - 02:39:24 PM :   BEGIN ENTITY DATA DUMP
14/08/12 - 02:39:24 PM :    entity name: Room 108
14/08/12 - 02:39:24 PM :    entity dimensions: 1,1
14/08/12 - 02:39:24 PM :    position: 34,28,0, layer: 0, map: "casino2"
14/08/12 - 02:39:24 PM :    char: -1, fg: -1, bg: -1
14/08/12 - 02:39:24 PM :    entity is hidden?: 0
14/08/12 - 02:39:24 PM :    entity is solid?: 1 (solid=1, overridesolid=-1)
14/08/12 - 02:39:24 PM :    entity has done runonce?: 0
14/08/12 - 02:39:24 PM :    portrait file path: titan/maps/casino/doors/door108.bam
14/08/12 - 02:39:24 PM :    BEGIN SCRIPT DATA DUMP
14/08/12 - 02:39:24 PM :     file path: titan/maps/casino/../../scripts/door.lua
14/08/12 - 02:39:24 PM :     contains global: "locked" = "1"
14/08/12 - 02:39:24 PM :     contains function: "activated"
14/08/12 - 02:39:24 PM :     contains function: "deinitialized"
14/08/12 - 02:39:24 PM :    END SCRIPT DATA DUMP
14/08/12 - 02:39:24 PM :    BEGIN SAVE DATA DUMP
14/08/12 - 02:39:24 PM :     (no saved data)
14/08/12 - 02:39:24 PM :    END SAVE DATA DUMP
14/08/12 - 02:39:24 PM :   END ENTITY DATA DUMP
14/08/12 - 02:39:24 PM :   BEGIN ENTITY DATA DUMP
14/08/12 - 02:39:24 PM :    entity name: Room 109
14/08/12 - 02:39:24 PM :    entity dimensions: 1,1
14/08/12 - 02:39:24 PM :    position: 34,33,0, layer: 0, map: "casino2"
14/08/12 - 02:39:24 PM :    char: -1, fg: -1, bg: -1
14/08/12 - 02:39:24 PM :    entity is hidden?: 0
14/08/12 - 02:39:24 PM :    entity is solid?: 1 (solid=1, overridesolid=-1)
14/08/12 - 02:39:24 PM :    entity has done runonce?: 0
14/08/12 - 02:39:24 PM :    portrait file path: titan/maps/casino/doors/door109.bam
14/08/12 - 02:39:24 PM :    BEGIN SCRIPT DATA DUMP
14/08/12 - 02:39:24 PM :     file path: titan/maps/casino/../../scripts/door.lua
14/08/12 - 02:39:24 PM :     contains global: "locked" = "1"
14/08/12 - 02:39:24 PM :     contains function: "activated"
14/08/12 - 02:39:24 PM :     contains function: "deinitialized"
14/08/12 - 02:39:24 PM :    END SCRIPT DATA DUMP
14/08/12 - 02:39:24 PM :    BEGIN SAVE DATA DUMP
14/08/12 - 02:39:24 PM :     (no saved data)
14/08/12 - 02:39:24 PM :    END SAVE DATA DUMP
14/08/12 - 02:39:24 PM :   END ENTITY DATA DUMP
14/08/12 - 02:39:24 PM :   BEGIN ENTITY DATA DUMP
14/08/12 - 02:39:24 PM :    entity name: Vick
14/08/12 - 02:39:24 PM :    entity dimensions: 1,1
14/08/12 - 02:39:24 PM :    position: 38,32,0, layer: 0, map: "casino2"
14/08/12 - 02:39:24 PM :    char: 64 (@), fg: 8, bg: 9
14/08/12 - 02:39:24 PM :    entity is hidden?: 0
14/08/12 - 02:39:24 PM :    entity is solid?: 1 (solid=1, overridesolid=-1)
14/08/12 - 02:39:24 PM :    entity has done runonce?: 0
14/08/12 - 02:39:24 PM :    portrait file path: titan/graphics/portraits/vick.bam
14/08/12 - 02:39:24 PM :    BEGIN SCRIPT DATA DUMP
14/08/12 - 02:39:24 PM :     file path:
14/08/12 - 02:39:24 PM :    END SCRIPT DATA DUMP
14/08/12 - 02:39:24 PM :    BEGIN SAVE DATA DUMP
14/08/12 - 02:39:24 PM :     (no saved data)
14/08/12 - 02:39:24 PM :    END SAVE DATA DUMP
14/08/12 - 02:39:24 PM :   END ENTITY DATA DUMP
14/08/12 - 02:39:24 PM :  END MAP DATA DUMP
14/08/12 - 02:39:24 PM : END GAME DATA DUMP
Logged

_Madk
Level 10
*****

Love, love is a verb Love is a doing word ~♪


View Profile
« Reply #14 on: August 15, 2012, 06:34:39 AM »

having lots of fun moving some of the hardcoded things out of the engine and into the scripts

player.lua:

Code:
function runonce()
entityaddbindaction("this",90) -- z
entityaddbindaction("this",13) -- enter
entityaddbindup("this",38) -- up arrow
entityaddbinddown("this",40) -- down arrow
entityaddbindleft("this",37) -- left arrow
entityaddbindright("this",39) -- right arrow
entityaddbindup("this",87) -- w
entityaddbinddown("this",83) -- s
entityaddbindleft("this",65) -- a
entityaddbindright("this",68) -- d
entityaddbindsprint("this",160) -- left shift
entityaddbindsprint("this",161) -- right shift
end
function initialized()
bindcamera()
end
function main()
bindcamera()
end
function bindcamera()
local mymap=getentitymap("this")
local screenw=getscreenwidth()
local screenh=getscreenheight()
setcameramap(mymap)
local cx=math.floor(getentityx("this")-(screenw/2))
local cy=math.floor(getentityy("this")-(screenh/2))
local cxlim=(getmapwidth(mymap)-screenw)
local cylim=(getmapheight(mymap)-screenh)
if cx>cxlim then
cx=cxlim
end
if cy>cylim then
cy=cylim
end
if cx<0 then
cx=0
end
if cy<0 then
cy=0
end
setcamerax(cx)
setcameray(cy)
end
Logged

Pages: [1] 2 3 ... 20
Print
Jump to:  

Theme orange-lt created by panic