Jump to content

  • Log In with Google      Sign In   
  • Create Account

- - - - -

Angelscript to C++ translator


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 thd.MM   Members   -  Reputation: 208

Like
0Likes
Like

Posted 20 August 2013 - 02:56 AM

I'm sporting the idea of having a Angelscript to C++ automatic translator. I know it's not an easy task and not everything can be translated, however I have an idea how to do it. Is anyone interested working on this with me as a paid job?



Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3366

Like
0Likes
Like

Posted 20 August 2013 - 11:36 AM

quarnster had initiated something similar, though his approach was to convert the bytecode to C++.

 

I'll be following the progress of this with interest.


AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

#3 thd.MM   Members   -  Reputation: 208

Like
0Likes
Like

Posted 22 August 2013 - 04:13 AM

I tried the AOT compiler however it produces hundreds of gigabytes (not joking) of c++ code. You can imagine that is useless.

 

Most of the code I'd like to translate is pretty straightforward. For example, here you just need to change @ to *.

void onTick( CMap@ this )
{
	// local player check end

	 CBlob@ localBlob = getLocalPlayerBlob();
	 if (localBlob !is null)
	 {
		 if (!myPlayerGotToTheEnd && (localBlob.getPosition() - endPoint).getLength() < 32.0f)
		 {															 
			myPlayerGotToTheEnd = true;
			Sound::Play("/VehicleCapture");
		 }
	 }

There might be a problem with virtual classes and such. But I purposfully avoid using AS specific things like traits.

 

The file size of these translations won't be small too, because I imagine all the global vars and functions need to be in one common header attached to every single translated script, however it won't be anywhere near a couple gigs.


Edited by thd.MM, 22 August 2013 - 04:17 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS