It is currently 16 Apr 2024, 18:25
   
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 12 guests


Who is online

In total there are 12 users online :: 0 registered, 0 hidden and 12 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 12 guests

Login Form