Author Topic: Infos for a new developer!  (Read 9616 times)

Lardos (OP)

  • *
  • Posts: 25
Infos for a new developer!
« on: July 14, 2013, 09:44:14 pm »
Hello everybody!

I am a hobby programmer and I know most of the basics in C++ and Java. Now, I wanted to create a game for the Zero but I have some questions...
Which libaries are recommended to use when I code for the Zero? SDL?
Are there any types of engines (like the unity engine) which are compatible with the Zero and helps the programmer to handle stuff?
What do I need to run a programm on the Zero? Can it handle .exe files (Never worked with Linux before :/ )?

It would be great if somebody could answer my questions :)

Greetings from germany!
Luca

DiegoSLTS

  • *
  • Posts: 365
Re: Infos for a new developer!
« Reply #1 on: July 15, 2013, 01:23:47 am »
I am a hobby programmer and I know most of the basics in C++ and Java.
You can't make Java apps for the Zero, but you can use C/C++ and Python (and maybe some other scripting languages, I'm not sure).

Which libaries are recommended to use when I code for the Zero? SDL?
SDL is the best option for C/C++, yes. If you take a look on the links at the end of the post you'll see that a lot of effort was put to have good SDL support. You can use SDL for output (image and sound) and input (button presses) just like you'll do for any other OS.

Are there any types of engines (like the unity engine) which are compatible with the Zero and helps the programmer to handle stuff?
There's pygame if you use Python, but for C/C++ there are no frameworks. Also, I think Unity is not even open source, so you should not expect support for it on the Zero for now.
I think that Lua scripts are supported and there was once support for L?ve2D engine (on legacy dingux), so maybe in the near future it'll be supported again.

What do I need to run a programm on the Zero?
For C++:
You need the toolchain (you can download it from one of the links below) to make compatible binary files and an FTP client (like Filezilla) to transfer those files to the Zero's internal or external memory. The toolchan can be configured on Windows using cygwin, but it's easier to use a linux OS.
To setup the toolchain in windows you can find some instructions here: http://boards.dingoonity.org/dingux-releases/opendingux-toolchain-for-windows-%28cygwin%29/msg51785/#msg51785
To setup the toolchain in linux you can follow the instructions in the same page with the download links.

For python:
You don't need the toolchain, just make sure your game has a 320x240 resolution and the input is correctly mapped. You'll also need the FTP client to transfer the game to the Zero's memory.

Can it handle .exe files (Never worked with Linux before :/ )?
No, .exe files are Windows binaries. In linux you don't really need extensions, but more importantly, windows binaries won't work on linux (and most of the times, any binary file will need to be recompiled to work on another OS).
You can, however, test your games on any OS that supports the same libraries and then try to make it work on the Zero recompiling the game with the new toolchain.

This are some helpfull links:
http://www.gcw-zero.com/develop
http://wiki.dingoonity.org/index.php?title=OpenDingux:Development
http://wiki.dingoonity.org/index.php?title=OpenDingux:FAQ

You can also look at the source code of other emulators and games (the makefiles at least), it helps you understand how the toolchain is used.
« Last Edit: July 15, 2013, 02:01:49 am by DiegoSLTS »

zear

  • * Moderator
  • Posts: 2379
Re: Infos for a new developer!
« Reply #2 on: July 15, 2013, 02:43:27 am »
To clarify on the .exe question:

GCW Zero does not use an x86/x64 processor architecture like the desktop computers do, but rather a MIPS one (mips32r2 to be exact).
This means that you can't run machine code with instructions for 8086 processors (what you most likely think about when saying ".exe). You need machine code compatible with MIPS instructions. And for that you need to use a special compiler that converts the C/C++ syntax into assembler and later the proper MIPS machine code. We supply this compiler together with a set of libraries and tools. Together we call it a "toolchain". Any code you want to run on the GCW Zero, will need to be built using our compiler.

