• 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
HelloSkitty

Languages

15 posts in this topic

So I'm already familiar with Java and C++, and I know there are a lot of other languages used to program games (python, etc.) But I've never been able to figure out how to actually run these programs without some kind of installation (java->eclipse, cpp->visual cpp). Even so, one of my computers lacks javac in command prompt, yet it can run an embedded java applet on a webpage. I doubt it has cmake, yet I found a piece of software in c++ that ran fine on my computer. So my main question is, how is it done?

Being able to run code without anything installed has always been something I've been looking for (do NOT tell me to write a compiler). So I've been learning batch for a few days until I found out it's a scripting language, and not a programming language. Assembly is apparently the most basic language, and I'd gladly learn it if I could figure out how to run it.

So are there any really low level languages that games are programmable in (by low level, I mean no compile software installation required, just write code in notepad, and run)? Complexity of the code is not really an issue for me, (I'm probably going to regret saying that when someone says to use assembly to write pong), so much as ease of running, and runtime quickness.

Edit: Resolved. Didn't feel like bumping, so I put here. Thanks to all for explaining how compiling works, and thanks to rip-off, I'll look into portable JRE, that was actually exactly what I was trying to find!
0

Share this post


Link to post
Share on other sites
Generally, "no".

You can't just write code in a text editor and run it, even a batch file scripting language needs some kind of interpreter behind it (which may or may not be built in to the OS). What you [i]can[/i] do is compile code to an executable and then distribute that executable; other people will be able to run it without needing the build environment installed (assuming that it compiles to a native executable - Java/C# typically don't for example, whereas C or C++ typically do).
0

Share this post


Link to post
Share on other sites
You're conflating lots of different concepts.

[b]Installation vs Non-installation:[/b]
Some applications require an installation. This means the executable you download and run to install the application is not actually the application -- though it contains it (or somehow fetches it). The installer puts files where they need to be. It may put the application in C:\Program Files(x86)\, or it might let you choose where to put it. It might have to put shared libraries in the right places, or it might have to modify the registry in some way.

Other applications are written to be entirely self-contained and stand-alone. In that case the executable you download and run is the application. You can run it from any location on the disk because it doesn't have all the dependencies that the installed application required the installer to set up.

[b]Installation vs Compiling[/b]
Installing an application usually doesn't compile it (with the notable exception of many unix/linux platforms). It comes to you already in executable form. You can't see the source code because whoever created the application already compiled it. You say you can't figure out how to run java programs without installing eclipse or "cpp programs" without installing Visual C++. This makes no sense at all. First of all, you don't need Eclipse to compile java programs, you just need a java compiler. Eclipse is a java IDE (which may or may not provide its own java compiler, I don't know, I don't use java). Secondly, you don't need to compile a java program to run it. If you've received a java program it's probably java bytecode, which can be run directly through your java runtime. Thirdly, a compiled C++ program is simply an executable. It's native code that runs directly on the platform (hardware), not through any runtime. You never need anything (aside from dynamic library dependencies, or other sorts of runtime dependencies) to run a compiled C++ program.

[b]Compiled languages vs Interpreted languages[/b]
A compiled language is one like C++ or Java that you have to compile. The compilation step turns your source code into binary object code that can be executed on your machine. An interpreted language doesn't require any such step. Instead, the source code is read by an executable and the commands in the source code are then performed by that executable. This includes most scripting languages. A scripting language is a programming language by the way, contrary to your false dichotomy.

I think what you're asking is:
Are there any languages that I can write a program in that don't have to be compiled or interpreted. The answer is yes, machine code. Even writing in assembly language required an assembler, which translates what you wrote into machine language for the platform you're on. If you are planning to write machine code you will have to write it in binary or hexadecimal, and you will have to know the opcodes and keep track of your own memory addresses. You won't be able to use notepad, since that outputs ascii. It will be a bunch of numbers. You don't want to do that.

So why are you trying to do what you're trying to do? Why do you hate installing things?

