Author Topic: Walkmesh questions, language comparison  (Read 763 times)

Jenova's Witness

  • Insane poster
  • *
  • Posts: 342
  • Omnia mutantur, nihil interit
    • View Profile
    • Bio Research Lab
Walkmesh questions, language comparison
« on: 2011-06-29 23:22:42 »
What's the name for a the sort of mapping used in games like SaGa Frontier, where the walkable portion of a 2D map is invisible and laid on top of or underneath a pre-rendered image?  How do things like running into a monster and starting a battle work - that is, how does an engine keep track of where you (and other sprites and things you can run into) are?  How does this work compared to tile-based fields like, say, Final Fantasy 6?

Perl
Python
Ruby
C++
C#
Common Lisp (or other Lisp variants)
Java
Other (feel free to whore your own prejudices)

How do the above languages compare based on the following criteria?
*Can produce a standalone executable
*Speed
*Memory usage
*Popularity/commonness/ease of finding coders
*Ease of finding and fixing bugs
*Tendency to produce bugs
*Ease of use
*Ease at which one writes good code (does it make it easy, or at least not difficult, to be a good programmer?)
*Availability of resources and libraries and whatnot
*Quality of resources and libraries and whatnot
*Ease at which you can find the appropriate resource or library (or ease at which you can make your own)

Kudistos Megistos

  • Banned
  • No life
  • *
  • Posts: 3968
    • View Profile
Re: Walkmesh questions, language comparison
« Reply #1 on: 2011-06-29 23:33:43 »
Java is the fastest. Anyone who says otherwise is a troll.

Jenova's Witness

  • Insane poster
  • *
  • Posts: 342
  • Omnia mutantur, nihil interit
    • View Profile
    • Bio Research Lab
Re: Walkmesh questions, language comparison
« Reply #2 on: 2011-06-29 23:40:22 »
Isn't Java basically a family of langugages now?

Kudistos Megistos

  • Banned
  • No life
  • *
  • Posts: 3968
    • View Profile
Re: Walkmesh questions, language comparison
« Reply #3 on: 2011-06-30 00:13:18 »
Isn't Java basically a family of langugages now?

It's a family of FASTNESS!

And BTW, Perl and Lisp win when it comes to ease of finding coders.

Bosola

  • Fire hazard!
  • Global moderator
  • No life
  • *
  • Posts: 1643
    • View Profile
    • My YouTube Channel
Re: Walkmesh questions, language comparison
« Reply #4 on: 2011-06-30 11:44:02 »
Honestly, Java speed really isn't the issue people claim it to be.

Firstly, JIT Compilers are able to re-use the assembly they generate for commonly use functions in a Java application. Yes, there's latency on startup, when the bytecode has to be transformed into ASM, but that's a one-time performance hit.

Secondly, Java 's garbage-collection and memory management tools allow Java apps to often request and handle memory quicker in real-world scenarios than C with manual mallocs.

Thirdly, garbage collection frees programmers' time from hunting down dangling pointers and horrific memory leaks (that can themselves force use of paging). Develoeprs can instead spend on the greatest bottleneck in any application: dead end code branches.

Fourthly, processing time is rarely the bottleneck on performance for most applications. Need super-fast 3D transformations for a videogame? Sure, write it in C++. Developing an app that'll connect to a database server? Put GCC down and spend time profiling your SQL queries instead.

« Last Edit: 2011-06-30 18:49:07 by Bosola »

Kudistos Megistos

  • Banned
  • No life
  • *
  • Posts: 3968
    • View Profile
Re: Walkmesh questions, language comparison
« Reply #5 on: 2011-06-30 15:55:37 »
Honestly, Java speed really isn't the issue people claim it to be.

Say what you will; I still seethe with rage every time I start up jdownloader and have to wait 12 hours before I can do anything with it.

Bosola

  • Fire hazard!
  • Global moderator
  • No life
  • *
  • Posts: 1643
    • View Profile
    • My YouTube Channel
Re: Walkmesh questions, language comparison
« Reply #6 on: 2011-06-30 18:47:09 »
Then it's probably poorly optimized at logic level, or it makes time-consuming calls to your network when it initializes (perhaps they're being bounced by your firewall, before the downloader simply gives up on them).

I'll say it again: Processing speed is rarely a bottleneck for desktop applications.

pyrozen

  • Freak
  • *
  • Posts: 793
  • Team Avalanche Member
    • View Profile
Re: Walkmesh questions, language comparison
« Reply #7 on: 2011-07-01 03:53:17 »
what's that new-ish saying?
As processors get faster, the guys writing the code can get lazier....

Bosola

  • Fire hazard!
  • Global moderator
  • No life
  • *
  • Posts: 1643
    • View Profile
    • My YouTube Channel
Re: Walkmesh questions, language comparison
« Reply #8 on: 2011-07-01 10:27:59 »
It's not a matter of lazier, it's a matter of smarter.