This very nature of the GCW Zero platform also means that the number of libraries and programs available is limited to the ones that have publically available source code, which can be recompiled for MIPS (of course it doesn't mean that every library or program can be made to run on the GCW if it only has the source available, but it sure is the first requirement for any further work).

pcercuei

  • ***
  • Posts: 1428
    • My devblog
Re: Infos for a new developer!
« Reply #3 on: July 15, 2013, 03:05:58 am »
Are there any types of engines (like the unity engine) which are compatible with the Zero and helps the programmer to handle stuff?
There's pygame if you use Python, but for C/C++ there are no frameworks. Also, I think Unity is not even open source, so you should not expect support for it on the Zero for now.
I think that Lua scripts are supported and there was once support for L?ve2D engine (on legacy dingux), so maybe in the near future it'll be supported again.
BennuGD is also included in the rootFS. About L?ve, it's just waiting patiently for the GL libs to come. As soon as we have those, I'll add L?ve to the rootFS for those who like that framework.

Lardos (OP)

  • *
  • Posts: 25
Re: Infos for a new developer!
« Reply #4 on: July 15, 2013, 11:50:49 am »
Thank you for the quick infos!
My aim was to create a simple 3D Environment with a fps controller. I thought I could handle 3D graphics with the openGL libary but as far as I know the Zero does not support openGL. Are there other possibilities of doing this?

zear

  • * Moderator
  • Posts: 2379
Re: Infos for a new developer!
« Reply #5 on: July 15, 2013, 12:00:27 pm »
The GCW Zero hardware has an OpenGL ES 2.x compatible GPU. At the moment it is not supported by the software (lack of working gpu drivers), however the goal is to have a working GLES support.
You can check the etnaviv project to track the current status of the GPU drivers.

There are ways to render 3D without the use of hardware acceleration. Such engines are called "software renderers".
There is a plenty of 3D engines that render in software, available for the GCW Zero right now. Most of them come from old games, like Quake, Quake II, Descent, etc., however there are also more recent examples, with much cleaner code and the developers still around:
* sparrow3d, used in Puzzletube
* fgl, used in AstroLander

You can find the authors of both engines on our IRC channel sometimes.

fosamax

  • *
  • Posts: 297
Re: Infos for a new developer!
« Reply #6 on: July 15, 2013, 01:38:08 pm »
Maybe a good starting point would be to play with Yeti3D/Yeti3D Pro engine http://sourceforge.net/projects/yeti3dpro/?source=dlp

Cube/CUbe is probably a better engine but relies on OpenGL.

Yeti3D ran quite well on the Dingoo A320 and offers md2 models as well as opportunity to develop different kind of games (fps, racing, maze, 2,5D platformers...)

robert2098

  • *
  • Posts: 48
Re: Infos for a new developer!
« Reply #7 on: July 15, 2013, 06:41:24 pm »
I am a hobby programmer and I know most of the basics in C++ and Java.
You can't make Java apps for the Zero

It would be possible to have limited Java support using JamVM with the GNU Class Path Library.

JamVM is an open source Java virtual machine designed for low-end hardware and it can also be compiled for Mips. It has support for JNI to call native libs. The GNU class path even has (limited) AWT and Swing support but I wonder if that can made to work with JamVM. So Java GUI/graphics support will probably difficult and you should use JNI to call native libs for graphics output. That said, I don't think this setup will be very good for writing games.

Robert


Lardos (OP)

  • *
  • Posts: 25
Re: Infos for a new developer!
« Reply #8 on: July 15, 2013, 09:51:18 pm »
I took a look at the three engines that were mentioned:

- fgl
- Sparrow3D
- Yeti3D

But I have the problem that I never used a pre-coded engine before and I dont know how to implement them. Sorry for that very basic queston but I can not find any kind of tutorial that helps me out. I commonly used libarys in my projects and when I need a particular function I searched in the api. But none of these engines seems to have one :(

Edit: Okay I found something like a API. But I still dont know how to use them in visual studio. Perhaps I should experiment a bit with the given things.
« Last Edit: July 15, 2013, 10:02:53 pm by Lardos »

zear

  • * Moderator
  • Posts: 2379
Re: Infos for a new developer!
« Reply #9 on: July 15, 2013, 11:15:22 pm »
You can't use the Visual Studio, as it doesn't compile for MIPS (or Linux in general). You need to use our toolchain. The compiler we use is GCC. You will need to learn how to use the Makefiles. I should also mention at this point that you will need an x86 Linux PC to use this compiler.
Feel free to join the previously mentioned IRC for a detailed help.

the_gama

  • *
  • Posts: 155
Re: Infos for a new developer!
« Reply #10 on: July 16, 2013, 02:06:44 am »
How about a VMware image?  I use one to dev for rockbox and it is fast and easy to use it, it uses debian and comes with the rockbox toolchain installed.

Could be nice to have a gcw0 image for non-linux users.  Unfortunately I don't know how to make one ;P.

pcercuei

  • ***
  • Posts: 1428
    • My devblog
Re: Infos for a new developer!
« Reply #11 on: July 16, 2013, 04:10:26 am »
We have one for qemu (though I don't know if it's already available somewhere).

RodrigoCard

  • *
  • Posts: 314
    • Mac Joystick Apps
Re: Infos for a new developer!
« Reply #12 on: July 16, 2013, 05:57:20 am »
How about a VMware image?  I use one to dev for rockbox and it is fast and easy to use it, it uses debian and comes with the rockbox toolchain installed.

Could be nice to have a gcw0 image for non-linux users.  Unfortunately I don't know how to make one ;P.

I think the easiest thing you can do to get something more "windowish" is:

1- Download VirtualBox and Latest LTS Ubuntu
2- Install ubuntu in a new virtual machine, trust me, it is pretty straightfoward!
3- Install the toolchain
4- Get Code::blocks, I never used it, but seems to fit your needs.
5- Well, you will need to change code blocks configuration to point where the toolchain mipsel-gcc compiler is, but, shouldnt be hard.
« Last Edit: July 16, 2013, 06:03:03 am by RodrigoCard »

zear

  • * Moderator
  • Posts: 2379
Re: Infos for a new developer!
« Reply #13 on: July 16, 2013, 12:44:22 pm »
We have one for qemu (though I don't know if it's already available somewhere).
Well, there's two things with it:
1) It emulates a MIPS machine in order to run GCW software natively, it doesn't emulate an x86 Linux to run our toolchain.
2) I am not sure if it is able to handle hardware surfaces and double buffering that the real GCW uses (it has been a while since we have tested our rootfs with the qemu image).

