ID:1299979
 
(See the best response by Jittai.)
Code:
mob/proc/NewChar()
var/mob/creation
creation = src
var/newname = null
if(!src.NameChosen)
newname = input("<center>What will your name be?", "Name") as text
if(alert("Do you wish to be named [newname]?", "Name","Yes","No")=="Yes")
src.name = newname
src.NameChosen = 1
src.CharacterClickable=1
for(var/turf/Blue_Block/BB)
set background = 1
var/image/B = image('Black.dmi', src)
B.loc = BB
src<<B
for(var/turf/White_Block/GB)
set background = 1
var/image/B = image('Black.dmi', src)
B.loc = GB
src<<B
for(var/turf/New/N)
set background = 1
var/image/B = image('Black.dmi', src)
B.loc = N
src<<B
for(var/turf/Load/L)
set background = 1
var/image/B = image('Black.dmi', src)
B.loc = L
src<<B
for(var/turf/Delete/D)
set background = 1
var/image/B = image('Black.dmi', src)
B.loc = D
src<<B
for(var/turf/Cyborg/C)
set background = 1
var/image/B = image('Black.dmi', src)
B.loc = C
src<<B
var/image/I = image('Cyborg.dmi',src)
I.loc = locate(4,6,2)
src << I


Problem description:Alright, this might be a bit noobish of me to write this code like this, but at least I'm practicing lol. Anyways, my problem is pretty simple, the image appearance lags a tad bit whenever this code is executed. On rare occasions, the transition from seeing the title screen to seeing all black is instantaneous, but most of the times, everything turns black, except for like 4 random turfs. Half a second later (sometimes a bit less), the remaining turfs turn black. And the Cyborg icon towards the end of the code appears until the title screen turns black. Is there a way to make it so that everything happens instantaneous?

P.S. I am doing this to see if I can accomplish this without making different map areas for a title screen. If there is a better way of doing this, please let me know.

Personally I make my title pages on a different pane than my map, then when they load the game the main child I use starts as the title screen and switches to my main map once they're in the game.
Right, I could do that, but I was trying to see if I could go around that xD
That's a lot different than having your title on your map.
And a much better method than using images.
What is this even for?
Just playing around with title screens Jitai,..Was trying to see if I could make a complete title screen that essentially changes....screens? without actually changing the location of the player and the changing of screens would only be visible to the player creating a character.


If that makes any sense...
Best response
What's wrong with screen objects using screen_loc? If I'm understanding this this places an image on every turf in the world by those types.
Truth be told, I've never fiddled around with coding that affects the screen directly so this was a first. That's why I said "If there is a better way of doing this, please let me know.". I'll give it a shot :3
Ok good luck.
You'd still be waaayyy better off using a separate pane in your interface for your title screen.
What does a separate pane even mean? Are you suggesting he use a pane to display some .png with buttons on it; then swapping it out for the map?

That's not really "waaaaay" better off.
Maybe this will help?
mob/proc/NewChar()
var/mob/creation
creation = src
var/newname = null
if(!src.NameChosen)
newname = input("<center>What will your name be?", "Name") as text
if(alert("Do you wish to be named [newname]?", "Name","Yes","No")=="Yes")
src.name = newname
src.NameChosen = 1
src.CharacterClickable=1
for(var/turf/T in view()) //rather than checking EVERY turf of those types in world, just check the ones within your sight.
set background = 1 //Since in every scenario the background is set to 1
switch(T.type) //Check to see what type of turfs are found
if(/turf/Blue_Block)
var/image/B = image('Black.dmi', src)
B.loc = T
src << B
if(/turf/White_Block)
var/image/B = image('Black.dmi', src)
B.loc = T
src << B
if(/turf/New)
var/image/B = image('Black.dmi', src)
B.loc = T
src << B
if(/turf/Load)
var/image/B = image('Black.dmi', src)
B.loc = T
src << B
if(/turf/Delete)
var/image/B = image('Black.dmi', src)
B.loc = T
src << B
if(/turf/Cyborg)
var/image/B = image('Black.dmi', src)
B.loc = T
src << B
var/image/I = image('Cyborg.dmi',src)
I.loc = locate(4,6,2)
src << I

As everyone else is saying there are better ways to do it. But I think this will solve the problem for your current method.
Yes I am, and yes it is. You use a child instead of your map in your main window, and simply switch it between your title screen pane and your map pane. You can also use it for other things as well, like if you have a skill tree or anything.

It's a pretty simple method that works very well.
You can do all that with 1 map element and screen objects.
I was playing around with screen_loc and was trying to do something simple like this

    var/image/B = image('Black.dmi',src)
B.screen_loc = "1,1"
src<<B


The image appears right in the center of the screen, and if i change the viewpoints, the image still stays in the center.

the same happens if I do a B.screen_loc = "1,1 to 4,4". I'm probably doing something wrong with the way I am coding this >.> Again, it's my first time actually using map/HUD codes.
In response to Koriami
Yes, that really helped. But I am also being stubborn trying to make it work with sreen_loc as Jittai suggested. That way I can learn from both ways xD

Thanks!
screen_loc works in objects, idk if they work with images. Actual objects. "/obj"

also, src.client.screen += B. ;)
awesome :)

Thanks Jittai