Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

How do I get started on an iOS game?

edited July 2016 in Questions Posts: 4

I have an idea for a 2D or 3D Pokemon-like game, but I'm not exactly sure what to do. I named a new Codea file Symbiotes and chose a color for the background, but what the background is for, I don't know. Do I need to create a menu and work from there forward, or what? Do I only focus on creating a large explorable map as a starting point? Or something else?

Tagged:

Comments

  • edited July 2016 Posts: 160

    If you want to make menus. I recommend using a simple method (since I'm guessing you're new) such as creating a variable called, say "menu", with the value of 1. Then in the draw function, you could use if statements to check what menu equals. For example, below is some simple code that uses a variable called "state" to determine which screen to show. Try experimenting by changing the value of "state" in the code to different numbers.

    -- Use this function to perform your initial setup
    function setup()
        state = 3 -- change this to different numbers
    end
    
    -- This function gets called once every frame
    function draw()
        if state == 1 then -- if state is equal to 1, then do the below.
    
            -- This sets a dark background color
            background(40, 40, 50)
    
            -- This sets the fill color to red
            fill(255,0,0)
    
            -- This sets the stroke width (the outline width) to 5
            strokeWidth(5)
    
            -- This sets the stroke color (thr outline color) to white
            stroke(255,255,255)
    
            -- This makes a circle appear on the screen with all the settings we've set above
            ellipse(400,300,100)
        elseif state == 2 then -- if state is not equal to 1 and instead is equal to 2, then do the below.
    
            -- This sets a bright background color
            background(200,230,210)
    
            -- This sets the fill color to blue
            fill(0,0,255)
    
            -- This sets the stroke width (the outline width) to 10
            strokeWidth(10)
    
            -- This sets the stroke color (thr outline color) to orange
            stroke(255,127.5,0)
    
            -- This makes a rectangle appear on the screen with all the settings we've set above
            rect(100,200,400,200)
        else -- If state isn't equal to 2 either, then just do the below.
    
            -- This sets a green background color
            background(0,255,0)
    
            -- This sets the fill color to black
            fill(0,0,0)
    
            -- This sets the text size to 30
            fontSize(30)
    
            -- This makes text that says "Text" with all the settings we've set above appear on the screen.
            text("Text",200,200)
        end
    end
    

    If you are not new, I'm sorry, I was only guessing. :'(

  • IgnatzIgnatz Mod
    Posts: 5,396

    Assuming you are new to programming, I would forget about making a specific game right now, and concentrate on learning about Lua (the language behind Codea) and then Codea. The wiki page has lots of links to help you.

    It's like anything, you need to learn some basic skills before you can make anything useful.

Sign In or Register to comment.