<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title><![CDATA[ dynamic music system worklog on Boolean Soup ]]></title>
<link><![CDATA[ http://booleansoup.com/index.php?p=43&m=viewworklog&id=73 ]]></link>
<description><![CDATA[ working on my graduation project which will be a dynamic music system ]]></description>
<language>en-us</language>
<pubDate>Fri, 10 Apr 2026 00:23:36 GMT</pubDate>
<item>
<title><![CDATA[ System working ]]></title>
<link><![CDATA[ http://booleansoup.com/index.php?p=43&m=viewpost&id=269 ]]></link>
<description><![CDATA[ I had so many distractions last couple of years that i keep procrastinating graduation and everything. I&#039;ve been working on a graduation project about music that is altered compared to the action that happened on the screen, AKA dynamic music. It&#039;s still in an early phase. I&#039;ve been working on making an engine first. All objects and the music is scripted with lua scripts. In fact the scripts are very easy to work with and test things. I can even change a script on the run. The level editor i worked on has just a few lines of scripting code, most of them initializing code.

Example for a tilemap scroll window
Code:map&nbsp;=&nbsp;tilemap:new(&nbsp;500,&nbsp;500,&nbsp;1&nbsp;) map:load(&quot;mytilemap.map&quot;) g_Scroll[&nbsp;0&nbsp;].map&nbsp;=&nbsp;map g_Scroll[&nbsp;0&nbsp;].active&nbsp;=&nbsp;true g_Scroll[&nbsp;0&nbsp;].x1&nbsp;=&nbsp;0 g_Scroll[&nbsp;0&nbsp;].x2&nbsp;=&nbsp;640 g_Scroll[&nbsp;0&nbsp;].y1&nbsp;=&nbsp;0 g_Scroll[&nbsp;0&nbsp;].y2&nbsp;=&nbsp;400 g_Scroll[&nbsp;0&nbsp;].file&nbsp;=&nbsp;loadFile(&nbsp;&quot;tiles.pic&quot;&nbsp;) g_Scroll[&nbsp;0&nbsp;].graph&nbsp;=&nbsp;1&nbsp;&nbsp;&nbsp;--graph&nbsp;1&nbsp;contains&nbsp;all&nbsp;tiles g_Scroll[&nbsp;0&nbsp;].tileWidth&nbsp;=&nbsp;32 g_Scroll[&nbsp;0&nbsp;].tileHeight&nbsp;=&nbsp;32 g_Scroll[&nbsp;0&nbsp;].camera&nbsp;=&nbsp;process:new(&quot;player.lua&quot;,&nbsp;this&nbsp;) 

Graphics are done with opengl. All you have to do is place all your graphics numbered in a directory, e.g. tiles\1.png, tiles\2.png and then run &quot;graphicmaker.exe tiles&quot; to make a tiles.pic file that you can use.
Then all a script has to do is for example
Code:this.m_File&nbsp;=&nbsp;loadFile&nbsp;(&nbsp;&quot;tiles.pic&quot;&nbsp;) this.m_Graph&nbsp;=&nbsp;1 function&nbsp;frame() &nbsp;&nbsp;&nbsp;if&nbsp;(&nbsp;Mouse.left&nbsp;)&nbsp;then &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.m_Graph&nbsp;=&nbsp;this.m_Graph&nbsp;+&nbsp;1 &nbsp;&nbsp;&nbsp;end &nbsp;&nbsp;&nbsp;if&nbsp;(&nbsp;Mouse.right&nbsp;)&nbsp;then &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.m_Graph&nbsp;=&nbsp;this.m_Graph&nbsp;-&nbsp;1 &nbsp;&nbsp;&nbsp;end &nbsp;&nbsp;&nbsp;this.m_X&nbsp;=&nbsp;Mouse.x; &nbsp;&nbsp;&nbsp;this.m_Y&nbsp;=&nbsp;Mouse.y; end 
The same goes for music scripting where i&#039;ll make my dynamic music code(and the actual graduating for me)
Code:this:playMidiTrack(&nbsp;&quot;test.mid&quot;,&nbsp;1&nbsp;) this:ChangeInstrument(&nbsp;MUS_ACOUSTICGUITAR&nbsp;) while(&nbsp;true&nbsp;)&nbsp;do &nbsp;&nbsp;&nbsp;this:noteOn(&nbsp;80&nbsp;); &nbsp;&nbsp;&nbsp;this:wait(&nbsp;1&nbsp;); &nbsp;&nbsp;&nbsp;this:noteOff(&nbsp;80&nbsp;); end 


I based the programming a bit on div games studio even though some things are bit more complicated because of the way lua works. There are still some extra advantages like placing processes in subgroups where each subgroup has a different function( game paused, main menu, game, level editor ), so it&#039;s very easy to program these things compared to div games studio.

A feature i want is that the picture files also contain static 3d models and have them a graphic number assigned to them. The testing game will be a 2D platform game(my favorite game genre).
I&#039;ll probably continue working on it even after graduating with a full working engine. ]]></description>
<pubDate>Sat, 16 Aug 2008 13:58:27 GMT</pubDate>
<guid><![CDATA[ http://booleansoup.com/index.php?p=43&m=viewpost&id=269 ]]></guid>
</item>
</channel>
</rss>