<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Maratis forum - Object Oriented Programming in Maratis(LUA)(Tutorial)]]></title>
		<link>http://forum.maratis3d.com/viewtopic.php?id=839</link>
		<description><![CDATA[The most recent posts in Object Oriented Programming in Maratis(LUA)(Tutorial).]]></description>
		<lastBuildDate>Sun, 09 Mar 2014 17:44:23 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Object Oriented Programming in Maratis(LUA)(Tutorial)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6587#p6587</link>
			<description><![CDATA[<p>Yeah, lua is looking more flexible every day. I think I need to learn some of the other languages alongside lua so I can actually see the flexibility of it.</p>]]></description>
			<author><![CDATA[dummy@example.com (Tutorial Doctor)]]></author>
			<pubDate>Sun, 09 Mar 2014 17:44:23 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6587#p6587</guid>
		</item>
		<item>
			<title><![CDATA[Re: Object Oriented Programming in Maratis(LUA)(Tutorial)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6585#p6585</link>
			<description><![CDATA[<div class="quotebox"><blockquote><p>function foo() end&nbsp; foo = function() end</p></blockquote></div><p> <br />in the Cryengine used to this style of programming. <br />also it is possible in javascript to write. </p><div class="quotebox"><blockquote><p>joe = {name =nil, age =nil, gender =nil}&nbsp; &nbsp;<br />joe.name = &quot;Joseph&quot;&nbsp; <br />joe.age = &quot;24&quot;&nbsp; <br />joe.gender = &quot;Male&quot;</p></blockquote></div><p> <br />what&#039;s special? Lua allows you to do much more interesting things!</p>]]></description>
			<author><![CDATA[dummy@example.com (ant0n)]]></author>
			<pubDate>Sun, 09 Mar 2014 14:08:57 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6585#p6585</guid>
		</item>
		<item>
			<title><![CDATA[Re: Object Oriented Programming in Maratis(LUA)(Tutorial)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6580#p6580</link>
			<description><![CDATA[<div class="codebox"><pre><code>joe = {name =nil, age =nil, gender =nil}

joe.name = &quot;Joseph&quot;
joe.age = &quot;24&quot;
joe.gender = &quot;Male&quot;</code></pre></div><p>I am wondering if such code would work, and I am wondering if I could put functions into the table also to do simpler OOP.</p>]]></description>
			<author><![CDATA[dummy@example.com (Tutorial Doctor)]]></author>
			<pubDate>Sat, 08 Mar 2014 18:33:18 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6580#p6580</guid>
		</item>
		<item>
			<title><![CDATA[Re: Object Oriented Programming in Maratis(LUA)(Tutorial)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6534#p6534</link>
			<description><![CDATA[<p>I stumbled across something interesting when wondering if I can use a function as an argument:<br /><a href="http://stackoverflow.com/questions/16984540/how-to-pass-a-function-as-a-parameter-in-lua">http://stackoverflow.com/questions/1698 &#133; ter-in-lua</a></p><div class="codebox"><pre><code>function init() 
     print(&quot;init&quot;);
end

block = { 
     startup = init
}</code></pre></div><p>They also say the two examples below are the same:<br /></p><div class="codebox"><pre><code>function foo()
end

foo = function()
end</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (Tutorial Doctor)]]></author>
			<pubDate>Sun, 02 Mar 2014 19:38:55 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6534#p6534</guid>
		</item>
		<item>
			<title><![CDATA[Re: Object Oriented Programming in Maratis(LUA)(Tutorial)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6259#p6259</link>
			<description><![CDATA[<p>Ah hell, i tought it was ok, but the problem&#039;s not gone -.-<br />I&#039;m gonna make a detailed topic about it later today, because there&#039;s also other stuff that&#039;s not working correctly <img src="http://forum.maratis3d.com/img/smilies/sad.png" width="15" height="15" alt="sad" /></p>]]></description>
			<author><![CDATA[dummy@example.com (Vegas)]]></author>
			<pubDate>Tue, 28 Jan 2014 05:11:50 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6259#p6259</guid>
		</item>
		<item>
			<title><![CDATA[Re: Object Oriented Programming in Maratis(LUA)(Tutorial)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6064#p6064</link>
			<description><![CDATA[<p>Great ! you even fixed my spawpoints, i always wondered how to spawn clones like that, thanks alot <img src="http://forum.maratis3d.com/img/smilies/wink.png" width="15" height="15" alt="wink" /></p>]]></description>
			<author><![CDATA[dummy@example.com (Vegas)]]></author>
			<pubDate>Fri, 06 Dec 2013 18:59:44 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6064#p6064</guid>
		</item>
		<item>
			<title><![CDATA[Re: Object Oriented Programming in Maratis(LUA)(Tutorial)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6063#p6063</link>
			<description><![CDATA[<p>finish! I spawned about 200 clones and all works well!<br />And I made a small optimization in the code, now Spawnpoints.lua looks shorter. <img src="http://forum.maratis3d.com/img/smilies/wink.png" width="15" height="15" alt="wink" /><br /><a href="http://rghost.ru/download/50726335/56fa6fbc239d4c1326e71503c5a92accb58d747b/56fa6fbc239d4c1326e71503c5a92accb58d747b/testarea.7z"> testarea.7z </a></p>]]></description>
			<author><![CDATA[dummy@example.com (ant0n)]]></author>
			<pubDate>Fri, 06 Dec 2013 08:05:33 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6063#p6063</guid>
		</item>
		<item>
			<title><![CDATA[Re: Object Oriented Programming in Maratis(LUA)(Tutorial)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6062#p6062</link>
			<description><![CDATA[<p>Right, i cleaned everything and keep the fastest way to make the game bug </p><p><a href="https://dl.dropboxusercontent.com/u/19970067/testarea.rar">Test Project</a></p><p>Press &quot;S&quot; to spawn clones, they will follow a path. I used<br />isCollisionBetween() -&gt; setBehaviorVariable()</p><p>It&#039;s starting to freeze when i spawned about 27~</p><p>If that&#039;s not enough i can&nbsp; upload another example later, where the same freeze stuff happen when shooting some projectiles. It just take something like 150~ clones to start freezing but in the end the result is the same<br />&nbsp; &nbsp; <br />Sidenote, I&#039;ll be back late today, got stuff to do <img src="http://forum.maratis3d.com/img/smilies/sad.png" width="15" height="15" alt="sad" /></p><p>Thanks for your help !</p>]]></description>
			<author><![CDATA[dummy@example.com (Vegas)]]></author>
			<pubDate>Fri, 06 Dec 2013 04:41:17 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6062#p6062</guid>
		</item>
		<item>
			<title><![CDATA[Re: Object Oriented Programming in Maratis(LUA)(Tutorial)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6061#p6061</link>
			<description><![CDATA[<p>Hi Vegas! <br /></p><div class="quotebox"><blockquote><p>I could upload a test project if u wish</p></blockquote></div><p>Yes, it will be easier for us to deal with it. <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (ant0n)]]></author>
			<pubDate>Fri, 06 Dec 2013 03:08:13 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6061#p6061</guid>
		</item>
		<item>
			<title><![CDATA[Re: Object Oriented Programming in Maratis(LUA)(Tutorial)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6060#p6060</link>
			<description><![CDATA[<p>Hi ant0n, there&#039;s a last problem ;</p><p>The crazy frame rate drop still exist, but i think i know what is it.</p><p>In my theory that&#039;s because the items in the table stay active all the time.<br />When you have a long behavior for an object, even if the object got deactivated, the entry in the table is not, and it&#039;s still running in the background, so it&#039;s almost&nbsp; the same as if the object wasn&#039;t deactivated. <br />Then after a while, the table just gets too big and the game crash no matter what.</p><p>Note it&#039;s only my theory, maybe it&#039;s a lot of bull. But i don&#039;t see what else it can be</p><p>For now i&#039;ve tried to remove items from the table/reset the table when my object collide with another object <br />but as usual, nothing worked.</p><p>Looks like i need your help again <img src="http://forum.maratis3d.com/img/smilies/hmm.png" width="15" height="15" alt="hmm" /></p><p>I could upload a test project if u wish</p>]]></description>
			<author><![CDATA[dummy@example.com (Vegas)]]></author>
			<pubDate>Thu, 05 Dec 2013 23:45:37 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6060#p6060</guid>
		</item>
		<item>
			<title><![CDATA[Re: Object Oriented Programming in Maratis(LUA)(Tutorial)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6047#p6047</link>
			<description><![CDATA[<p>thanks Tutorial Doctor! <img src="http://forum.maratis3d.com/img/smilies/wink.png" width="15" height="15" alt="wink" /></p>]]></description>
			<author><![CDATA[dummy@example.com (ant0n)]]></author>
			<pubDate>Sun, 01 Dec 2013 01:36:04 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6047#p6047</guid>
		</item>
		<item>
			<title><![CDATA[Re: Object Oriented Programming in Maratis(LUA)(Tutorial)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6046#p6046</link>
			<description><![CDATA[<p>Good example ant0n (post # 16)</p>]]></description>
			<author><![CDATA[dummy@example.com (Tutorial Doctor)]]></author>
			<pubDate>Sun, 01 Dec 2013 01:19:36 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6046#p6046</guid>
		</item>
		<item>
			<title><![CDATA[Re: Object Oriented Programming in Maratis(LUA)(Tutorial)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6045#p6045</link>
			<description><![CDATA[<p>I am glad I could help...<br />by the way, I made a typo in the previous example.<br />in Apple:create(name, color) instead::<br /></p><div class="codebox"><pre><code>app.color = red</code></pre></div><p>you need to:<br /></p><div class="codebox"><pre><code>app.color = color</code></pre></div><p>fixed that.</p>]]></description>
			<author><![CDATA[dummy@example.com (ant0n)]]></author>
			<pubDate>Sat, 30 Nov 2013 14:53:50 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6045#p6045</guid>
		</item>
		<item>
			<title><![CDATA[Re: Object Oriented Programming in Maratis(LUA)(Tutorial)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6044#p6044</link>
			<description><![CDATA[<p>Perfect ! Thanks so much !! *cry*<br />This stuff bugged me for so long !</p>]]></description>
			<author><![CDATA[dummy@example.com (Vegas)]]></author>
			<pubDate>Sat, 30 Nov 2013 13:14:10 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6044#p6044</guid>
		</item>
		<item>
			<title><![CDATA[Re: Object Oriented Programming in Maratis(LUA)(Tutorial)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=6043#p6043</link>
			<description><![CDATA[<p>I hope this will help you understand:<br /></p><div class="codebox"><pre><code>Apple = {}
function Apple:create(name, color)
    local app = {}
    app.color = color 
    app.name = name
    app.mass = 10
    
    setmetatable(app,self)
    self.__index = self
    return app
end

appleList = {}

-- CREATE INSTANCE
appleList[1] = Apple:create(&quot;apple1&quot;, &quot;red&quot;)
appleList[2] = Apple:create(&quot;apple2&quot;, &quot;green&quot;)

-- PROFIT!
print (&quot;name=&quot;..appleList[1].name..&quot; color=&quot;..appleList[1].color..&quot; mass=&quot;..appleList[1].mass) 
-- RESULT          name=apple1 color=red mass=10

print (&quot;name=&quot;..appleList[2].name..&quot; color=&quot;..appleList[2].color..&quot; mass=&quot;..appleList[2].mass) 
-- RESULT          name=apple2 color=green mass=10</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (ant0n)]]></author>
			<pubDate>Sat, 30 Nov 2013 10:36:37 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=6043#p6043</guid>
		</item>
	</channel>
</rss>