You also asked how an embedded java applet runs on your computer without having installed javac. Easy, you don't have to compile a java application to be able to run one. You're downloading java bytecode which is then interpreted by your java runtime. The javac would simply turn java sourcecode into bytecode.
1

Share this post


Link to post
Share on other sites
Punch cards.

...

No, really, if this is just for personal fun, why not go explore some extreme retro-computers? (I assume it's for personal fun since it's otherwise a nonsensical demand.)
1

Share this post


Link to post
Share on other sites
Your definition of low level is really really really bad, as low level is already well defined in the world of computer programming. ( Low level refers to the level of abstraction between the programming language and the under-lying hardware, with low level languages being the least abstracted ).


Truth is though, I don't think you really understand the compilation process. All code at some point is translated from text form into machine runnable ( for virtual machine runnable ) format, or is run within a hosted environment ( like BATCH programming run within CMD.exe process ). Even assembly code is run through an assembler to create an executable program.



One thing you should look into is [url="http://en.wikipedia.org/wiki/Static_library"]Static Linking[/url], which allows you to pack all the required libraries and files into a single EXE file. Frankly if you want to create small, portable, self contained code, C is what you are looking for. That said, I would rather cut off my own manhood than work in C again.
0

Share this post


Link to post
Share on other sites
[quote name='A Brain in a Vat' timestamp='1309372000' post='4829191']
You're conflating lots of different concepts.

The installer puts files where they need to be. It may put the application in C:\Program Files(x86)\, or it might let you choose where to put it.
[/quote]

[quote name='Serapth' timestamp='1309373000' post='4829193']
Your definition of low level is really really really bad.

Truth is though, I don't think you really understand the compilation process.
[/quote]

