Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
First post and question — Gideros Forum

First post and question

loucsamloucsam Member
edited February 2013 in Introduce yourself
Hi Folks,
Max from OZ here. Having a go at Gideros. Wanting to port an existing game to Gideros.
I have written this particular game in different languages over the years and wondering if my C(with Allegro lib), ActionScript 2(with Away3d lib) or my python(with pygame lib) version would be the closest language version to Lua to use as my porting base?

P.S. Never touched Lua before.
Looking forward to having a play with Gideros. Hopefully setting up deployment isn't too hard, something that has moved me away from other cross platform frameworks.

Cheers,
Max

Likes: hgvyas123, gorkem

+1 -1 (+2 / -0 )Share on Facebook
«13

Comments

  • Hi @loucsam

    Welcome Dude and yup it is really easy to get started with gideros most likely you had already setup all things feel free to ask here in case of any probs

    :)
  • Thanks hgvyas123
  • Lua with an event driven mechaniszm like Gideros ues is very different from what you use. Actionscript 3 comes close to some features but the rest you can forget. Dig through the examples and study them closely. Once you understand the methology, then you will get things running fast.
  • Hi @loucsam, and welcome to the madfun house :D
    As @MikeHart says, there are some similarities between Lua & AS but not really enough to do an easy port.
    Also if your game contains any 3D then you are out of luck as Gideros doesn't have any 3D functionality ATM.
  • I would stick with the ActionScript 3 version for two reasons,
    Firstly the Gideros display hierarchy is VERY similar to the flash one and secondly the same concept of using the display object as the base for a class that represents the object is also very similar to the Gideros implementation.

    As for porting AS3 to Lua - the main thing to remember is that a) lua has no switch statement (you can replicate something similar using tables) and that lua also doesn't use braces (C style) it's more "if then else end" basic style, but if you take each class in turn and start at the top and break up the project it should be fairly straightforward and a good way to learn lua to boot.
    WhiteTree Games - Home, home on the web, where the bits and bytes they do play!
    #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
  • Thankyou all.

    I didn't expect a straight port, I was thinking more from a point of view of the syntax wondering which would be closest, and use that version as my main reference in making my Lua version. Sounds like my flash version is the one to use, minus the 3d co-ordinates of course. But the basic logic should translate well.

    First task though is to get a sample program working, and get all the deployment dependency software running and attempt a deployment onto my Android tablet. If I can't get that going, I won't try the conversion. But the deployment process sounds easier than what I was trying, prior to this framework.

    Cheers,
    Max
  • Good luck with the project and keep us updated.
    WhiteTree Games - Home, home on the web, where the bits and bytes they do play!
    #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
  • Thanks techdojo, will do.

    My first hurdle is getting across deployment.

    The docs send you off to other sites, to install eclipse, and adb and ant and some plugin/s and ... and ... and ... and because it sends you off-site you don't know what applies directly to the Gideros environment and what applies to Android development directly from the Android SDK, and there are choices to make which I'm unsure about.

    I've installed some package which appears to have installed a bunch of tools. Now to work out what to do with them all, and how to get a deploy happening.

    Cheers,
    Max
  • To get started, I'd just sideload the gideros player .apk and then use the player to test development, I'd not worry about installing the whole android sdk just yet, leave that until you actually have a game you want to export ready for final testing.
    WhiteTree Games - Home, home on the web, where the bits and bytes they do play!
    #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
  • Well that didn't go so well....

    Exported the Bridge sample program.
    Imported it into Eclipse(as per instructions), and clicked run, and get plenty of errors. The main one is:

    Description Resource Path Location Type
    Android requires compiler compliance level 5.0 or 6.0. Found '1.4' instead. Please use Android Tools > Fix Project Properties. Bridge line 1 Android ADT Problem.
    Attempted to update it but said it was up to date.
  • I always have to change the compliance level in Eclipse when I build anything. I right click on the project (in Eclipse), select properties and then select Java Compiler. There's a little checkbox near the top (from memory) that lets you enable project specific settings and then a drop down where you can set the compliance level to1.6. When I do that, it seems to work!

    If you need more detail, then don't ask me as I'm in the dark side of Eclipse as far as understanding what happens in there - I just blindly do it and it works :)) But there are plenty of people on her who do know what they are doing, so help will no doubt come.
  • john26john26 Maintainer
    Python is very similar to Lua. But Lua is more elegant. In Python you have lists, dictionaries, tuples and classes. These are all compacted into one data type in Lua: the table. I wrote a comparison between Python and Lua which I can send you if you like..?
  • ScouserScouser Guru
    edited February 2013
    @loucsam & @petec You can change the global compiler compliance level by selecting Window > Preferences which will open a dialog box.

    Select Java > Compiler in the left pane and change your compliance level to 1.6 from the drop down selector on the right and click OK.

    This should now work for all exported projects without ever having to change it again.
  • @Scouser Thanks for that. Told you I knew nothing about Eclipse (and you should see me battle with building and submitting ios apps :) ).
  • Thanks john26, I would appreciate that.

    Thankyou petec and Scouser, I will give that a try next chance I get.

    Techdojo, my first priority on settling with a framework to develop in is the ease of deployment. I just abandoned another framework because of deployment hassles, so I want to make sure that workflow is good for me, before I start.

    After that I'll try some examples and the game template.

    Cheers,
    Max
  • Once I get started with programming, the first thing I will be trying to work out is whether I can use this type of 2 dimensional array along with a structure.

    E.g
    board[x][y].guessed = true/false;
    board[x][y].piece = 4;
    board[x][y].piecename = "Rook";
  • @loucsam: Yes you can use a 2 dimensional array. You would initialise it something like
    local board = {}
    local row, piece
    for y=1, HEIGHT do
    	row = {}
    	for x=1, WIDTH do
    		-- this could easily be incorporated into the next line but I think it's more readable here
    		piece = {guessed = false, piece = 1, pieceName="pawn"}
    		-- Add the piece to this row
    		row[x] = piece
    	end
    	-- Add the row to the board
    	board[y] = row
    end

    Likes: loucsam

    +1 -1 (+1 / -0 )Share on Facebook
  • Which is basically a table of tables. Alternatively you can also just do this...
    local board = {
       {1,2,3,4,5,6},
       {1,2,3,4,5,6},
       {1,2,3,4,5,6},
       {1,2,3,4,5,6}
    }   
     
    local val = board[1][1]
    The main thing to remember with lua is that arrays are referenced from 1 to their size NOT 0 to size-1. There's nothing to stop you accessing arrays out of bounds or starting at zero. BUT if you initialise a table (as above) the [0] entry will be nil

    Yes this is LEGAL Lua code - stupid but legal!
        board = {1,2,3,4,5}
        board[-1] = "another value"
    :)

    Likes: loucsam

    WhiteTree Games - Home, home on the web, where the bits and bytes they do play!
    #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
    +1 -1 (+1 / -0 )Share on Facebook
  • Thanks scouser, techdojo, I'm glad you pointed out the intricacies of arrays. that is very helpful.

    Cheers,
    Max
  • Getting closer....

    I have installed the giderosplayer on an Android tablet, run it and grabbed the IP address.
    I have manage to run the bridge sample program directly on the tablet.

    I have managed to now run export the bridge sample and load it into eclipse, and set up an emulation of a 10 inch device and got bridge running in this, although it ran at probably less than 1 FPS.

    Now I need to work out how to get the bridge sample android package to the android, and eclipse talking to my tablet, so I can run it directly on my tablet.

    Once I have that sussed I will be happy :D and then start coding.

    Thanks everyone, you have been most helpful.

    Cheers,
    Max
  • My Android tablet has 2 possible connections, USB storage type connection or one labelled HOST.

    When plugged into the USB symbol connection, my computer sees the tablet as a USB drive effectively. Can i copy something created by eclipse directly to my tablet through this?

    I don't know how to get my eclipse seeing the tablet.

    as per this instruction in the docs for deploying:
    "Click on Run → Run. If your device is plugged to your computer, application will be installed to the device and run immediately. "

    It launches the emulator I had set up, instead.

    Cheers,
    max

  • hgvyas123hgvyas123 Guru
    edited February 2013
    you need to check

    allow apps from non market or something similar in your tablet

    need to check usb debugging or android debugging in your tablet

    both can be found in system settings

    after that eclipse will able to detect your device and you can run
  • at the another end you can create apk from eclipse export--> signed apk --> follow some easy steps and copy that in your sdcard and then install it but that is little bit irritating

    :)
  • and i had completed 500 post wooooohooooo :bz


    :D
  • scouser - it's a low end tablet that I bought specifically to try programming on.

    http://www.kogan.com/au/buy/agora-10-dual-core-tablet-16gb/

    ...which means it will not be listed in a standard set of tablet devices.

    My PC (outside of eclipse) recognises the tablet as a mounted drive no problems from that point of view, I just could not work out how to get eclipse seeing it, in the little time I had left in the evening.

    I'll take a look for 'allow apps from non-market' and 'debug' type settings , thanks hgvyas and congratulations on your 500th post. :D

    As mentioned there are 2 connections to use on my tablet, USB or HOST, I am not sure what the HOST one is, haven't had it very long, but connected via the USB my PC sees it.

    Almost there!

    Cheers,
    Max
  • I've emailed the company asking what the HOST connection port is.
  • and i had completed 500 post wooooohooooo :bz


    :D
    Not bad - almost halfway there :)
    WhiteTree Games - Home, home on the web, where the bits and bytes they do play!
    #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
  • @loucsam: If you give me the VID & PID I can try and modify my driver file and send that to you. Maybe that will work.
    You can find your VID & PID by locating your device in your device manager (it may show up as unknown device).
    If you can't find the device itself then find the disk device in the Disk drives section of your device manager.

    Right click on the device corresponding to the android disk drive and select properties.
    Now select the Details tab in the dialog box that popped up.
    In the Property drop down list there will be an entry called parent. Select this and in the Value area you should see something like
    USB\VID_18D1&PID_4E22&MI_00\6&c2ba2f&0&0000
Sign In or Register to comment.