GDR Forum Index
Podcast Podcast
Dev Dev Logs
Search Search
RSS RSS
Register Register
Log in Log in
Reply to topic GDR Forum Index -> Game Developer's Refuge -> Development Log - RogueOpcode Page Previous  1, 2, 3, 4
View previous topic :: View next topic  
Author Message
xearthianx
Developer

Joined: 28 Sep 2006
Posts: 771
Location: USA! USA!
PostPosted: Wed Jun 19, 2013 6:29 pm    Post subject: Reply with quote

Next step: get a triangle flying around the screen that I can control so it doesn't run into randomly-generated walls. This should be a dead simple prototype of the game I'm going to be making, and force me to port/implement the those systems that I'll for sure know I'm going to need.
_________________
Ionoclast Laboratories - Scientia et Dominatia!
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10671
Location: Canadia
PostPosted: Wed Jun 19, 2013 8:44 pm    Post subject: Reply with quote

Sounds perfect. :D
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
xearthianx
Developer

Joined: 28 Sep 2006
Posts: 771
Location: USA! USA!
PostPosted: Thu Jun 20, 2013 10:25 am    Post subject: Reply with quote

Ok, basic random number generator accomplished. I can get floats in any range, and a weighted coin flip. Should be easy to add other types of random numbers, and trivial to switch to a different generator engine (mersenne twister, subtract-with-carry, stochastic hardware device).

I also added an explicitly seeded version and a default version, so I can deterministically recreate output sequences e.g. for replays.
_________________
Ionoclast Laboratories - Scientia et Dominatia!
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
xearthianx
Developer

Joined: 28 Sep 2006
Posts: 771
Location: USA! USA!
PostPosted: Sun Jun 23, 2013 6:33 pm    Post subject: Reply with quote

Added some general purpose timer code, which has already proved very useful in a few places. I'll be expanding this as my needs emerge.

Fun fact: the C++11 thread library is broken, on Android. Good times...

Currently in progress: porting the rendering code to GLUT/GL3 on my Mac. I'm doing this right now to speed up my build-debug cycle while things are changing a lot. As an added bonus, once this is done, it should be almost trivial to port to Windows and GNU/Linux. This will put me in a good position to solicit multiplatform distributors like Steam, Humble Bundle, and Greenhouse.
_________________
Ionoclast Laboratories - Scientia et Dominatia!
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
xearthianx
Developer

Joined: 28 Sep 2006
Posts: 771
Location: USA! USA!
PostPosted: Mon Jul 01, 2013 12:17 pm    Post subject: Reply with quote

GLUT + ANGLE = Desktop GL is my bitch <3
_________________
Ionoclast Laboratories - Scientia et Dominatia!
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
xearthianx
Developer

Joined: 28 Sep 2006
Posts: 771
Location: USA! USA!
PostPosted: Mon Jul 22, 2013 9:09 pm    Post subject: Reply with quote

Current plan for scripting...

Phase 1: start developing with interim Lua scripts while Scripty is being fleshed out; I put it on the back burner after I proved to myself it was viable, so I could work on rendering.
Phase 2: expand the parser.
Phase 3: write code generator that outputs either Lua source or Lua bytecode.
Phase 4: implement runtime machinery in Lua.
Phase 5: port existing Lua scripts and write new ones.
Phase 6: (optional) self-host runtime.

Currently I'm looking at this, which may be of interest to anyone else who is currently or considering using Lua in their games: http://luajit.org/

I'm going to work on 2 through 6 mostly on weekends and during downtime between other tasks, so it doesn't distract too much from my core development efforts.
_________________
Ionoclast Laboratories - Scientia et Dominatia!
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10671
Location: Canadia
PostPosted: Mon Jul 22, 2013 9:21 pm    Post subject: Reply with quote

Ya, JIT's. My only thing against JITs is they wont work on iOS, which arguably may be one of your weakest platforms. So if your weakest platform can't use them, do you really need the JIT?

Of course if it's easy then sure. But it means you may want to test regularly on your weakest platform to make sure you're not doing anything silly.
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
xearthianx
Developer

Joined: 28 Sep 2006
Posts: 771
Location: USA! USA!
PostPosted: Tue Jul 23, 2013 7:17 am    Post subject: Reply with quote

This one claims to support ARM and iOS. But, they also have an optimized Lua interpreter that is up to three or 4 times faster than the reference implementation on some tasks. Is the JIT problem technical, or an arbitrary Apple limitation?
_________________
Ionoclast Laboratories - Scientia et Dominatia!
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
xearthianx
Developer

Joined: 28 Sep 2006
Posts: 771
Location: USA! USA!
PostPosted: Tue Jul 23, 2013 7:28 am    Post subject: Reply with quote

LuaJIT wrote:
Compatibility:
  • Windows
  • Linux
  • BSD
  • OSX
  • POSIX
  • Embedded
  • Android
  • iOS
  • PS3
  • Xbox 360
  • GCC
  • CLANG/LLVM
  • MSVC
  • x86
  • x64
  • ARM
  • PPC
  • e500
  • MIPS


115 KB VM
90 KB JIT
63 KLOC C
24 KLOC ASM
11 KLOC Lua

_________________
Ionoclast Laboratories - Scientia et Dominatia!
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Adam C. Clifton
Contributor

