• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Dalphin

java or javascript?

12 posts in this topic

Hello everyone,

I want to make a game quite a time.

Eventually i want to make a FPS.

I know i have to start small and that's what i'm gonna do, but i do have a question.

I can start learning java, then i'm gonna start really small and become bit by bit better and use eventually an

engine like unreal or cry. But i read on the internet that unity is a more easy than those other engine, but it uses javascript. (probably more easy to learn to. Personally i think you can do more if you can program in Java, but it is the hard way and i tried it a few years ago and it was really hard for me. My question is: which one should i learn: java, or javascript? And if you have some other usefull information or tips, i would be glad to hear it.

Thanks 

0

Share this post


Link to post
Share on other sites

Contrary to what slicer4life just said, Java and Javascript do actually share a lot of similarities when it comes to their syntax. They both derive heavily from the C language and a lot of what you'll learn in Javascript and/or Java can easily transfer over to the whole C family of languages (for when/if you need to go more low level)

 

@Truerror, Really? Just the brackets? I'm pretty sure they share MUCH more than just that. Statements and flow control is basically the same, you've got 'if' and 'else' statements. While, do, and for loops, along with break and continue statements. Switch statements, which include 'case' and 'default' JUST like in C++. As for functions. Sure, its not statically typed like C++, and theirs more than one way to declare a function, but the flow of the code is very similar. Variable assignment and comparison is very similar to C++, you've got '=' to assign values and '==' to compare two (minus the ability to use pointers directly like in C++). These are just some examples of the similarities between the two languages SYNTAX (not how you declare functions or handle classes, or the fact that one is strongly typed while the other isn't).

Edited by xDarkShadowKnightx
-2

Share this post


Link to post
Share on other sites

i would advise javascript over the java, but it is hard to argue comparsion of such complex things as im a nevbie in both, perspnaly prefer javascript

 

bTw can someone advise some short but good tutorials for javascript but focuses for canvas games writing ?

-1

Share this post


Link to post
Share on other sites

The truth is both languages can be easy or hard, depending on what you wish to do. For scripting purposes, once you learn the syntax of the language (a one or two hour endeavor, tops) there would be little differences between them. You should concentrate on learning how to translate your ideas into instructions for the computer. You can do that in any language you want.

 

If you can use C# in Unity, go with that. It's strong-typed, which I think is important when starting out. It uses a syntax similar to Java, if I'm not mistaken, and the programming concepts you learn with it can be used in javascript, or in any other language.

1

Share this post


Link to post
Share on other sites

 once you learn the syntax of the language (a one or two hour endeavor, tops)

 

Its your imagination ;/ probably based on the fact that you already know this syntax, I am learning javascript basics after some 5 years of experience in c/winapi and for sure learning it is far not 2 hours (it is anyway interesting feeling learning the basic of the second language where basics of the forst i was learning and know for 10 years)

0

Share this post


Link to post
Share on other sites

Well, I meant to say things like:

 

- How do statements end (semicolon or no semicolon)

- How to write if's, for's and while's

- Operators

- Class and function definition

 

These are some differences between Python and C++

 

Python:

#Statements need no semicolon

print("Hello world!") #Function call. Arguments go inside parentheses. Strings go between quotes.

x = 0 # Assignment operator

#Structure of an IF

if x == 0:              # Comparison operators
    print("True")    # Forced indentation for scope, no brackets.
else:                    # Colon after if, elif, else
    print("False")

list = [1,2,3,4]

# Structure of a for loop

for item in list:
    print(item)

# Structure of a while loop

while list[0] != 1:
    print("Looping...")

# Function definition

def foo(arg1, arg2):                  #keyword def, arguments between parentheses, colon
     -- code to run --                   # Forced indentation

# Class definition

class Foo:
      def __init__(self):
            -- contructor code --
      -- define more attributes methods --

C++

// Needs main function
#include <iostream>

using namespace std; // Statements need semicolons

int main()
{
cout << "Hello World!" << endl;     // Bitwise shift operator
return 0;                           // Indentation is optional, brackets are necessary to indicate scope
}

int x = 0; // Assignment operator (strong-typed language, not syntax related, though)

// Structure of an IF

if (x == 0)
{
   cout << "True" << endl;
}
else
{
    cout << "False" << endl;
}

// For loop

for (int i = 0; i < 10; i++)
{
    // some code
}

// While loop

while (variable == value)
{
     // some code
}

// Function definition

void Foo(int arg1, bool arg2)     // starts with type, arguments between parentheses, also with type
{
    // some code
}

// Class definition

class Foo
{
      int privateAttribute;                               // Attribute

     public:

           Foo()                                                 // Constructor
           {
                  privateAttribute = 0;
           }
}

The examples might not be 100% accurate, but my point is that if you know what you're doing, syntax shouldn't be too much of a problem. How long did it take you to see the differences between the two blocks of code? And notice how syntax is consistent across the language, so the differences between a language and another tend to be consistent also.

 

A different thing is the actual use and logic of each language which can be extremely different, and it can take weeks or months to make the switch from one language to another.

Edited by DavitosanX
1

Share this post


Link to post
Share on other sites

you're doing, syntax shouldn't be too much of a problem. How long did it take you to see the differences between the two blocks of code? And notice how syntax is 

 

okay not important, i just wanted to say its not strictly two hours as

it may seem for some over optymistic person (if not the case you realy seen it many times and now by learning you mean finishing the gaps or relearning them, not realy learning first time)

 

even this short snippet  of python you can scan with eyes quick but you will not memorize it at first time you must make some habits/get accustomed and some other stuff (for example need to find and filter  materials to learn it also takes time,...

 

I know becouse Im learning javascript surface right now, I must find miterilals, i must rest i must repeat i must motivate myself, i must understand things are not clear,

 

 moves slow as a snail in my case - and when i asked syntax question to speed up things they didnt wanted here to answer me

Edited by fir
-2

Share this post


Link to post
Share on other sites

The examples might not be 100% accurate, but my point is that if you know what you're doing, syntax shouldn't be too much of a problem. How long did it take you to see the differences between the two blocks of code? And notice how syntax is consistent across the language, so the differences between a language and another tend to be consistent also.

Not sure why you're even pointing any of this out because the things you pointed out are pretty much generic to all popular languages. A lot of them are concepts that came about from having to work with assembly and don't really say anything about the logic of a language.

Python and C++ might superficially seem similar, but they share as many similarities as cars and cows.
0

Share this post


Link to post
Share on other sites


the things you pointed out are pretty much generic to all popular languages.

 

The point I'm trying to make is that these basic concepts are what a new programmer should be learning, and just like you said, they are very much alike between languages. It doesn't really matter is the OP starts out with Java or Javascript, learning these building blocks, and most importantly the reasoning behind them, will make the transition from one to the other painless.

0

Share this post


Link to post
Share on other sites


The examples might not be 100% accurate, but my point is that if you know what you're doing, syntax shouldn't be too much of a problem. How long did it take you to see the differences between the two blocks of code? And notice how syntax is consistent across the language, so the differences between a language and another tend to be consistent also.

 

 

Now do the same with Scheme, R, Erlang or even Mips Asm and then tell me they look similar.  I get the point you are trying to make but you are over simplifying the issue.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0