Homebrew Making my first program, ran into a problem.

  • Thread starter Thread starter LinkMain111
  • Start date Start date
  • Views Views 3,831
  • Replies Replies 29
Code:
I got images to show doing this. I I hope it helps!


capture_by_bronzeflames-d9a9rm4.png


--------------------- MERGED ---------------------------

.png's will also work
Please right your code in
Code:
here
 
Code:
Please right your code in
Code:
here
Code:
Background = Screen.loadImage(System.currentDirectory().."/img/bg.bmp")
red = Color.new(255,0,0)

-- Setting up stuff
while true do
Screen.waitVblankStart()
Screen.refresh()
pad = Controls.read()
if (Controls.check(pad,KEY_START)) then
System.exit()
end

-- Adding the images/text
Screen.drawImage(0,0,Background,TOP_SCREEN)
Screen.drawImage(0,0,Background,BOTTOM_SCREEN)
Screen.flip()
end

-- Making the story
Screen.debugPrint(40,155,"Press A to start",red,BOTTOM_SCREEN)
Screen.flip()
end

--------------------- MERGED ---------------------------

Code:
Please right your code in
Code:
here
sorry by indent I thought you meant tabbing
 
Code:
Background = Screen.loadImage(System.currentDirectory().."/img/bg.bmp")
red = Color.new(255,0,0)

-- Setting up stuff
while true do
Screen.waitVblankStart()
Screen.refresh()
pad = Controls.read()
if (Controls.check(pad,KEY_START)) then
System.exit()
end

-- Adding the images/text
Screen.drawImage(0,0,Background,TOP_SCREEN)
Screen.drawImage(0,0,Background,BOTTOM_SCREEN)
Screen.flip()
end

-- Making the story
Screen.debugPrint(40,155,"Press A to start",red,BOTTOM_SCREEN)
Screen.flip()
end

--------------------- MERGED ---------------------------


sorry by indent I thought you meant tabbing
If you meant me, yes, I did mean tabbing. I'm fairly sure no language looks "prettier" non-indented (uhh assembler maybe?). It helps with readability and understanding where everything begins and ends.
BTW there's a loose "end" in the code you posted.
 
If you meant me, yes, I did mean tabbing. I'm fairly sure no language looks "prettier" non-indented (uhh assembler maybe?). It helps with readability and understanding where everything begins and ends.
BTW there's a loose "end" in the code you posted.
I know- I have fixed it now. I'll clean it up later. I still think it looks better like this.
 
I know- I have fixed it now. I'll clean it up later. I still think it looks better like this.

Do you know that if you write something like 1k lines of code in LUA without identing it, your code will be completely ununderstandable?

For example take CHMM2 source ( https://github.com/Rinnegatamante/CHMM2/blob/master/source/index.lua ) and make the code like no identation.
I challenge you to understand how it works and where loops, if clauses and functions ends.
 
  • Like
Reactions: Garcia98
Do you know that if you write something like 1k lines of code in LUA without identing it, your code will be completely ununderstandable?

For example take CHMM2 source ( https://github.com/Rinnegatamante/CHMM2/blob/master/source/index.lua ) and make the code like no identation.
I challenge you to understand how it works and where loops, if clauses and functions ends.
Challenge accepted! This homebrew will be released within the coming months - it is a port of Oregon trail.
 

Site & Scene News

Popular threads in this forum