Few desktop applications are arithmetic-heavy, so a development team that focuses on assembly-level optimization over, say, calls to the network, or inefficient requests from the hard disk - or, hell, even inefficient workflows in the user interface - is committing commercial suicide.

It's a question of diminishing returns. Some things just have a better yield on the time you spend on them. For the milliseconds you shave by performing optimization tricks, you could have made the user's workflow 20% faster by getting rid of some unnecessary forms, or redesigning your UI. That's the sort of thing your customers will actually care about. The only time customers really care for speed is during initialization, and that's usually more to do with loading chunky libraries or making wasteful I/O calls, not math time.

It's moot anyway. These days, the chances for humans to beat optimizing compilers with hand-written ASM on anything but the most obscure platforms are passing rare. And humans who try and perform '1337' tricks like injecting inline ASM usually confuse compilers into producing executables slower than if the app had just been left alone (because optimization only works if your compiler can recognize the algorithm in high-level source). Besides, humans aren't that great at handling pipelining or a whole host of other processing technologies.

If your compiler or JIT has optimization switches and profiling tools then use them, yes. Just don't get hung up on producing 'efficient' arithmetic for a text editor or whatever.
« Last Edit: 2011-07-01 10:49:22 by Bosola »

Mako

  • Freak
  • *
  • Posts: 628
  • Asuka Langley Soryu
    • View Profile
    • RPG Council
Re: Walkmesh questions, language comparison
« Reply #9 on: 2011-07-01 18:13:19 »
Well Bosola would be a much more smarter person to listen to in this subject. But I am now starting on a project similar to yours. These are my finding thus far...

Q: Can produce a standalone executable?
A: Every language can produce this. (Pretty Sure)

Q: Speed?
A: As Bosola said, Java can be quite fast. But it all depends on the developer =/ You can have a VB game running faster then Java givin' the right developer.

Q: Memory usage?
A: In general Java, But C++ can rival givin' who's behind the wheel and what platform.

Q: Popularity/commonness/ease of finding coders?
A: I know people will say Java. But I'll argue that in is much much more common to find C++ people then Java. =/  But perhaps I look in the wrong places.

Q: Ease of finding and fixing bugs?
A: Anything with automatic garbage cleanup... which most languages have.

Q: Ease of use?
A: Visual Basic :PBut you will never produce anything worth wile :)But Java would be my second choice.Python being the third.
Q: Ease at which one writes good code? (does it make it easy, or at least not difficult, to be a good programmer?)
A: This all depends on you. People learn differently. Some people find Java easy some people find it too difficult.

Q: Availability of resources and libraries and whatnot?
A: C++ or Java.

Q: Quality of resources and libraries and whatnot?
A: I imagine the same C++ or Java.

Q: Ease at which you can find the appropriate resource or library? (or ease at which you can make your own)[/b]
A: Java as C++ is horribly hard. =/

Again this is from a beginner point of view.I have only produced minor results, but these where my findings.In the programing world everyone has there biases though, it is very tough to get a really good answer for a beginner.It's best to start with something pre-built in my opinion, instead of making your own 3D engine. I.E Ogre, Torque, Darkbasic Pro, UT3, ect... Don't let people trick you! You will never EVER get everything done on your own. To much for one person to handle. Instead cut some corners and make it easier on your self by using one of the above programs.
« Last Edit: 2011-07-01 20:47:36 by Mako »

Bosola

  • Fire hazard!
  • Global moderator
  • No life
  • *
  • Posts: 1643
    • View Profile
    • My YouTube Channel
Re: Walkmesh questions, language comparison
« Reply #10 on: 2011-07-01 20:37:54 »
*Can produce a standalone executable

Most languages can do this in some form or another. In the case of languages like Python, your executable is actually a portable interpreter plus the source code. This isn't always terribly efficient, however.

Now, the question is, what exactly do you really mean by "standalone"?Does Wallmarket count (requires .NET and the VB powerpacks)? Any application that uses a library in the host OS? Or only programs that can run without an underlying operating system? 'Standalone' could mean a lot of things.

*Speed

Depends on the context and the sort of program! Different kinds of applications face different sorts of bottlenecks. Different environments, methodologies and languages offer different tools for opening them up.

*Memory usage

