DSB Version 0.16

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting. You may Image to help finance the hosting costs of this forum.
Post Reply
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

DSB Version 0.16

Post by Sophia »

What's new:

- Now able to specify an object's attack methods as a table-returning function
- Added: dsb_replace_condition to change a condition on the fly
- Added: dsb_update_strings to change system strings on the fly
- Added sys_inventory_* hooks
- Added dsb_fullscreen - Fullscreen "cut scenes"/etc. mode
- Fixed stairs bug

Additionally, I added a "poison bar" to the test dungeon that shows how poisoned a given character is. It was mainly to see if it could be done (it could :D ) but I think it's kind of a neat effect. The poison bar is implemented all in Lua of course. ;)
User avatar
Joramun
Mon Master
Posts: 927
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Post by Joramun »

Nice effects for both the bar and the dragon show !

In the dragon show code, I don't understand everything :

What does dsb_fullscreen(arg1,arg2,arg3,arg4) exactly do ?
The arguments for the display functions (x,y,b etc.) seem to come from nowhere !
What Is Your Quest ?
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

A description of dsb_fullscreen from the list of functions:
  • dsb_fullscreen(bitmap_or_func, click_func, update_func, mouse)
    This engages the full-screen renderer, and is used for cut scenes or other interludes. If the first parameter passed is a bitmap, that bitmap will be displayed. If the first parameter is instead a function, that function will be executed every frame. The draw function will be passed the bitmap to draw to, the mouse's x location, and the mouse's y location.
    draw_function(bitmap, mouse_x, mouse_y)
    The click_func, if provided, will be executed every time the mouse is clicked. It is of the form:
    click_func(mouse_x, mouse_y, mouse_buttons)
    Update_func, if provided, will be executed every game tick. It takes no parameters.
    If mouse is nil or false, no mouse pointer will be drawn. If it is true, the standard "yellow arrow" mouse pointer will be drawn. If it is a bitmap, that bitmap will be drawn as the mouse pointer.
    The full-screen renderer will run until any of its associated functions returns something other than false or nil.
If you have any other questions, feel free to ask. :)
The arguments don't actually "come from nowhere," the functions are passed to dsb_fullscreen when the mode starts up and then called by the engine with the appropriate parameters at the appropriate times.
Post Reply