Lardos (OP)

  • *
  • Posts: 25
Re: Infos for a new developer!
« Reply #14 on: July 16, 2013, 01:26:41 pm »
How about a VMware image?  I use one to dev for rockbox and it is fast and easy to use it, it uses debian and comes with the rockbox toolchain installed.

Could be nice to have a gcw0 image for non-linux users.  Unfortunately I don't know how to make one ;P.

I think the easiest thing you can do to get something more "windowish" is:

1- Download VirtualBox and Latest LTS Ubuntu
2- Install ubuntu in a new virtual machine, trust me, it is pretty straightfoward!
3- Install the toolchain
4- Get Code::blocks, I never used it, but seems to fit your needs.
5- Well, you will need to change code blocks configuration to point where the toolchain mipsel-gcc compiler is, but, shouldnt be hard.

Okay I will try to get it run on the Virtual Machnine. It seems that I slowly get the hang of it... Thanks for the info! I will try to figure out how to change the configurations of codeblocks so that it uses the toolchain compiler thing ^^

the_gama

  • *
  • Posts: 155
Re: Infos for a new developer!
« Reply #15 on: July 16, 2013, 02:04:27 pm »
I remember I tried VirtualBox in the past, but it wasn't as fast as VMware.  But will try both again, I suppose I can always download a debian VMware image and install the gcw0 toolchain as described above.  I have also used Code::Blocks, it's a really nice editor, but even working with the terminal is fine.

I have a couple of projects I want to port to the zero ;).

DiegoSLTS

  • *
  • Posts: 365
