<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Maratis forum - Some basics.]]></title>
	<link rel="self" href="http://forum.maratis3d.com/extern.php?action=feed&amp;tid=500&amp;type=atom"/>
	<updated>2013-09-17T19:39:53Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.maratis3d.com/viewtopic.php?id=500</id>
		<entry>
			<title type="html"><![CDATA[Re: Some basics.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=4993#p4993"/>
			<content type="html"><![CDATA[<p>It can clearly save time and seems pretty easy to use, I have used lua since christmas and this seems effective. So thanks for the link, I&#039;m sure I will have some use for it. <img src="http://forum.maratis3d.com/img/smilies/wink.png" width="15" height="15" alt="wink" /></p>]]></content>
			<author>
				<name><![CDATA[Pär]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1252</uri>
			</author>
			<updated>2013-09-17T19:39:53Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=4993#p4993</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Some basics.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=4991#p4991"/>
			<content type="html"><![CDATA[<p>HI par,</p><p>This may help, that instead of you having to reinvent the wheel ( where you could concentrate on other things in your game instead) you could bring it into Maratis, though I have no idea how that would be done , my self not&nbsp; being a master programmer , but anyway its here:</p><p><a href="http://code.google.com/p/raick/wiki/Lua">http://code.google.com/p/raick/wiki/Lua</a></p><p>I clearly have no idea if its what you&#039;re after but it might save you valuable time if it is, and help others as well looking for similar things.</p>]]></content>
			<author>
				<name><![CDATA[VeganDev]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=18</uri>
			</author>
			<updated>2013-09-17T17:31:17Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=4991#p4991</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Some basics.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=4989#p4989"/>
			<content type="html"><![CDATA[<p>Thanks for the long explanation. I think it works, sound like a good idea.</p><p>I like the seeing, a big cone. Haha <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>I&#039;m right now making an AI-system, it&#039;s the most fun of it all. Right now I&#039;m trying to figure out how to make objects look at certain objects using the Z-angle. Trying to do the math. Gonna keep it up. So thanks for the answer. <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[Pär]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1252</uri>
			</author>
			<updated>2013-09-17T15:01:59Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=4989#p4989</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Some basics.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=4521#p4521"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>Pär wrote:</cite><blockquote><p>I have made a working ammo-system now and I&#039;m about to script an AI system. Is there any good ways to go about this?<br />I will also script some kind of a hitbox, I&#039;m not sure how to do this as well. </p><p>/P</p></blockquote></div><p>Hey Par! I have been waiting to share some ideas about the way my idea of a game engine would work, and I have thought of an AI system (at least how it would work). </p><p>I think the best AI system is one that simulates our own intelligence in real life. All humans have 5 senses. Sight, Hearing, Smell, Taste, and Touch. </p><p>If you build a SENSES SYSTEM, then you can give whatever object you want a sense of Artificial Intelligence. You basically create some SENSE OBJECTS. I will give a brief demo:</p><p>TOUCH:<br />Touch is basically simulated using COLLISION detection. Giving an entity the ability to sense when it is colliding with something is simulating the sense of TOUCH. </p><p>SIGHT: <br />Sight also uses collision detection. Attach a CONE to the front of an object. This will be the FIELD OF VIEW. Anything that collides with the cone is SEEN! (The cone must not have physics. In other words, it shouldn&#039;t react to the collision). The width of the cone simulates how wide the object can SEE. The transparency of the cone would simulate how WELL the object can see (more transparent means worse sight). The LENGTH of the cone would simulate near or farsightedness. </p><p>HEARING:<br />Hearing uses a PROXIMITY system. The closer you get to an object that makes sound, the HIGHER THE VOLUME and PITCH of an object gets (Doppler effect). The Hearing() function basically turns up the volume of an object the closer you get. You could also use a SPHERE as your FIELD OF HEARING and make a proximity system based on how far an object is from the center of the sphere. </p><p>SMELL:<br />Smell uses a PARTICLE SYSTEM. Odors act more like particles. The smell system is just a sphere that can detect when a particle has entered it. If a particle has entered the sphere that particle system is SMELLED! </p><p>TASTE:<br />Taste&nbsp; is just a collision detection also. Works like the TOUCH system. But the taste object is just located near a mouth. </p><br /><p>All these senses are FUNCTIONS:</p><p>Touch()<br />See()<br />Hear()<br />Smell()<br />Taste()</p><p>And all the things they can sense are entities/objects:</p><p>box<br />man<br />radio<br />particleSystemGas<br />meat</p><p>And when these senses get triggered, things happen:</p><p>Fall()<br />Wave()<br />Dance()<br />Frown()<br />RubTummy()</p><p>Take Care!</p><p>-TD</p>]]></content>
			<author>
				<name><![CDATA[Tutorial Doctor]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2493</uri>
			</author>
			<updated>2013-08-07T07:10:47Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=4521#p4521</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Some basics.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=3101#p3101"/>
			<content type="html"><![CDATA[<p>I have made a working ammo-system now and I&#039;m about to script an AI system. Is there any good ways to go about this?<br />I will also script some kind of a hitbox, I&#039;m not sure how to do this as well. </p><p>/P</p>]]></content>
			<author>
				<name><![CDATA[Pär]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1252</uri>
			</author>
			<updated>2012-12-28T09:44:49Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=3101#p3101</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Some basics.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=3099#p3099"/>
			<content type="html"><![CDATA[<p>THATS AWESOME! Imagine the possibilities with this! <img src="http://forum.maratis3d.com/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /> Thanks for the help.</p>]]></content>
			<author>
				<name><![CDATA[Pär]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1252</uri>
			</author>
			<updated>2012-12-27T15:50:51Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=3099#p3099</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Some basics.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=3098#p3098"/>
			<content type="html"><![CDATA[<p>It&#039;s not &quot;IsKeyPressed&quot; it&#039;s &quot;isKeyPressed&quot; :</p><div class="codebox"><pre><code>text = getObject(&quot;text&quot;)
val = 0

function increment(i)
    return i + 1
end

function onSceneUpdate()
    setText(text, val)
    if isKeyPressed(&quot;W&quot;) then
        val = increment(val) -- Calling function increment
    end
end</code></pre></div><p>It&#039;s named increment only for logic sake.<br />Function arguments are only local to the function so it&#039;s generic like a rule or a mathematical function.<br />When you call the function you pass it any variable in argument.</p>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2012-12-27T14:18:16Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=3098#p3098</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Some basics.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=3097#p3097"/>
			<content type="html"><![CDATA[<p>Does it have to be named increment or is it just for the logic sake?</p><p>So val is automatically switched to i in the code? </p><p>I copy pasted this code but it doesn&#039;t work, I press W but it doesn&#039;t change to 1. <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[Pär]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1252</uri>
			</author>
			<updated>2012-12-27T11:36:16Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=3097#p3097</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Some basics.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=3096#p3096"/>
			<content type="html"><![CDATA[<p>I&#039;ll also suggest you should not use the same name &quot;i&quot; for the argument and the global variable to not be confused :</p><div class="codebox"><pre><code>text = getObject(&quot;text&quot;)
val = 0

function increment(i)
    return i + 1
end

function onSceneUpdate()
    setText(text, val)
    if IsKeyPressed(&quot;W&quot;) then
        val = increment(val) -- Calling function increment
    end
end</code></pre></div>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2012-12-27T11:15:32Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=3096#p3096</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Some basics.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=3095#p3095"/>
			<content type="html"><![CDATA[<p>Using &quot;return&quot; in a function means that the function return the result when you call it,<br />it means in your case that you have to write &quot;if IsKeyPressed(&quot;W&quot;) then i = increment(i)&quot;</p>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2012-12-27T11:13:31Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=3095#p3095</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Some basics.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=3094#p3094"/>
			<content type="html"><![CDATA[<p>Now I have analysed all the demos, did the tutorial on youtube from part 1-9 and last but not least watched a great tutorial on lua scripting. :) Linking it here: <a href="http://www.youtube.com/watch?v=dHURyRLMOK0">http://www.youtube.com/watch?v=dHURyRLMOK0</a> and the rest continues by text on this website: <a href="http://www.dev-hq.net/lua/1--introduction-and-setup">http://www.dev-hq.net/lua/1--introduction-and-setup</a></p><p>So I figure I could write this code:</p><p>text = getObject(&quot;text&quot;)<br />i = 0</p><br /><p>function increment(i)<br />return i + 1<br />end</p><br /><p>function onSceneUpdate()<br />setText(text, i)<br />if IsKeyPressed(&quot;W&quot;) then increment() -- Calling function increment<br />end</p><p>I was wrong, it don&#039;t work. What am I doing wrong? :)</p>]]></content>
			<author>
				<name><![CDATA[Pär]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1252</uri>
			</author>
			<updated>2012-12-27T02:51:47Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=3094#p3094</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Some basics.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=3092#p3092"/>
			<content type="html"><![CDATA[<p>Thanks, I didn&#039;t see that one about the coins. <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[Pär]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1252</uri>
			</author>
			<updated>2012-12-26T14:20:48Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=3092#p3092</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Some basics.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=3078#p3078"/>
			<content type="html"><![CDATA[<p>When i began utilizing this Engine, i had 0 knowledge of lua or c++ ( i still dont know C or C++) but some basics were easy to grasp by following the tutorials here:</p><p><a href="http://forum.maratis3d.com/viewtopic.php?pid=2754#p2754">http://forum.maratis3d.com/viewtopic.php?pid=2754#p2754</a></p><p>and grabbing some of the examples on the main page of Maratis3d.com and analyzing the code. hope this helps.</p>]]></content>
			<author>
				<name><![CDATA[damvcoool]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1169</uri>
			</author>
			<updated>2012-12-23T21:09:13Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=3078#p3078</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Some basics.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=3076#p3076"/>
			<content type="html"><![CDATA[<p>I feel like I need to learn basic lua scripting first. I have learnt Lua first by using the Love2D engine, but it seems that kind of scripting doesn&#039;t apply here. Is there a good tutorial on lua scripting which apply on the Maratis engine?</p>]]></content>
			<author>
				<name><![CDATA[Pär]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1252</uri>
			</author>
			<updated>2012-12-23T12:33:57Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=3076#p3076</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Some basics.]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=3075#p3075"/>
			<content type="html"><![CDATA[<p>It depend what the function do,<br />or the function uses a global variable, or you pass it an argument,<br />for example :</p><div class="codebox"><pre><code>function increment(x)
    return x+1
end

HP = 0

-- scene update
function onSceneUpdate()

    HP = increment(HP)

end</code></pre></div>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2012-12-22T22:17:34Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=3075#p3075</id>
		</entry>
</feed>