Joined: 04 Nov 2005
Posts: 221

PostPosted: Tue Jul 23, 2013 9:42 am    Post subject: Reply with quote

xearthianx wrote:
This one claims to support ARM and iOS. But, they also have an optimized Lua interpreter that is up to three or 4 times faster than the reference implementation on some tasks. Is the JIT problem technical, or an arbitrary Apple limitation?

There was a time when the only scripting that was allowed on iOS was Javascript in an embedded browser. I think this was a bit of an anti flash thing at the time. Looking it up it turns out that was only for a few months in 2010, seems like I have been avoiding scripting for years for no reason...

http://en.wikipedia.org/wiki/Apple_and_Adobe_Flash_controversy#History
View user's profile Send private message Visit poster's website
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10671
Location: Canadia
PostPosted: Tue Jul 23, 2013 10:12 am    Post subject: Reply with quote

The Apple issue now is mainly that the devices don't let you run code from RAM, which is what a JIT does.
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
xearthianx
Developer

Joined: 28 Sep 2006
Posts: 771
Location: USA! USA!
PostPosted: Tue Jul 23, 2013 9:55 pm    Post subject: Reply with quote

PoV wrote:
The Apple issue now is mainly that the devices don't let you run code from RAM, which is what a JIT does.
Hmm... It claims to support iOS. Perhaps that's only for the interpreter?
_________________
Ionoclast Laboratories - Scientia et Dominatia!
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10671
Location: Canadia
PostPosted: Tue Jul 23, 2013 10:09 pm    Post subject: Reply with quote

Ya, its probably a faster general interpreter than stock Lua. One of the PPC benchmarks mentioned looks only 4x faster best case, which I'm assuming is just interpreter.

Edit: Ya. Looks like all the benchmarks have the option of showing the luajit interpreter's performance, which is typically 1.5x to 3.75x faster.
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
xearthianx
Developer

Joined: 28 Sep 2006
Posts: 771
Location: USA! USA!
PostPosted: Tue Jul 23, 2013 10:31 pm    Post subject: Reply with quote

Hah.
Quote:
You can cross-compile for iOS 3.0+ (iPhone/iPad) using the iOS SDK. The environment variables need to match the iOS SDK version:
Note: the JIT compiler is disabled for iOS, because regular iOS Apps are not allowed to generate code at runtime. You'll only get the performance of the LuaJIT interpreter on iOS. This is still faster than plain Lua, but much slower than the JIT compiler. Please complain to Apple, not me. Or use Android. :-p

_________________
Ionoclast Laboratories - Scientia et Dominatia!
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10671
Location: Canadia
PostPosted: Wed Jul 24, 2013 7:32 pm    Post subject: Reply with quote

Yes this. :)
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
xearthianx
Developer

Joined: 28 Sep 2006
Posts: 771
Location: USA! USA!
PostPosted: Fri Jul 26, 2013 12:02 am    Post subject: Reply with quote

Same for the PS3 and xbax ports. Nicely optimized asm interpreter though, which should be as fast as or faster than the reference Lua. My biggest worry would be that this version might have fewer eyes on the code and fewer power users reporting bugs.
_________________
Ionoclast Laboratories - Scientia et Dominatia!
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
xearthianx
Developer

Joined: 28 Sep 2006
Posts: 771
Location: USA! USA!
PostPosted: Fri May 16, 2014 4:26 pm    Post subject: Reply with quote

So much going on, i can't really cover everything I've been doing for the last year. I did want to mention that I was inspired by POV's edit-n-go videos from a while back, and I have implemented a similar capability in my code. I can mark lua files as reloadable, and when the window loses and re-gains focus, it reloads the lua files and does any necessary post-load processing in a set of callbacks. It's really slick to be tweaking the size, color, glow, and damage of a photon torpedo, and just see my changes show up when I tab back to the game!
_________________
Ionoclast Laboratories - Scientia et Dominatia!
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10671
Location: Canadia
PostPosted: Fri May 16, 2014 5:53 pm    Post subject: Reply with quote

I'm working on UI right now, and instant reload is sooooo so wonderful for this.
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
xearthianx
Developer

Joined: 28 Sep 2006
Posts: 771
Location: USA! USA!
PostPosted: Sun May 18, 2014 4:11 pm    Post subject: Reply with quote

BTW, using Lua was one of the best decisions I've made, tech-wise.
_________________
Ionoclast Laboratories - Scientia et Dominatia!
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9366
Location: Not Finland
PostPosted: Sun May 18, 2014 5:23 pm    Post subject: Reply with quote

xearthianx wrote:
BTW, using Lua was one of the best decisions I've made, tech-wise.


I've never messed with Lua. What were the big "wins" for you in adopting it?
_________________
NoOP / Reyn Time -- The $ is screwing everyone these days. (0xDB)
View user's profile Send private message Visit poster's website
Reply to topic GDR Forum Index -> Game Developer's Refuge -> Development Log - RogueOpcode Page Previous  1, 2, 3, 4

Use this link to get a Sign-On Bonus when you get started!

All trademarks and copyrights on this page are owned by their respective owners. All comments owned by their respective posters.
phpBB code © 2001, 2005 phpBB Group. Other message board code © Kevin Reems.