[quote name='JoeCooper' timestamp=1309373000' post='4829192']
if this is just for personal fun
[/quote]

Yes... I'm fairly able as a programmer in java, but I'm totally lost when it comes to computer science theory with the compilers and interpreters and everything. My main issue is school computers which don't seem to have any way of running code that is written on the spot. It [i]is [/i]partially just for personal fun, as I can write java in text and move it between computers all the same, but it'd be nice to be able to run it from a school computer. Is there any chance of being able to directly write an exe or jar file, or is just not worth the effort?

@A Brain in a Vat: So if something were installed onto a flash drive, could it still run, even though it's not on the actual computer?
0

Share this post


Link to post
Share on other sites
[quote name='HelloSkitty' timestamp='1309376394' post='4829214']
Yes... I'm fairly able as a programmer in java, but I'm totally lost when it comes to computer science theory with the compilers and interpreters and everything. My main issue is school computers which don't seem to have any way of running code that is written on the spot. It [i]is [/i]partially just for personal fun, as I can write java in text and move it between computers all the same, but it'd be nice to be able to run it from a school computer. Is there any chance of being able to directly write an exe or jar file, or is just not worth the effort?

@A Brain in a Vat: So if something were installed onto a flash drive, could it still run, even though it's not on the actual computer?
[/quote]
If an executable was on a flash drive, and then you connected that flash drive to the computer, then yes that executable could run on the computer.

That doesn't mean your school doesn't have some kind of protection against that possibility.

So are you not learning to program in school? Because if you are they should provide systems with compilers on them.

If they don't, you'll just have to install a compiler on your home computer, and if you don't have one you'll just have to get one.
0

Share this post


Link to post
Share on other sites
[quote name='HelloSkitty' timestamp='1309371686' post='4829182']
Assembly is apparently the most basic language, and I'd gladly learn it if I could figure out how to run it.
[/quote]

ASM is the most basic language in the sense that a CPU can understand and execute it. The actual programming of ASM is not so basic.

For future reference, you can run ASM inside of Visual Studio. See [url="http://msdn.microsoft.com/en-us/library/45yd4tzz%28v=VS.100%29.aspx"]here[/url] for more information.
-2

Share this post


Link to post
Share on other sites
[quote name='UltimaX' timestamp='1309377716' post='4829227']
ASM is the most basic language in the sense that a CPU can understand and execute it. The actual programming of ASM is not so basic.

For future reference, you can run ASM inside of Visual Studio. See [url="http://msdn.microsoft.com/en-us/library/45yd4tzz%28v=VS.100%29.aspx"]here[/url] for more information.
[/quote]
This is not true. A CPU cannot understand and execute assembly. Please read what I wrote above.
1

Share this post


Link to post
Share on other sites
[quote name='UltimaX' timestamp='1309377716' post='4829227']
[quote name='HelloSkitty' timestamp='1309371686' post='4829182']
Assembly is apparently the most basic language, and I'd gladly learn it if I could figure out how to run it.
[/quote]

ASM is the most basic language in the sense that a CPU can understand and execute it. The actual programming of ASM is not so basic.

For future reference, you can run ASM inside of Visual Studio. See [url="http://msdn.microsoft.com/en-us/library/45yd4tzz%28v=VS.100%29.aspx"]here[/url] for more information.
[/quote]


This actually, is wrong. ASM is about as low level as languages get, but it is not machine executable, it still gets compiled down to machine code and linked with the appropriate headers etc depending on format ( such as [url="http://en.wikipedia.org/wiki/Executable_and_Linkable_Format"]ELF[/url] on Linux or [url="http://en.wikipedia.org/wiki/Portable_Executable"]PE[/url] on Windows ).



EDIT: Damn your quickness Brain!
2

Share this post


Link to post
Share on other sites
[quote name='Serapth' timestamp='1309378152' post='4829231']
EDIT: Damn your quickness Brain!
[/quote]
I don't rely on your slow typing. My vat is directly connected.
0

Share this post


Link to post
Share on other sites
What Apoch said.

EDIT: Also, you might look at Windows Powershell instead of bat files, or whatever it's called. You might be able to have a lot of fun with what windows comes with out of the box.
0

Share this post


Link to post
Share on other sites
Um... given that this is the beginner's forum and this is the first question the OP has posted, maybe it's worth while to check that the OP is just looking for how to compile something in release mode? You know... do all the work on your development machine then compile it in release mode so you can take the exe file and run it on your mom's computer.

[edit]
Sorry, I guess it's his second topic.
0

Share this post


Link to post
Share on other sites
I believe what you are struggling with is the distinction between [b]development[/b] and [b]deployment[/b]. Each of these environments requires and provides different runtimes and toolchains.

Speaking generally, statically compiled languages make an obvious distinction between the two environments, and dynamic languages provide the same environment for development and deployment.

So, the things you need to figure out for your language of choice are:
[list]
[*]What do I need to provide as a deployment runtime?
[*]Can I avoid installing this?
[/list]
If you want to develop on the fly, you need to figure out the above for the development environment too.
[quote]
My main issue is school computers which don't seem to have any way of running code that is written on the spot. It is partially just for personal fun, as I can write java in text and move it between computers all the same, but it'd be nice to be able to run it from a school computer. Is there any chance of being able to directly write an exe or jar file, or is just not worth the effort?
[/quote]
This may be possible, provided your school computers don't contain too many security restrictions. If the computers in question can run Java applets, then they have a JRE (Java deployment environment) already installed. All you need now is a [url="http://en.wikipedia.org/wiki/Portable_application"]portable[/url] JDK (Java development environment). On Linux I can download a JDK as a single zip, which extracted into a folder contains everything I need.

Looking at the JDK download page all the Windows packages are provided as executable installers, but it might be possible to similarly capture a JDK into a folder and make it portable. You can then move this to a USB key (if you are allowed to use them) and all you need to do is correctly set JAVA_HOME and PATH to point to the JDK. You can write a batch script that sets these variables and gives you a command prompt from which you can call the Java compiler. There are some promising ideas [url="http://portableapps.com/node/13115"]here[/url].

If you get all that working then you should be able to edit, compile and run Java programs without installing an IDE. You might consider testing this deployment by using some kind of virtualisation software (e.g. VMWare) to run a "clean" Windows installation.
1

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