Page 1 of 1
How to make a real-time module?
Posted: Sun Nov 11, 2012 4:08 am
by Grey
I'm doing "- This Jam" this week - a game jam in which make a game in a genre you traditionally hate. I really despise action RPGs, so this seems a ripe area to make a game in. But... I've no idea how to do the real-time stuff in the T-Engine :/ Any tips?
Re: How to make a real-time module?
Posted: Mon Nov 12, 2012 8:56 pm
by darkgod
Take a look at the realtime example
The basic idea is a call to
core.game.setRealtime(20)
in load.lua
inherit your Game from GameEnergyBased instead of GameTurnBased (replace all references!)
and hum that's mostly it.
Your game:tick will be called by the realtime timer so turns will pass automatically
Re: How to make a real-time module?
Posted: Tue Nov 13, 2012 4:49 am
by Grey
Ah, thanks a lot! With a bit of fiddling I got it working as I'd like. You can check out the results here:
http://gamesofgrey.com/games/ftjam.zip
To give context, this is a game I'm making for the "- This Jam" game week. The idea of the jam is to choose a genre you traditionally hate and make a game in it. I despise action RPGs, so hence I decided to make a real-time clickfest in the T-Engine. My game is in fact called "- This Jam", and is about battling demonically possessed jam.
I think this is the first real-time game made with the T-Engine?
Some issues I've got, if you're able to give advice:
- Background tiles aren't showing up
- Danger level of enemies doesn't seem to be respected in monster spawning, in spite of using "Max_ood = 0"
- I'd like to make two flyer types, one with big text and the other with small, but the system seems set up to use one flyer type only. Is there a way around this?
- I'd like to add health bars. Is this easy enough?
- I'd also like a restart option on death, but my attempts at copying this from ToME failed. Is there an easy way to add this?
Re: How to make a real-time module?
Posted: Tue Nov 13, 2012 6:24 am
by Frumple
Re: Health bars, doesn't tactics mode or whatev' in T4 have that already? Could you crib code maybe?
Re: How to make a real-time module?
Posted: Tue Nov 13, 2012 12:13 pm
by Grey
Tactical view just puts a red or green border around things. I would ideally like to crib ToME's health bar code but I don't actually know where it is :)
Re: How to make a real-time module?
Posted: Wed Nov 14, 2012 2:57 pm
by chezzo
So you're coming over to the dark side of having tiles, Grey!? Or is it just for this Action RPG? I like tiles, and I like that T-engine supports animated ones.
Re: How to make a real-time module?
Posted: Wed Nov 14, 2012 4:19 pm
by Grey
Just for this action RPG. For - This Jam it's quite appropriate for me to be making tiles ;)