I would like to make a game called Tap City, and I’m new to Codea too, so please help!
Could you be more specific. What is Tap City and how is it played.
Sounds like a great game, but are you in it for the long haul?
also, what do you need help with
I need help with the following:
Tap City is what it sounds like, a virtual enhanced city. So I will need help with pickling game data. Also help with the so many classes for buildings, people through out the ages, conditions like sickness, richness, and on fire. Plus help with mini games and server data so friends can visit your city and interact with it, for example buy a house. And I want help with 3D graphics as well! Thanks!
How much programming experience do you have with Codea, Lua, or any other language.
The user and all related content has been deleted.
And how to play… Like sims, but less gross. And the images will be Pixelated Planet Cute
Images. :>
To answer Dave’s question, I am a seasoned veteran programmer in Python, an amateur in C, and a moderate programmer in Java, and I’m fair in Lua. To answer Nate, thanks! If you want to help you can and you can always back out of it if it is too hard… I won’t be mad!
@aurumcoder2624 I just wanted to know because there are some who come into this forum with the same ambitions and they have never written a program before.
Main thread for TC:
-- Tap City! Below is the main thread for this game.
function setup()
print("Hello World!")
button = Button("Play!", 500, 350)
end
-- This function gets called once every frame
function draw()
-- This sets a dark background color
background(48, 48, 157, 255)
-- This sets the line thickness
strokeWidth(5)
-- Do your drawing here
fill(239, 0, 255, 255)
fontSize(75)
font("Copperplate-Light")
text("Tap City", 500, 500)
--PlayButton = sprite("Documents:ExampleCircle", 500, 350)
--fill(255, 238, 0, 255)
--text("PLAY!", 500, 350)
fill(255, 9, 0, 255)
button:draw()
end
@aurumcoder2624 - I suggest you slow down a bit, and learn more about Lua and Codea - there is a lot of stuff on the wiki link above. Then start small and build up.
It is unreasonable to take on a complex project and ask other people to write most of it for you. You will find that most forum users are busy with their own projects.
Button Class
Button = class()
function Button:init(displayName, x, y, action)
-- you can accept and set parameters here
self.displayName = displayName
self.x = x
self.y = y
self.pos = vec2(self.x, self.y)
self.size = vec2(0,0)
self.action = action
self.color = color(113, 66, 190, 255)
end
function Button:draw()
-- Codea does not automatically call this method
pushStyle()
fill(self.color)
font("ArialRoundedMTBold")
fontSize(22)
-- use longest sound name for size
local w,h = textSize(self.displayName)
w = w + 20
h = h + 30
rect(self.pos.x - w/2,
self.pos.y - h/2,
w,h,30)
self.size = vec2(w,h)
textMode(CENTER)
fill(54, 65, 96, 255)
text(self.displayName,self.pos.x+2,self.pos.y-2)
fill(255, 255, 255, 255)
text(self.displayName,self.pos.x,self.pos.y)
popStyle()
end
function Button:hit(p)
local l = self.pos.x - self.size.x/2
local r = self.pos.x + self.size.x/2
local t = self.pos.y + self.size.y/2
local b = self.pos.y - self.size.y/2
if p.x > l and p.x < r and
p.y > b and p.y < t then
return true
end
return false
end
function Button:touched(touch)
-- Codea does not automatically call this method
if touch.state == ENDED and
self:hit(vec2(touch.x,touch.y)) then
if self.action then
self.action()
end
end
end
@auremcoder: Im willing to collaborate with you and work with you on this…I have the time , more codea knowledge (though nowhere near Dave or Jvm or sky or the other rock stars here) and it’ll be a great learning experience for both of us if you’re interested.
@aurumcoder2624
- We live in different time zones all throughout the world, it can take hours for a reply sometimes.
- There’s an edit button next to your post to edit it instead of spamming the thread.
- With your current code, you’re creating a new button 60 times per second. Put that
button = Button()
class into setup, and it’ll work fine. - I would suggest starting much smaller, even if you have some programming experience. A lot of the things you mentioned are not possible in Codea or haven’t been done before (unbelievably hard).
I already wrote most of it ~sniff~ but you are right? That is why I gave users the option of backing out of it. And @SkyTheCoder thanks for the advice, I will start small and update, gradually fulfilling my dream and more!