How to "convert" this game to Unity?

Started by
7 comments, last by kburkhart84 10 years, 11 months ago

I know nothing about Unity, I'm asking here mostly for basic knowledge so I know what to google :)

Note that I know that this kind of game should be best done in Flash but I was toying with Flash and well, we are not meant for each other :D Alternatively, if you know of a trick to convert it to Flash I could use it as well.

I'm familiar with: C/C++, PHP, HTML, SQL, JS, Java, OpenGL, DX5, LUA (and Flash but I forgot how it worked :D).

My coding style is of a hardcore programmer (no visual stuff if possible, I want to put everyting in some sort of Notepad if possible, that's also why I'm not so fond of Flash).

The game is basicly text (later I would add static 2D images), so something far below a typical use of Unity. Here is the link:

http://www.silverlemur.com/minigames/radioactiveshelter/

I wonder how to approach it (what are my options). In an ideal world there would be somesort of automatic converter from PHP to Unity scripting language and then a renderer that works like HTML :D I guess there is not such thing, but I would regret it for the rest of my life it there was and I have not asked. Another option would be some 2D mode in Unity with a lot of cute and nice features to handle text (the more similar to HTML the better - in Flash there was some object/mode/I forgot that allowed you to render exact HTML, it would be the best).

Also could you drop me some minimalistic "Hello World" example (not dumping the text to the console but on the screen)?

Stellar Monarch (4X, turn based, released): GDN forum topic - Twitter - Facebook - YouTube

Advertisement

The game is basicly text (later I would add static 2D images), so something far below a typical use of Unity.

You should probably settle with a different, less complex, framework that is designed to deal with text and static images, rather than Unity (which to my understanding is focused on 3D content).

For example, have you looked into http://www.yoyogames.com/gamemaker/studio ?

If you're looking for something a little more advanced, you mentioned that you're familiar with C++, in that case your best bet would probably be to use a freely available framework/library like SDL or SFML

http://www.libsdl.org/

http://www.sfml-dev.org/

If you're familiar with C++ and OpenGL, why don't you simply make a small framework that spits out text?

As for unity, it's probably a bit complex for a game like that.. Sure you can make it work without any problems, but it's kind of using a v6 engine to power your fiat panda.

It's still perfectly possible of course, and you could just launch unity, skim through the scripting reference manual and experiment. Although I must say that unity is also visual in some way and not always "hardcore" coding.

You can also google "unity3D text" and you'll see plenty of references to get you started.

Good luck! :)

I forgot to mention, I need browser, so my choices are extremely limited (the no brainer would be Flash of course, but I'm not so fond of it...) Also, I'm kind of curious about Unity and would like to try it.

If you're familiar with C++ and OpenGL, why don't you simply make a small framework that spits out text?

[...]

If you're looking for something a little more advanced, you mentioned that you're familiar with C++, in that case your best bet would probably be to use a freely available framework/library like SDL

That's what I'm doing right now, but it's good for downloadable games only (plus I'm a bit tired of C++, would like to try something more "coder friendly " :)).

Stellar Monarch (4X, turn based, released): GDN forum topic - Twitter - Facebook - YouTube

Why do you think you need a new technology? From the description of the game it seems like you could just use PHP and HTML -- is there something you want to do that you can't easily achieve that way? Unity just doesn't really sound like a good match for what you're after -- if I'm understanding the type of game you want to create correctly then Unity is WAAAAY over powered for it, and also isn't really intended to be used at a low level like you describe.

If you're looking for an alternative, have you considered HTML5, perhaps with a framework such as Lime, Impact, or Melon?

You could also consider HaXe, or targeting the Flash platform with Flex (perhaps using FlashDevelop as an IDE).

If those aren't suitable suggestions could you try explaining the type of game you want to create in more detail?

- Jason Astle-Adams

I'd also gowith one of jbadams suggestions and recommend HTML5. You could use it as is or use one of the many frameworks available to make it coder friendly. Also there are tools available to roll your html5 game up into an executable app that can be distributed on other platforms. Also since HTML5 uses javascript then you could very easily port a lot of your code over to Unity at a later date if you want to start adding 3d graphics and stuff.

You could do this in Unity very easily but it really is overkill for such a simple game. You also said that your coding style is more "hardcore" and unity is the complete opposite of this.

OK, let's try again. I'm making standalone desktop PC games (and sometimes I require 100% of CPU power). But this has a disadvantage, I can't put a demo on sites like Kongregate (and playing the demo without downloading anything is a BIG plus in this business). So I would like something that let me make powerful standalone games that I can put on a website as an option. Also I would love something that is not as low level as C++ (I waste a lot of time doing mundane technical things, as compared to PHP+HTML for example), also I would love it crossplatform, also I want the source of my game stay closed (so HTML5 is out of question). Unity seems the most logical choice.

So, I thought I would try it and convert one of my simpliest game, to check if Unity is worth it or not.

Back to techical question:

- What are the various options to put text on the screen (the "GUI_Text" only or are there other options)?

- How to make a simple clickable button? Are thare various "libraries" for this? If yes, which are the good ones?

- Is there any "component/whatever" that let me render HTML directly on the screen (like in Flash)?

I'm basicly asking to check what are my overall options, the general direction (so I know if I should look for making ortho perspective and create vertices to display flat trianges with a texture to display a 2D image or if there is some higher level object that handles 2D much easier). At the first glance the typical Unity tutorials are geared towards 3D, which is not exactly what I need at the moment.

Stellar Monarch (4X, turn based, released): GDN forum topic - Twitter - Facebook - YouTube

Ok, that makes sense -- it wasn't clear from your original post that you wanted to be able to produce native applications as well as something browser-based.

I'm sure you could do it with Unity, but I'm not familiar enough with it to give advice on that -- perhaps someone else will be able to suggest something -- personally I still think Unity might be a bit overpowered for your current needs, and doesn't quite meet your desire for people to be able to try your demo without downloading anything. Where Flash is very commonly installed and HTML5/JavaScript don't need a plugin, the Unity browser plugin isn't so commonly installed, although it is becoming more common and acceptable over time.

Given you're still interested in web technologies/rendering HTML, you could try node-webkit, awesomium, or a similar solution (Scaleform?) that allows you to embed HTML/JavaScript content into a native application. Targeting Flash with either HaXe or Flex would also still be viable approaches.

//EDIT: I just remembered NME. I believe it's built on top of the above-mentioned HaXe, and exports to a number of different lower-level technologies include native C++ or Flash. It supports Windows, Mac OSX, Linux, Flash Player, HTML5 and mobile targets, while you code in a language very similar to JavaScript or ActionScript. Probably well worth a look for your needs.

Hope that helps -- feel free to ignore my waffling on if you're really set on proceeding with Unity, which is also a great platform! smile.png

- Jason Astle-Adams

Game Maker Studio was mentioned, and though it isn't as low level as you want, it is better than Unity in most cases for 2d games, and it has the advantage that it exports to HTML5, and native platforms as well, similar to Unity in that respect. I'd say it is easier to learn than Unity, and also it is easy to get simple text on the screen, though there isn't a "text object" rather in draw events you draw text, which also allows easy variance via variables.

I playted the game, and I think using GM Studio would be a good bet for it, though as stated above you may be better off using simple HTML5 directly.



This topic is closed to new replies.

Advertisement