It is currently 14 Jul 2020, 03:40
   
Text Size

Jive - compiling Java on the fly

Moderators: nantuko84, CCGHQ Admins

Jive - compiling Java on the fly

Postby mtgrares » 20 Oct 2009, 19:34

I wanted to mention to you that compile Java on the flying using either Jive or the GNU Java compiler. I know that Jive is just one exe file although it doesn't support newer Java features like templates.

I think it would be nice to stick some Java code in cards.txt and then compile it on the fly on the user's computer.
mtgrares
DEVELOPER
 
Posts: 1352
Joined: 08 Sep 2008, 22:10
Has thanked: 3 times
Been thanked: 12 times

Re: Jive - compiling Java on the fly

Postby nantuko84 » 21 Oct 2009, 13:03

at first look sounds great, on other side - won't it make cards.txt unreadable? I guess cards.txt scripting is needed for special cases when keywords doesn't help. But unfortunately Java is not so light weight language (as functional) and it may bring complexity.
btw, as far as I know Incantus uses python scripts within card description files.

upd. what I found about Incantus card code is that it is described this way:
Code: Select all
@activated(txt=text[0])
def ability():
def effects(controller, source):
cost = yield SacrificeCost()
target = yield Target(isCreatureOrPlayer)
source.deal_damage(target, 1)
yield
return effects
abilities.add(ability)
not readable for me, but I believe the reason is that I don't know Python at all

the major question is: why we need this and what are the advantages of using it?
nantuko84
DEVELOPER
 
Posts: 266
Joined: 08 Feb 2009, 21:14
Has thanked: 2 times
Been thanked: 9 times


Return to MagicWars

Who is online

Users browsing this forum: No registered users and 1 guest


Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 10 minutes)
Most users ever online was 1371 on 09 Feb 2020, 16:22

Users browsing this forum: No registered users and 1 guest

Login Form