Theoretically, C++ can be very RAM-efficient. But in practice, humans working in C++ are prone to creating memory leaks (where unused memory doesn't get de-allocated). This eats up RAM quickly. For that reason, a language with garbage collection might mean better footprints for those who don't want / can't afford to hunt through pointers and the like.

*Popularity/commonness/ease of finding coders

...Again, it depends. Some languages better suit certain sorts of problems. If you're writing an object-orientated application hosted on a webserver, you'll find a lot of devs who expect to write a Java app and run it in Tomcat. If you're writing a number-crunching algorithm for a laboratory, you'll find lots of FORTRAN diehards. For mission-critical military systems, you could be working in ADA. Embedded machines in industrial processes? It's likely to be direct ASM.

It varies.

*Ease of finding and fixing bugs

As I keep saying, it varies. Different sorts of problems pose different sorts of bugs.

*Tendency to produce bugs

Hmm. Memory management in C++ can be troublesome if you're not careful. But there's no language that can compensate for carelessness.

*Ease of use

Define 'ease' and 'use'! And don't confuse 'ease of use' with 'ease of learning'. Some people seem to find object orientation a bit troublesome at first glance, but it actually makes modelling certain problems a lot simpler. Others fear pointer arithmetic, but again, once you understand it, it makes working with odd data structures pretty straightforward.

*Ease at which one writes good code (does it make it easy, or at least not difficult, to be a good programmer?)

Python enforces quite a few good conventions. Java stops you having to worry about memory. But the question is: wouldn't you rather have the freedom to fail (and learn from it)?

*Availability of resources and libraries and whatnot

C++, hands down. That's probably the only straight answer you'll get from me in this entire post.

*Quality of resources and libraries and whatnot

C++ has some great resources.

*Ease at which you can find the appropriate resource or library (or ease at which you can make your own)

I've only really written my own libraries in C++ and Python; both made the process very simple.

* [Implicitly] Which language should I learn?

C++.

With C++, you can learn about manual memory management, object orientation, procedural programming, and use the wealth of libraries to develop applications that work in a dizzying array of contexts. You'll be able to easily produce static and linked executables well optimized for a variety of platforms. You'll find moving to Java straightforward and you'll gain a lot of freedom as a developer. Granted, that includes the freedom to fail - but as I said above, that might actually be a good thing.
« Last Edit: 2011-07-01 20:42:05 by Bosola »

Jenova's Witness

  • Insane poster
  • *
  • Posts: 342
  • Omnia mutantur, nihil interit
    • View Profile
    • Bio Research Lab
Re: Walkmesh questions, language comparison
« Reply #11 on: 2011-07-01 21:41:59 »
I found a copy of ANSI Common Lisp late last year, and spent two months reading it, taking notes, and doing exercises before a lack of privacy and generallly miserable living conditions destroyed my ability to concentrate.  I want to pick it up again sometime this year, but I'm worried that there aren't any resources for developing games and game editing tools (mostly the lack of resources to develop GUIs and - f*ck, what's the word - screens?  Ways to interact with things like OpenGL and get grapics and tile-based maps to pop up on your monitor, since I don't give a f*ck about ASCI roguelikes.  ANSI Common Lisp was written in 1994, and I skimmed it, and there's f*ck-all to do with graphics in the book.) and that anything I make will die once I get bored with it due to Common Lisp's unpopularity.

The other reason I choose Common Lisp is because ANSI Common Lisp also works as an introduction to functional programming.  I really don't like how it introduces something, glosses over it, and then goes back to it several chapters later to get more in depth.  I'm not terribly smart, but I am very good at dealing with small ideas in great depth, as opposed to learning a broad range of concepts and then diving into them as I need to.  I have to learn EVERYTHING about something, even if it doesn't make complete sense yet, before I can move on the the next thing.

I found a copy of "Scructure and Design of Computer Programs", but not "How to Design Programs".  Even Google and mediafire failed me.

I'm surprised nobody mentioned Lua.

Standalone executable = download something and go, after reading and installing whatever dependancies are required.

Ease of use = development time

Bugginess = how much rope does it give you to hang yourself with, and does it have automatic memory management

*Ease at which one writes good code (does it make it easy, or at least not difficult, to be a good programmer?)
^Scheme, IIRC, is a purely functional language.  I should have specified, "Does it force you to follow a certain programming paradigm?"  and "What programming paradigm do you think is best suited to producing games similiar to SNES/PS1 RPGs, and 2D RPGs in general?

Is it Python that says "There's more than one good way to do anything" and Perl that says "There's only one good way to do anything", or is it the other way around?  And then Ruby tries to make programming as easy as possible, in regards to syntax and the words used to describe things?

The whole point of this topic is the get you people talking about these things, and I can learn just by observing you and figure out what suits me.

http://www.antigreen.org/vadim/ProgLanguageComparison/lisp-cmp-with-cpp-java-etc/LispJava.htm
« Last Edit: 2011-07-01 21:51:16 by Jenova's Witness »

Vehek

  • Crazy poster
  • *
  • Posts: 186
    • View Profile
Re: Walkmesh questions, language comparison
« Reply #12 on: 2011-07-02 22:50:09 »
Are you trying to make a replica of the Saga Frontier engine? That's the impression I'm getting from what I've read elsewhere, if I'm connecting things correctly. It also sounds like you want to build it from scratch, without building off any already existing engines. Just saying, it seems like the movement part of the field engine would be similar among Square's PSX games.

I don't really have any advice, since I don't program GUIs.
« Last Edit: 2011-07-03 07:53:13 by Vehek »