Re: Infos for a new developer!
« Reply #16 on: July 16, 2013, 02:51:36 pm »
I took a look at the three engines that were mentioned:

- fgl
- Sparrow3D
- Yeti3D

But I have the problem that I never used a pre-coded engine before and I dont know how to implement them. Sorry for that very basic queston but I can not find any kind of tutorial that helps me out. I commonly used libarys in my projects and when I need a particular function I searched in the api. But none of these engines seems to have one :(

Edit: Okay I found something like a API. But I still dont know how to use them in visual studio. Perhaps I should experiment a bit with the given things.
Don't take this the wrong way, but I think your trying too many new things at the same time. If you're sure that you'll make a game for OpenDingux maybe you should do it step by step. I would suggest:

1 - Do the "Hello world" as described here: http://wiki.dingoonity.org/index.php?title=OpenDingux:Development#Development_in_OpenDingux_-_Hello_World.21
2 - Create a makefile for it (ideally, that builds two binaries, one for your development machine and one for OpenDingux)
3 - Add SDL support to show a square that exists with a keypress
4 - Setup an IDE to use that makefile

After this you can add more libraries, more source code, etc, and at any moment you can make an OpenDingux binary to do a real test in the device.
« Last Edit: July 16, 2013, 02:58:01 pm by DiegoSLTS »

Lardos (OP)

  • *
  • Posts: 25
Re: Infos for a new developer!
« Reply #17 on: July 16, 2013, 04:03:12 pm »
I took a look at the three engines that were mentioned:

- fgl
- Sparrow3D
- Yeti3D

But I have the problem that I never used a pre-coded engine before and I dont know how to implement them. Sorry for that very basic queston but I can not find any kind of tutorial that helps me out. I commonly used libarys in my projects and when I need a particular function I searched in the api. But none of these engines seems to have one :(

Edit: Okay I found something like a API. But I still dont know how to use them in visual studio. Perhaps I should experiment a bit with the given things.
Don't take this the wrong way, but I think your trying too many new things at the same time. If you're sure that you'll make a game for OpenDingux maybe you should do it step by step. I would suggest:

1 - Do the "Hello world" as described here: http://wiki.dingoonity.org/index.php?title=OpenDingux:Development#Development_in_OpenDingux_-_Hello_World.21
2 - Create a makefile for it (ideally, that builds two binaries, one for your development machine and one for OpenDingux)
3 - Add SDL support to show a square that exists with a keypress
4 - Setup an IDE to use that makefile

After this you can add more libraries, more source code, etc, and at any moment you can make an OpenDingux binary to do a real test in the device.

Yes you are totally right! I had no starting point. But the tutorial you mentioned is exactly what I was looking for! So thanks alot!
« Last Edit: July 16, 2013, 04:52:51 pm by Lardos »

Moehammered

  • *
  • Posts: 15
Re: Infos for a new developer!
« Reply #18 on: August 16, 2013, 12:07:28 pm »
Hey there everyone, sorry I couldn't find a suitable thread to post this in but it would be good information for future developers I guess so here goes.

Is the toolchain compatible with all flavors of linux? I don't like Ubuntu that much, I prefer fedora, so before I go ahead and install Fedora on my netbook, will the toolchain be compatible?

Thanks in advance:)
[Experience]
3 years C++ w/ SDL_GL, 2 years Java w/ LWJGL, 2 years UDK (Unreal Engine 3), 1 Year Unity (Unity3D)

[Consoles]
2 GB DMG-01, 1 GBC, 3 GB Pocket, GBA SP, JXD s601, PSP Slim, PS Vita, Open Pandora 1GHz Edition, annnd drumroll......... GCW ZERO SE!!!! :D

Shin-NiL

  • *
  • Posts: 375
    • Shin-NiL's Personal Web Page (Brazilian Portuguese)
Re: Infos for a new developer!
« Reply #19 on: August 16, 2013, 12:19:06 pm »
In theory it is compatible with any x86 linux distro.

 

Post a new topic