1. Image Not Appearing

Hello, I'm using Euphoria 4.0 and the most current version of the SDL wrapper. I am trying to blit an image to the screen, yet it is not showing on the screen. I have posted my code.

without warning 
without type_check 
 
include std/get.e 
include std/sort.e 
include std/rand.e 
include std/math.e 
include std/mathcons.e 
include std/eds.e 
include std/filesys.e 
include std/wildcard.e 
 
include Sdl_Wrap.ew 
include SDL_image.ew 
 
constant TRUE = 1 
constant FALSE = 0 
 
constant MAX_HEALTH = 100 
constant MAX_LIVES = 3 
constant ENEMY_LIVES = 1 
 
constant MAX_WIDTH = 800 
constant MAX_HEIGHT = 600 
constant MAX_DEPTH = 32 
 
atom dummy 
atom surface,buffer 
atom keyState,curKey,prevKey 
atom run 
atom title,logo --gfx 
atom ship,missle,enemy --gfx  
atom backdrop --gfx 
atom shiprect,misslerect,enemyrect --rects 
integer shipx,shipy,shipwidth,shipheight 
integer misslex,missley,misslewidth,missleheight 
integer enemyx,enemyy,enemywidth,enemyheight 
atom shipvelx,shipvely 
atom enemyvelx,enemyvely 
atom misslevelx,misslevely 
atom format 
 
integer Missle_Fired = FALSE 
 
atom health = MAX_HEALTH 
atom lives = MAX_LIVES 
 
atom score 
 
sequence sTitle = "4000 A.D. - Geek Punk Games" 
sequence sIcon = "" 
 
integer enemypoints 
integer ticks,last_tick 
atom deltatime 
 
sequence Screens = {"Logo","Title","Game"} 
atom screen 
 
procedure CalcRect(atom rect, integer sx, integer sy, integer tx, integer ty) 
 
	poke(rect,and_bits(sx,255)) 
	poke(rect+1,floor(sx/256)) 
	poke(rect+2,and_bits(sy,255)) 
	poke(rect+3,floor(sy/256)) 
	poke(rect+4,and_bits(tx,255)) 
	poke(rect+5,floor(tx/256)) 
	poke(rect+6,and_bits(ty,255)) 
	poke(rect+7,floor(ty/256)) 
	 
end procedure 
 
procedure Init() 
 
	dummy = SDL_Init(SDL_INIT_EVERYTHING) 
	 
	if dummy = -1 then 
		puts(1,"Could not init SDL") 
	end if 
	 
	surface = SDL_SetVideoMode(MAX_WIDTH,MAX_HEIGHT,MAX_DEPTH,SDL_HWSURFACE) 
	 
	SDL_WM_SetCaption(sTitle,sIcon) 
	 
	format = peek4u(surface+4) 
	 
	shiprect = allocate(16) 
	enemyrect = allocate(16) 
	misslerect = allocate(16) 
	 
	title = IMG_LoadJPG("Title.jpg") 
	logo = IMG_LoadJPG("Logo.jpg") 
	backdrop = IMG_LoadJPG("Backdrop.jpg") 
	ship = IMG_LoadJPG("Ship.jpg") 
	enemy = IMG_LoadJPG("Enemy.jpg") 
	missle = IMG_LoadJPG("Missle.jpg") 
	 
	--get rid of background color on image(the whitespace) 
	dummy = SDL_SetColorKey(ship,SDL_SRCCOLORKEY,SDL_MapRGB(format,255,255,255)) 
	if dummy = -1 then 
		puts(1,"Could not apply color key") 
	end if 
	 
	dummy = SDL_SetColorKey(enemy,SDL_SRCCOLORKEY,SDL_MapRGB(format,255,255,255)) 
	if dummy = -1 then 
		puts(1,"Could not apply color key") 
	end if 
	 
	dummy = SDL_SetColorKey(missle,SDL_SRCCOLORKEY,SDL_MapRGB(format,255,255,255)) 
	if dummy = -1 then 
		puts(1,"Could not apply color key") 
	end if 
	 
end procedure 
 
procedure Run() 
 
	run = 1 
	screen = Screens[1] 
	 
	while run = 1 do 
	 
		ticks = SDL_GetTicks() 
	 
		SDL_PumpEvents() 
		 
		keyState = SDL_GetKeyState(NULL) 
		if peek(keyState+SDLK_ESCAPE) > 0 then 
			run = 0 
		end if 
		 
		dummy = SDL_BlitSurface(logo,NULL,surface,NULL) 
		if dummy = -1 then 
			puts(1,"Could not blit surface") 
		end if 
		 
		if peek(keyState+SDLK_RETURN) > 0 and screen = Screens[1] then 
			screen = Screens[2] 
		end if 
		 
		if screen = Screens[2] then 
			dummy = SDL_BlitSurface(title,NULL,surface,NULL) 
			if dummy = -1 then 
				puts(1,"Could not blit surface") 
			end if 
		end if 
	 
	end while 
	 
end procedure 
 
procedure Quit() 
	 
	SDL_FreeSurface(ship) 
	SDL_FreeSurface(enemy) 
	SDL_FreeSurface(missle) 
	SDL_FreeSurface(title) 
	SDL_FreeSurface(logo) 
	SDL_FreeSurface(backdrop) 
	 
	free(shiprect) 
	free(enemyrect) 
	free(misslerect) 
 
	SDL_Quit() 
	 
end procedure 
 
Init() 
Run() 
Quit() 
new topic     » topic index » view message » categorize

2. Re: Image Not Appearing

Lone_EverGreen_Ranger said...

Hello, I'm using Euphoria 4.0 and the most current version of the SDL wrapper. I am trying to blit an image to the screen, yet it is not showing on the screen.

I don't know about SDL, but whenever there is a problem, it's a good idea to let euphoria do some type checking, comment these out or use with instead of without. don't forget to turn them back off to get full speed later.

without warning 
without type_check 
 
new topic     » goto parent     » topic index » view message » categorize

3. Re: Image Not Appearing

ne1uno said...
Lone_EverGreen_Ranger said...

Hello, I'm using Euphoria 4.0 and the most current version of the SDL wrapper. I am trying to blit an image to the screen, yet it is not showing on the screen.

I don't know about SDL, but whenever there is a problem, it's a good idea to let euphoria do some type checking, comment these out or use with instead of without. don't forget to turn them back off to get full speed later.

without warning 
without type_check 
 

An error comes up. type_check failure, screen is {76, 111,103,111}. Called from line 170.

new topic     » goto parent     » topic index » view message » categorize

4. Re: Image Not Appearing

Lone_EverGreen_Ranger said...
ne1uno said...
Lone_EverGreen_Ranger said...

Hello, I'm using Euphoria 4.0 and the most current version of the SDL wrapper. I am trying to blit an image to the screen, yet it is not showing on the screen.

I don't know about SDL, but whenever there is a problem, it's a good idea to let euphoria do some type checking, comment these out or use with instead of without. don't forget to turn them back off to get full speed later.

without warning 
without type_check 
 

An error comes up. type_check failure, screen is {76, 111,103,111}. Called from line 170.


Obviously, you said screen is an atom, you cannot tell it to be "Logo".

useless

new topic     » goto parent     » topic index » view message » categorize

5. Re: Image Not Appearing

useless_ said...
Lone_EverGreen_Ranger said...
ne1uno said...
Lone_EverGreen_Ranger said...

Hello, I'm using Euphoria 4.0 and the most current version of the SDL wrapper. I am trying to blit an image to the screen, yet it is not showing on the screen.

I don't know about SDL, but whenever there is a problem, it's a good idea to let euphoria do some type checking, comment these out or use with instead of without. don't forget to turn them back off to get full speed later.

without warning 
without type_check 
 

An error comes up. type_check failure, screen is {76, 111,103,111}. Called from line 170.


Obviously, you said screen is an atom, you cannot tell it to be "Logo".

useless

So I should make the variable 'screen' be an object or a sequence?

EDIT: I made it an object, now I get the error, sequence lengths are not the same (4 != 5). What does that mean?

new topic     » goto parent     » topic index » view message » categorize

6. Re: Image Not Appearing

Lone_EverGreen_Ranger said...
useless_ said...
Lone_EverGreen_Ranger said...
ne1uno said...
Lone_EverGreen_Ranger said...

Hello, I'm using Euphoria 4.0 and the most current version of the SDL wrapper. I am trying to blit an image to the screen, yet it is not showing on the screen.

I don't know about SDL, but whenever there is a problem, it's a good idea to let euphoria do some type checking, comment these out or use with instead of without. don't forget to turn them back off to get full speed later.

without warning 
without type_check 
 

An error comes up. type_check failure, screen is {76, 111,103,111}. Called from line 170.


Obviously, you said screen is an atom, you cannot tell it to be "Logo".

useless

So I should make the variable 'screen' be an object or a sequence?


Yes, technically, restrict it to be a sequence. I would make it an object, but if you put -1 in it and treat it as a sequence, it will crash with a -1 in it either way.

Lone_EverGreen_Ranger said...

EDIT: I made it an object, now I get the error, sequence lengths are not the same (4 != 5). What does that mean?


Means you should use equal(). I argued for getting rid of that "error" years ago, and i was disregarded. I thought it had been obsoleted in v4, but apparently not.

useless

new topic     » goto parent     » topic index » view message » categorize

7. Re: Image Not Appearing

useless_ said...
Lone_EverGreen_Ranger said...
useless_ said...
Lone_EverGreen_Ranger said...
ne1uno said...
Lone_EverGreen_Ranger said...

Hello, I'm using Euphoria 4.0 and the most current version of the SDL wrapper. I am trying to blit an image to the screen, yet it is not showing on the screen.

I don't know about SDL, but whenever there is a problem, it's a good idea to let euphoria do some type checking, comment these out or use with instead of without. don't forget to turn them back off to get full speed later.

without warning 
without type_check 
 

An error comes up. type_check failure, screen is {76, 111,103,111}. Called from line 170.


Obviously, you said screen is an atom, you cannot tell it to be "Logo".

useless

So I should make the variable 'screen' be an object or a sequence?


Yes, technically, restrict it to be a sequence. I would make it an object, but if you put -1 in it and treat it as a sequence, it will crash with a -1 in it either way.

Lone_EverGreen_Ranger said...

EDIT: I made it an object, now I get the error, sequence lengths are not the same (4 != 5). What does that mean?


Means you should use equal(). I argued for getting rid of that "error" years ago, and i was disregarded. I thought it had been obsoleted in v4, but apparently not.

useless

I'm still a bit confused. Anyone able to show me what exactly I'm doing wrong with my code?

new topic     » goto parent     » topic index » view message » categorize

8. Re: Image Not Appearing

Lone_EverGreen_Ranger said...

EDIT: I made it an object, now I get the error, sequence lengths are not the same (4 != 5). What does that mean?

useless_ said...

Means you should use equal(). I argued for getting rid of that "error" years ago, and i was disregarded. I thought it had been obsoleted in v4, but apparently not.

useless

I'm still a bit confused. Anyone able to show me what exactly I'm doing wrong with my code?


The error reported is the lengths of the sequences you are comparing using "=" . Euphoria has never liked to do that, and i learned early on to never use "=" to compare sequences. Euphoria has functions to do comparisons: equal() and compare(). Look them up in your favorite version of the Eu help files.

Basically, change code like

if screen = Screens[1] 

to

if equal(screen,Screens[1]) 


If you are needing < or > for stuff and getting errors, use compare(). Other that that, all i can do is copy/paste the manual to you here in the forum, which i don't want to do.

useless

new topic     » goto parent     » topic index » view message » categorize

9. Re: Image Not Appearing

useless_ said...
Lone_EverGreen_Ranger said...

EDIT: I made it an object, now I get the error, sequence lengths are not the same (4 != 5). What does that mean?

useless_ said...

Means you should use equal(). I argued for getting rid of that "error" years ago, and i was disregarded. I thought it had been obsoleted in v4, but apparently not.

useless

I'm still a bit confused. Anyone able to show me what exactly I'm doing wrong with my code?


The error reported is the lengths of the sequences you are comparing using "=" . Euphoria has never liked to do that, and i learned early on to never use "=" to compare sequences. Euphoria has functions to do comparisons: equal() and compare(). Look them up in your favorite version of the Eu help files.

Basically, change code like

if screen = Screens[1] 

to

if equal(screen,Screens[1]) 


If you are needing < or > for stuff and getting errors, use compare(). Other that that, all i can do is copy/paste the manual to you here in the forum, which i don't want to do.

useless

without warning 
without type_check 
 
include std/get.e 
include std/sort.e 
include std/rand.e 
include std/math.e 
include std/mathcons.e 
include std/eds.e 
include std/filesys.e 
include std/wildcard.e 
 
include Sdl_Wrap.ew 
include SDL_image.ew 
 
constant TRUE = 1 
constant FALSE = 0 
 
constant MAX_HEALTH = 100 
constant MAX_LIVES = 3 
constant ENEMY_LIVES = 1 
 
constant MAX_WIDTH = 800 
constant MAX_HEIGHT = 600 
constant MAX_DEPTH = 32 
 
atom dummy 
atom surface,buffer 
atom keyState,curKey,prevKey 
atom run 
atom title,logo --gfx 
atom ship,missle,enemy --gfx  
atom backdrop --gfx 
atom shiprect,misslerect,enemyrect --rects 
integer shipx,shipy,shipwidth,shipheight 
integer misslex,missley,misslewidth,missleheight 
integer enemyx,enemyy,enemywidth,enemyheight 
atom shipvelx,shipvely 
atom enemyvelx,enemyvely 
atom misslevelx,misslevely 
atom format 
 
integer Missle_Fired = FALSE 
 
atom health = MAX_HEALTH 
atom lives = MAX_LIVES 
 
atom score 
 
sequence sTitle = "4000 A.D. - Geek Punk Games" 
sequence sIcon = "" 
 
integer enemypoints 
integer ticks,last_tick 
atom deltatime 
 
sequence Screens = {"Logo","Title","Game"} 
object screen 
 
procedure CalcRect(atom rect, integer sx, integer sy, integer tx, integer ty) 
 
	poke(rect,and_bits(sx,255)) 
	poke(rect+1,floor(sx/256)) 
	poke(rect+2,and_bits(sy,255)) 
	poke(rect+3,floor(sy/256)) 
	poke(rect+4,and_bits(tx,255)) 
	poke(rect+5,floor(tx/256)) 
	poke(rect+6,and_bits(ty,255)) 
	poke(rect+7,floor(ty/256)) 
	 
end procedure 
 
procedure Init() 
 
	dummy = SDL_Init(SDL_INIT_EVERYTHING) 
	 
	if dummy = -1 then 
		puts(1,"Could not init SDL") 
	end if 
	 
	surface = SDL_SetVideoMode(MAX_WIDTH,MAX_HEIGHT,MAX_DEPTH,SDL_HWSURFACE) 
	 
	SDL_WM_SetCaption(sTitle,sIcon) 
	 
	format = peek4u(surface+4) 
	 
	shiprect = allocate(16) 
	enemyrect = allocate(16) 
	misslerect = allocate(16) 
	 
	title = IMG_LoadJPG("Title.jpg") 
	logo = IMG_LoadJPG("Logo.jpg") 
	backdrop = IMG_LoadJPG("Backdrop.jpg") 
	ship = IMG_LoadJPG("Ship.jpg") 
	enemy = IMG_LoadJPG("Enemy.jpg") 
	missle = IMG_LoadJPG("Missle.jpg") 
	 
	--get rid of background color on image(the whitespace) 
	dummy = SDL_SetColorKey(ship,SDL_SRCCOLORKEY,SDL_MapRGB(format,255,255,255)) 
	if dummy = -1 then 
		puts(1,"Could not apply color key") 
	end if 
	 
	dummy = SDL_SetColorKey(enemy,SDL_SRCCOLORKEY,SDL_MapRGB(format,255,255,255)) 
	if dummy = -1 then 
		puts(1,"Could not apply color key") 
	end if 
	 
	dummy = SDL_SetColorKey(missle,SDL_SRCCOLORKEY,SDL_MapRGB(format,255,255,255)) 
	if dummy = -1 then 
		puts(1,"Could not apply color key") 
	end if 
	 
end procedure 
 
procedure Run() 
 
	run = 1 
	screen = Screens[1] 
	 
	while run = 1 do 
	 
		ticks = SDL_GetTicks() 
	 
		SDL_PumpEvents() 
		 
		keyState = SDL_GetKeyState(NULL) 
		if peek(keyState+SDLK_ESCAPE) > 0 then 
			run = 0 
		end if 
		 
		dummy = SDL_BlitSurface(logo,NULL,surface,NULL) 
		if dummy = -1 then 
			puts(1,"Could not blit surface") 
		end if 
		 
		if peek(keyState+SDLK_RETURN) > 0 and equal(screen,Screens[1]) then 
			screen = Screens[2] 
		end if 
		 
		if equal(screen,Screens[2]) then 
			dummy = SDL_BlitSurface(title,NULL,surface,NULL) 
			if dummy = -1 then 
				puts(1,"Could not blit surface") 
			end if 
		end if 
	 
	end while 
	 
end procedure 
 
procedure Quit() 
	 
	SDL_FreeSurface(ship) 
	SDL_FreeSurface(enemy) 
	SDL_FreeSurface(missle) 
	SDL_FreeSurface(title) 
	SDL_FreeSurface(logo) 
	SDL_FreeSurface(backdrop) 
	 
	free(shiprect) 
	free(enemyrect) 
	free(misslerect) 
 
	SDL_Quit() 
	 
end procedure 
 
Init() 
Run() 
Quit() 

Alright, this is my modified code, still not showing the image.

new topic     » goto parent     » topic index » view message » categorize

10. Re: Image Not Appearing

Lone_EverGreen_Ranger said...

<snip>

Alright, this is my modified code, still not showing the image.


Someone else's turn now. I have not been able to put a picture onscreen since dos5, except in a browser using html.

useless

new topic     » goto parent     » topic index » view message » categorize

11. Re: Image Not Appearing

Lone_EverGreen_Ranger said...

Alright, this is my modified code, still not showing the image.

I don't know anything about SDL, but in order to debug this, you need to find out where the failure is occurring. I'd start by looking to answer a few questions:

  • Does the blit code actually get called?
  • Are the parameters correct?
  • Does the image get loaded properly?
  • Is everything initialized correctly inside of SDL

Also, you could simplify setting up the rectangle in memory:

procedure CalcRect(atom rect, integer sx, integer sy, integer tx, integer ty) 
    poke2( rect,  { sx, sy, tx, ty } ) 
end procedure 
new topic     » goto parent     » topic index » view message » categorize

12. Re: Image Not Appearing

mattlewis said...
Lone_EverGreen_Ranger said...

Alright, this is my modified code, still not showing the image.

I don't know anything about SDL, but in order to debug this, you need to find out where the failure is occurring. I'd start by looking to answer a few questions:

  • Does the blit code actually get called?
  • Are the parameters correct?
  • Does the image get loaded properly?
  • Is everything initialized correctly inside of SDL

Also, you could simplify setting up the rectangle in memory:

procedure CalcRect(atom rect, integer sx, integer sy, integer tx, integer ty) 
    poke2( rect,  { sx, sy, tx, ty } ) 
end procedure 

Hmm good point. Its probably not being blitted correctly. Perhaps someone that has knowledge with SDL and euphoria can help. Usually I use CPlusPlus for SDL stuff, but I figured why not try it with euphoria.

new topic     » goto parent     » topic index » view message » categorize

13. Re: Image Not Appearing

Lone_EverGreen_Ranger said...
mattlewis said...
Lone_EverGreen_Ranger said...

Alright, this is my modified code, still not showing the image.

I don't know anything about SDL, but in order to debug this, you need to find out where the failure is occurring. I'd start by looking to answer a few questions:

  • Does the blit code actually get called?
  • Are the parameters correct?
  • Does the image get loaded properly?
  • Is everything initialized correctly inside of SDL

Also, you could simplify setting up the rectangle in memory:

procedure CalcRect(atom rect, integer sx, integer sy, integer tx, integer ty) 
    poke2( rect,  { sx, sy, tx, ty } ) 
end procedure 

Hmm good point. Its probably not being blitted correctly. Perhaps someone that has knowledge with SDL and euphoria can help. Usually I use CPlusPlus for SDL stuff, but I figured why not try it with euphoria.

You forgot to call SDL_Flip(surface) in your code. When I add that, it works.

See http://openeuphoria.org/pastey/105.wc

new topic     » goto parent     » topic index » view message » categorize

14. Re: Image Not Appearing

Lone_EverGreen_Ranger said...
useless_ said...
Lone_EverGreen_Ranger said...

EDIT: I made it an object, now I get the error, sequence lengths are not the same (4 != 5). What does that mean?

useless_ said...

Means you should use equal(). I argued for getting rid of that "error" years ago, and i was disregarded. I thought it had been obsoleted in v4, but apparently not.

useless

I'm still a bit confused. Anyone able to show me what exactly I'm doing wrong with my code?


The error reported is the lengths of the sequences you are comparing using "=" . Euphoria has never liked to do that, and i learned early on to never use "=" to compare sequences. Euphoria has functions to do comparisons: equal() and compare(). Look them up in your favorite version of the Eu help files.

Basically, change code like

if screen = Screens[1] 

to

if equal(screen,Screens[1]) 


If you are needing < or > for stuff and getting errors, use compare(). Other that that, all i can do is copy/paste the manual to you here in the forum, which i don't want to do.

useless

without warning 
without type_check 
 
include std/get.e 
include std/sort.e 
include std/rand.e 
include std/math.e 
include std/mathcons.e 
include std/eds.e 
include std/filesys.e 
include std/wildcard.e 
 
include Sdl_Wrap.ew 
include SDL_image.ew 
 
constant TRUE = 1 
constant FALSE = 0 
 
constant MAX_HEALTH = 100 
constant MAX_LIVES = 3 
constant ENEMY_LIVES = 1 
 
constant MAX_WIDTH = 800 
constant MAX_HEIGHT = 600 
constant MAX_DEPTH = 32 
 
atom dummy 
atom surface,buffer 
atom keyState,curKey,prevKey 
atom run 
atom title,logo --gfx 
atom ship,missle,enemy --gfx  
atom backdrop --gfx 
atom shiprect,misslerect,enemyrect --rects 
integer shipx,shipy,shipwidth,shipheight 
integer misslex,missley,misslewidth,missleheight 
integer enemyx,enemyy,enemywidth,enemyheight 
atom shipvelx,shipvely 
atom enemyvelx,enemyvely 
atom misslevelx,misslevely 
atom format 
 
integer Missle_Fired = FALSE 
 
atom health = MAX_HEALTH 
atom lives = MAX_LIVES 
 
atom score 
 
sequence sTitle = "4000 A.D. - Geek Punk Games" 
sequence sIcon = "" 
 
integer enemypoints 
integer ticks,last_tick 
atom deltatime 
 
sequence Screens = {"Logo","Title","Game"} 
object screen 
 
procedure CalcRect(atom rect, integer sx, integer sy, integer tx, integer ty) 
 
	poke(rect,and_bits(sx,255)) 
	poke(rect+1,floor(sx/256)) 
	poke(rect+2,and_bits(sy,255)) 
	poke(rect+3,floor(sy/256)) 
	poke(rect+4,and_bits(tx,255)) 
	poke(rect+5,floor(tx/256)) 
	poke(rect+6,and_bits(ty,255)) 
	poke(rect+7,floor(ty/256)) 
	 
end procedure 
 
procedure Init() 
 
	dummy = SDL_Init(SDL_INIT_EVERYTHING) 
	 
	if dummy = -1 then 
		puts(1,"Could not init SDL") 
	end if 
	 
	surface = SDL_SetVideoMode(MAX_WIDTH,MAX_HEIGHT,MAX_DEPTH,SDL_HWSURFACE) 
	 
	SDL_WM_SetCaption(sTitle,sIcon) 
	 
	format = peek4u(surface+4) 
	 
	shiprect = allocate(16) 
	enemyrect = allocate(16) 
	misslerect = allocate(16) 
	 
	title = IMG_LoadJPG("Title.jpg") 
	logo = IMG_LoadJPG("Logo.jpg") 
	backdrop = IMG_LoadJPG("Backdrop.jpg") 
	ship = IMG_LoadJPG("Ship.jpg") 
	enemy = IMG_LoadJPG("Enemy.jpg") 
	missle = IMG_LoadJPG("Missle.jpg") 
	 
	--get rid of background color on image(the whitespace) 
	dummy = SDL_SetColorKey(ship,SDL_SRCCOLORKEY,SDL_MapRGB(format,255,255,255)) 
	if dummy = -1 then 
		puts(1,"Could not apply color key") 
	end if 
	 
	dummy = SDL_SetColorKey(enemy,SDL_SRCCOLORKEY,SDL_MapRGB(format,255,255,255)) 
	if dummy = -1 then 
		puts(1,"Could not apply color key") 
	end if 
	 
	dummy = SDL_SetColorKey(missle,SDL_SRCCOLORKEY,SDL_MapRGB(format,255,255,255)) 
	if dummy = -1 then 
		puts(1,"Could not apply color key") 
	end if 
	 
end procedure 
 
procedure Run() 
 
	run = 1 
	screen = Screens[1] 
	 
	while run = 1 do 
	 
		ticks = SDL_GetTicks() 
	 
		SDL_PumpEvents() 
		 
		keyState = SDL_GetKeyState(NULL) 
		if peek(keyState+SDLK_ESCAPE) > 0 then 
			run = 0 
		end if 
		 
		dummy = SDL_BlitSurface(logo,NULL,surface,NULL) 
		if dummy = -1 then 
			puts(1,"Could not blit surface") 
		end if 
		 
		if peek(keyState+SDLK_RETURN) > 0 and equal(screen,Screens[1]) then 
			screen = Screens[2] 
		end if 
		 
		if equal(screen,Screens[2]) then 
			dummy = SDL_BlitSurface(title,NULL,surface,NULL) 
			if dummy = -1 then 
				puts(1,"Could not blit surface") 
			end if 
		end if 
	 
	end while 
	 
end procedure 
 
procedure Quit() 
	 
	SDL_FreeSurface(ship) 
	SDL_FreeSurface(enemy) 
	SDL_FreeSurface(missle) 
	SDL_FreeSurface(title) 
	SDL_FreeSurface(logo) 
	SDL_FreeSurface(backdrop) 
	 
	free(shiprect) 
	free(enemyrect) 
	free(misslerect) 
 
	SDL_Quit() 
	 
end procedure 
 
Init() 
Run() 
Quit() 

Alright, this is my modified code, still not showing the image.

Here's what I had to do to get this modified code to run. First I tracked down SDL_IMAGE.ZIP from the archives and downloaded it. Then it wouldn't run because it couldn't find SDL_image.dll (? I changed it to use the Linux version of the libraries in /usr/lib and then I got machine exceptions when calling SDL_SetColorKey(). No idea why this happened, so I just commented the calls out.

Then I saw lots of errors blitting, and after some work (adding SDL_Error() calls as well as the x/y stuff to prevent the screen from spamming me with errors) I realized that it was because those images were null - because the .jpgs didn't exist.

I quickly copied some jpegs with the right names. No more errors but nothing showed up. At this point I found a good cplusplus guide to SDL, http://gameprogrammingtutorials.blogspot.com/2010/01/sdl-tutorial-series-part-4-how-to-load.html. and saw the missing SDL_Flip() call.

Once I added that in, everything works (at least for me).

I feel bitter.

new topic     » goto parent     » topic index » view message » categorize

15. Re: Image Not Appearing

Success. I was missing SDL_Flip(), which is why it was not showing up on the screen. However not I am having a problem with keeping the ship stay on the screen. Here is the updated code.

without warning 
without type_check 
 
include std/get.e 
include std/sort.e 
include std/rand.e 
include std/math.e 
include std/mathcons.e 
include std/eds.e 
include std/filesys.e 
include std/wildcard.e 
 
include Sdl_Wrap.ew 
include SDL_image.ew 
 
constant TRUE = 1 
constant FALSE = 0 
 
constant MAX_HEALTH = 100 
constant MAX_LIVES = 3 
constant ENEMY_LIVES = 1 
 
constant MAX_WIDTH = 800 
constant MAX_HEIGHT = 600 
constant MAX_DEPTH = 32 
 
atom dummy 
atom surface,buffer 
atom keyState,curKey,prevKey 
atom run 
atom title,logo --gfx 
atom ship,missle,enemy --gfx  
atom backdrop --gfx 
atom shiprect,misslerect,enemyrect --rects 
integer shipx=10,shipy=300,shipwidth=64,shipheight=64 
integer misslex=0,missley=0,misslewidth=64,missleheight=64 
integer enemyx=0,enemyy=0,enemywidth=64,enemyheight=64 
atom shipvelx=0,shipvely=0 
atom enemyvelx=0,enemyvely=0 
atom misslevelx=0,misslevely=0 
atom format 
 
integer Missle_Fired = FALSE 
 
atom health = MAX_HEALTH 
atom lives = MAX_LIVES 
 
atom score 
 
sequence sTitle = "4000 A.D. - Geek Punk Games" 
sequence sIcon = "" 
 
integer enemypoints 
integer ticks,last_tick 
atom deltatime 
 
sequence Screens = {"Logo","Title","Game"} 
object screen 
 
procedure CalcRect(atom rect, integer sx, integer sy, integer tx, integer ty) 
 
	poke(rect,and_bits(sx,255)) 
	poke(rect+1,floor(sx/256)) 
	poke(rect+2,and_bits(sy,255)) 
	poke(rect+3,floor(sy/256)) 
	poke(rect+4,and_bits(tx,255)) 
	poke(rect+5,floor(tx/256)) 
	poke(rect+6,and_bits(ty,255)) 
	poke(rect+7,floor(ty/256)) 
	 
end procedure 
 
procedure Init() 
 
	dummy = SDL_Init(SDL_INIT_EVERYTHING) 
	 
	if dummy = -1 then 
		puts(1,"Could not init SDL") 
	end if 
	 
	surface = SDL_SetVideoMode(MAX_WIDTH,MAX_HEIGHT,MAX_DEPTH,SDL_HWSURFACE) 
	 
	SDL_WM_SetCaption(sTitle,sIcon) 
	 
	format = peek4u(surface+4) 
	 
	shiprect = allocate(16) 
	enemyrect = allocate(16) 
	misslerect = allocate(16) 
	 
	title = IMG_LoadJPG("Title.jpg") 
	logo = IMG_LoadJPG("Logo.jpg") 
	backdrop = IMG_LoadJPG("Backdrop.jpg") 
	ship = IMG_LoadJPG("Ship.jpg") 
	enemy = IMG_LoadJPG("Enemy.jpg") 
	missle = IMG_LoadJPG("Missle.jpg") 
	 
	--get rid of background color on image(the whitespace) 
	dummy = SDL_SetColorKey(ship,SDL_SRCCOLORKEY,SDL_MapRGB(format,255,255,255)) 
	if dummy = -1 then 
		puts(1,"Could not apply color key") 
	end if 
	 
	dummy = SDL_SetColorKey(enemy,SDL_SRCCOLORKEY,SDL_MapRGB(format,255,255,255)) 
	if dummy = -1 then 
		puts(1,"Could not apply color key") 
	end if 
	 
	dummy = SDL_SetColorKey(missle,SDL_SRCCOLORKEY,SDL_MapRGB(format,255,255,255)) 
	if dummy = -1 then 
		puts(1,"Could not apply color key") 
	end if 
	 
end procedure 
 
procedure Run() 
 
	run = 1 
	screen = Screens[1] 
	 
	while run = 1 do 
	 
		ticks = SDL_GetTicks() 
	 
		SDL_PumpEvents() 
		 
		keyState = SDL_GetKeyState(NULL) 
		if peek(keyState+SDLK_ESCAPE) > 0 then 
			run = 0 
		end if 
		 
		CalcRect(shiprect,shipx,shipy,shipwidth,shipheight) 
		 
		dummy = SDL_BlitSurface(logo,NULL,surface,NULL) 
		if dummy = -1 then 
			puts(1,"Could not blit surface") 
		end if 
		 
		if peek(keyState+SDLK_RETURN) > 0 and equal(screen,Screens[1]) then 
			screen = Screens[2] 
		end if 
		 
		if equal(screen,Screens[2]) then 
			dummy = SDL_BlitSurface(title,NULL,surface,NULL) 
			if dummy = -1 then 
				puts(1,"Could not blit surface") 
			end if 
		end if 
		 
		if peek(keyState+SDLK_SPACE) > 0 and equal(screen,Screens[2]) then 
			screen = Screens[3] 
		end if 
		 
		if equal(screen,Screens[3]) then 
			dummy = SDL_BlitSurface(backdrop,NULL,surface,NULL) 
			dummy = SDL_BlitSurface(ship,NULL,surface,shiprect) 
			if dummy = -1 then 
				puts(1,"Could not blit surface") 
			end if 
		end if 
		 
		if peek(keyState+SDLK_UP) > 0 then 
			shipy = shipy - 5 
		elsif peek(keyState+SDLK_DOWN) > 0 then 
			shipy = shipy + 5 
		elsif peek(keyState+SDLK_LEFT) > 0 then 
			shipx = shipx - 5 
		elsif peek(keyState+SDLK_RIGHT) > 0 then 
			shipx = shipx + 5 
		elsif shipx <= 1 then 
			shipx = shipx + 1 
		elsif shipx >= 586 then 
			shipx = shipx - 1 
		elsif shipy <= 780 then 
			shipy = shipy + 1 
		elsif shipy >= 0 then 
			shipy = shipy - 1 
		end if 
		 
		SDL_Flip(surface) 
	 
	end while 
	 
end procedure 
 
procedure Quit() 
	 
	SDL_FreeSurface(ship) 
	SDL_FreeSurface(enemy) 
	SDL_FreeSurface(missle) 
	SDL_FreeSurface(title) 
	SDL_FreeSurface(logo) 
	SDL_FreeSurface(backdrop) 
	 
	free(shiprect) 
	free(enemyrect) 
	free(misslerect) 
 
	SDL_Quit() 
	 
end procedure 
 
Init() 
Run() 
Quit() 
 
new topic     » goto parent     » topic index » view message » categorize

16. Re: Image Not Appearing

Lone_EverGreen_Ranger said...

Success. I was missing SDL_Flip(), which is why it was not showing up on the screen. However not I am having a problem with keeping the ship stay on the screen.

I think you meant to say

Lone_EverGreen_Ranger said...

However, now I am having a problem with keeping the ship stay on the screen.

I ran the code and see the problem. The ship goes down ... and then down ... and never comes back up, unless I hit the arrow keys to move it up.

I think your intent was to have it bounce all around the screen, but when it hit an edge then it'd go the opposite direction.

Your if statement is wrong, but I don't think a single if statement is enough to handle this behavior. You need a more complex state machine to keep track of direction and how close the ship is to the edges of the screen.

new topic     » goto parent     » topic index » view message » categorize

17. Re: Image Not Appearing

jimcbrown said...
Lone_EverGreen_Ranger said...

Success. I was missing SDL_Flip(), which is why it was not showing up on the screen. However not I am having a problem with keeping the ship stay on the screen.

I think you meant to say

Lone_EverGreen_Ranger said...

However, now I am having a problem with keeping the ship stay on the screen.

I ran the code and see the problem. The ship goes down ... and then down ... and never comes back up, unless I hit the arrow keys to move it up.

I think your intent was to have it bounce all around the screen, but when it hit an edge then it'd go the opposite direction.

Your if statement is wrong, but I don't think a single if statement is enough to handle this behavior. You need a more complex state machine to keep track of direction and how close the ship is to the edges of the screen.

I see. I figured it would involve more complex steps. If anyone could give me a headstart, I'd greatly appericate it. I'm not tasking to write my game, just some help.

new topic     » goto parent     » topic index » view message » categorize

18. Re: Image Not Appearing

Lone_EverGreen_Ranger said...
jimcbrown said...
Lone_EverGreen_Ranger said...

Success. I was missing SDL_Flip(), which is why it was not showing up on the screen. However not I am having a problem with keeping the ship stay on the screen.

I think you meant to say

Lone_EverGreen_Ranger said...

However, now I am having a problem with keeping the ship stay on the screen.

I ran the code and see the problem. The ship goes down ... and then down ... and never comes back up, unless I hit the arrow keys to move it up.

I think your intent was to have it bounce all around the screen, but when it hit an edge then it'd go the opposite direction.

Your if statement is wrong, but I don't think a single if statement is enough to handle this behavior. You need a more complex state machine to keep track of direction and how close the ship is to the edges of the screen.

I see. I figured it would involve more complex steps. If anyone could give me a headstart, I'd greatly appericate it. I'm not tasking to write my game, just some help.

To get you started, here's a really basic state machine that does what you want.It just bounces a ball (well asterisk) down to a corner of the screen and then back up.

I stripped this down to the absolute minimalist code, so others can help you fine tune it without requiring SDL.

integer x 
integer y 
integer x_way 
integer y_way 
x = 1 
y = 1 
x_way = 1 
y_way = 1 
while 1 do 
	clear_screen() 
	position(x, y) 
	puts(1, "*") 
	x += x_way 
	y += y_way 
	if x >= 10 then 
		x_way = -1 
	elsif x < 2 then 
		x_way = 1 
	end if 
	if y >= 10 then 
		y_way = -1 
	elsif y < 2 then 
		y_way = 1 
	end if 
	machine_proc(64, 1) 
end while 
new topic     » goto parent     » topic index » view message » categorize

19. Re: Image Not Appearing

jimcbrown said...
Lone_EverGreen_Ranger said...
jimcbrown said...
Lone_EverGreen_Ranger said...

Success. I was missing SDL_Flip(), which is why it was not showing up on the screen. However not I am having a problem with keeping the ship stay on the screen.

I think you meant to say

Lone_EverGreen_Ranger said...

However, now I am having a problem with keeping the ship stay on the screen.

I ran the code and see the problem. The ship goes down ... and then down ... and never comes back up, unless I hit the arrow keys to move it up.

I think your intent was to have it bounce all around the screen, but when it hit an edge then it'd go the opposite direction.

Your if statement is wrong, but I don't think a single if statement is enough to handle this behavior. You need a more complex state machine to keep track of direction and how close the ship is to the edges of the screen.

I see. I figured it would involve more complex steps. If anyone could give me a headstart, I'd greatly appericate it. I'm not tasking to write my game, just some help.

To get you started, here's a really basic state machine that does what you want.It just bounces a ball (well asterisk) down to a corner of the screen and then back up.

I stripped this down to the absolute minimalist code, so others can help you fine tune it without requiring SDL.

integer x 
integer y 
integer x_way 
integer y_way 
x = 1 
y = 1 
x_way = 1 
y_way = 1 
while 1 do 
	clear_screen() 
	position(x, y) 
	puts(1, "*") 
	x += x_way 
	y += y_way 
	if x >= 10 then 
		x_way = -1 
	elsif x < 2 then 
		x_way = 1 
	end if 
	if y >= 10 then 
		y_way = -1 
	elsif y < 2 then 
		y_way = 1 
	end if 
	machine_proc(64, 1) 
end while 

Thanks for the help.

new topic     » goto parent     » topic index » view message » categorize

20. Re: Image Not Appearing

jimcbrown said...

To get you started, here's a really basic state machine that does what you want.It just bounces a ball (well asterisk) down to a corner of the screen and then back up.

I stripped this down to the absolute minimalist code, so others can help you fine tune it without requiring SDL.

integer x 
integer y 
integer x_way 
integer y_way 
x = 1 
y = 1 
x_way = 1 
y_way = 1 
while 1 do 
	clear_screen() 
	position(x, y) 
	puts(1, "*") 
	x += x_way 
	y += y_way 
	if x >= 10 then 
		x_way = -1 
	elsif x < 2 then 
		x_way = 1 
	end if 
	if y >= 10 then 
		y_way = -1 
	elsif y < 2 then 
		y_way = 1 
	end if 
	machine_proc(64, 1) 
end while 


In the interest of code that works and is easier to read, i thought i'd waste everyone's time with the following modifications:

include std/os.e -- for sleep() 
 
integer x  
integer y  
integer x_way  
integer y_way  
 
x = 1  
y = 1  
x_way = 1  
y_way = 1  
 
while 1 do  
	clear_screen()  
	position(x, y)  
	puts(1, "*")  
	x += x_way  
	y += y_way  
 
	if x >= 25 then  
		x_way = -1  
	elsif x < 2 then  
		x_way = 1  
	end if  
 
	if y >= 60 then  
		y_way = -1  
	elsif y < 2 then  
		y_way = 1  
	end if  
	 
	sleep(0.05) 
end while  


If someone else would add paddles in the next week or so, we'd have a dosbox monochrome two-player game in time for the 40th anniversary of Pong(tm).

useless

new topic     » goto parent     » topic index » view message » categorize

21. Re: Image Not Appearing

useless_ said...

In the interest of code that works

Are you saying my code doesn't work?

new topic     » goto parent     » topic index » view message » categorize

22. Re: Image Not Appearing

jimcbrown said...
useless_ said...

In the interest of code that works

Are you saying my code doesn't work?


On this computer, it ran very slowly. It took 10 seconds to trace a diagonal line from (arbitrary coordinate system) (0,0) to (10,10).

If one understand "works" as "demonstrating code without boring someone who is waiting on it to do something, and making use of a screen bigger than a palmtop calculator", then your code didn't work for me. Indeed, you said "down to a corner of the screen" which did not happen unless i shrank the dosbox down to 1.2 inches square.

By changing the two values you specified, the trace went all over the dosbox and didn't ever simply retrace a short diagonal line. I also made it easier to figure out what was going on by using sleep() instead of a machine call, and i used a small sub-second sleep value to speed it up.

Naturally, there's plenty more one could do to the code to install more entertainment and/or education value. I did attempt to discuss this with you ~14 hours ago on irc.

useless

new topic     » goto parent     » topic index » view message » categorize

23. Re: Image Not Appearing

eukat_ said...
jimcbrown said...
eukat_ said...

In the interest of code that works

Are you saying my code doesn't work?


On this computer, it ran very slowly. It took 10 seconds to trace a diagonal line from (arbitrary coordinate system) (0,0) to (10,10).

That was a design compromise. A lower threshold was not possible without directly calling lower level OS functions (e.g. nanosleep()), busy-waiting, or depending on Euphoria 4.0 (as earlier versions busy-waited for fractional seconds).

In retrospect this was probably not the best design decision.

eukat_ said...



If one understand "works" as "demonstrating code without boring someone who is waiting on it to do something

I can not find this definition or understanding in a dictionary. Perhaps you could point me to a better authoritive reference.

http://dictionary.reference.com/browse/work?db=%252A

eukat_ said...

and making use of a screen bigger than a palmtop calculator", then your code didn't work for me. Indeed, you said "down to a corner of the screen" which did not happen unless i shrank the dosbox down to 1.2 inches square.

The small screen size was another design decision, for those of us who use really small console windows (less than 80x25 in size). Why? One reason is to enable as many users to try out the code as possible. Another reason is because this is what I use.

eukat_ said...



By changing the two values you specified, the trace went all over the dosbox and didn't ever simply retrace a short diagonal line. I also made it easier to figure out what was going on by using sleep() instead of a machine call, and i used a small sub-second sleep value to speed it up.

I believe that these are excellent enhancements which are a lot closer to the original intention of the OP. Your version is incredibly useful and helpful, probably more so than mine.

eukat_ said...



Naturally, there's plenty more one could do to the code to install more entertainment and/or education value.

I agree as well.

eukat_ said...

I did attempt to discuss this with you ~14 hours ago on irc.

eukat

I didn't see it. There is a likely explaination, however:

I am still placing the nick useless and its derivatives under ignore, to protest your decision to use that name, in the same way that unkmar is protesting this by refusing to join the IRC channel at all. I'm not protesting your right to use that name, or any other name, just the reasoning behind the choice: that you are unable to make useful contributions. I think your posts on this thread show that this belief is false.

new topic     » goto parent     » topic index » view message » categorize

24. Re: Image Not Appearing

useless_ said...
jimcbrown said...

To get you started, here's a really basic state machine that does what you want.It just bounces a ball (well asterisk) down to a corner of the screen and then back up.

I stripped this down to the absolute minimalist code, so others can help you fine tune it without requiring SDL.

integer x 
integer y 
integer x_way 
integer y_way 
x = 1 
y = 1 
x_way = 1 
y_way = 1 
while 1 do 
	clear_screen() 
	position(x, y) 
	puts(1, "*") 
	x += x_way 
	y += y_way 
	if x >= 10 then 
		x_way = -1 
	elsif x < 2 then 
		x_way = 1 
	end if 
	if y >= 10 then 
		y_way = -1 
	elsif y < 2 then 
		y_way = 1 
	end if 
	machine_proc(64, 1) 
end while 


In the interest of code that works and is easier to read, i thought i'd waste everyone's time with the following modifications:

include std/os.e -- for sleep() 
 
integer x  
integer y  
integer x_way  
integer y_way  
 
x = 1  
y = 1  
x_way = 1  
y_way = 1  
 
while 1 do  
	clear_screen()  
	position(x, y)  
	puts(1, "*")  
	x += x_way  
	y += y_way  
 
	if x >= 25 then  
		x_way = -1  
	elsif x < 2 then  
		x_way = 1  
	end if  
 
	if y >= 60 then  
		y_way = -1  
	elsif y < 2 then  
		y_way = 1  
	end if  
	 
	sleep(0.05) 
end while  


If someone else would add paddles in the next week or so, we'd have a dosbox monochrome two-player game in time for the 40th anniversary of Pong(tm).

useless

Oh, well, why didn't you say (not sdl, allegro, an alternative)

http://euallegro.wikispaces.com/Games

Chris

new topic     » goto parent     » topic index » view message » categorize

25. Re: Image Not Appearing

jimcbrown said...
eukat_ said...


If one understand "works" as "demonstrating code without boring someone who is waiting on it to do something

I can not find this definition or understanding in a dictionary. Perhaps you could point me to a better authoritive reference.

http://dictionary.reference.com/browse/work?db=%252A


I did say "If". One could also say "If small horses flew with no visable means to do so, and had narwhale horns, we might call them unicorns".

jimcbrown said...
eukat_ said...

and making use of a screen bigger than a palmtop calculator", then your code didn't work for me. Indeed, you said "down to a corner of the screen" which did not happen unless i shrank the dosbox down to 1.2 inches square.

The small screen size was another design decision, for those of us who use really small console windows (less than 80x25 in size). Why? One reason is to enable as many users to try out the code as possible. Another reason is because this is what I use.


My dosboxes are set to 80x25. I figured it was standard, so why not use the whole box.

jimcbrown said...

I am still placing the nick useless and its derivatives under ignore, to protest your decision to use that name, in the same way that unkmar is protesting this by refusing to join the IRC channel at all. I'm not protesting your right to use that name, or any other name, just the reasoning behind the choice: that you are unable to make useful contributions. I think your posts on this thread show that this belief is false.


Perhaps if we didn't open this discussion of code with a definition of "if", the same way some other words need discussing, i might agree. I might also agree if any code i have written in the last 12 years was deemed worthwhile. Some of my suggestions have been fought against extremely strongly by various people. Now just watch CK/euphoric jump on this paragraph.

I was not aware unkmar was staying out of the channel because of me. I shall now leave the channel.

useless

new topic     » goto parent     » topic index » view message » categorize

26. Re: Image Not Appearing

eukat_ said...


If one understand "works" as "demonstrating code without boring someone who is waiting on it to do something

Why would a 1 second wait be particularly boring?

eukat_ said...
jimcbrown said...

I can not find this definition or understanding in a dictionary. Perhaps you could point me to a better authoritive reference.

http://dictionary.reference.com/browse/work?db=%252A


I did say "If". One could also say "If small horses flew with no visable means to do so, and had narwhale horns, we might call them unicorns".

So you agree then that my code works? Considering that your previous statement was based on a false premise.

I have no issue in admitting that your version of the code is superior. I just wanted clarification on a statement you made that I thought might be misinterpreted - and I got it.

eukat_ said...
jimcbrown said...
eukat_ said...

and making use of a screen bigger than a palmtop calculator", then your code didn't work for me. Indeed, you said "down to a corner of the screen" which did not happen unless i shrank the dosbox down to 1.2 inches square.

The small screen size was another design decision, for those of us who use really small console windows (less than 80x25 in size). Why? One reason is to enable as many users to try out the code as possible. Another reason is because this is what I use.


My dosboxes are set to 80x25. I figured it was standard, so why not use the whole box.

Works for me.

eukat_ said...
jimcbrown said...

I am still placing the nick useless and its derivatives under ignore, to protest your decision to use that name, in the same way that unkmar is protesting this by refusing to join the IRC channel at all. I'm not protesting your right to use that name, or any other name, just the reasoning behind the choice: that you are unable to make useful contributions. I think your posts on this thread show that this belief is false.


Perhaps if we didn't open this discussion of code with a definition of "if",

I don't see any such definition. Regarding definitions in general, you are the one who raised the issue (by proposing a non-standard definition for a particular word).

I also don't see a connection between your presenting definitions and your level of usefulness - except in that, under the right circumstances, being able to provide correct definitions can be very helpful. This doesn't seem to have anything to do with coding, though.

eukat_ said...

the same way some other words need discussing, i might agree. I might also agree if any code i have written in the last 12 years was deemed worthwhile. Some of my suggestions have been fought against extremely strongly by various people. Now just watch CK/euphoric jump on this paragraph.

I was not aware unkmar was staying out of the channel because of me. I shall now leave the channel.

eukat

Deemed worthwhile by who?

For what it's worth, I officially deem all your code contributions in this thread worthwhile.

new topic     » goto parent     » topic index » view message » categorize

27. Re: Image Not Appearing

jimcbrown said...
eukat_ said...


If one understand "works" as "demonstrating code without boring someone who is waiting on it to do something

Why would a 1 second wait be particularly boring?

I thought the object of the game was to see the bounce. Each one second move of the asterisk added up to 10 seconds to get to the bounce. That got excessive before the second bounce was on the horizon. And if one is tracing the code to see how it works, sitting there for one second nine times to get to the bounce is just wasting time.

jimcbrown said...

I am still placing the nick eukat and its derivatives under ignore, to protest your decision to use that name, <snip>


So you have a problem with the nick "useless", and "eukat" too? Gosh, i haven't used eukat on irc in 1 year, 17 weeks, 2 days, 6hours, it's remarkable you remember to be offended by it! Perhaps you could tell me a nick you and unkmar would approve of, so you would not have me on ignore despite my contributions being useful. It's sorta like you are making sure i am useless by ignoring me, which is sorta ironic.

jimcbrown said...
useless said...

I was not aware unkmar was staying out of the channel because of me. I shall now leave the channel.

eukat


I did not "sign" that post with that nick, i signed it with the most truely descriptive i have: useless. It's a nick well suited to one on your ignore list, isn't it? And by editing my post to change my signature, invalidating my decision to use that nick, you are making my decision useless.

useless

new topic     » goto parent     » topic index » view message » categorize

28. Re: Image Not Appearing

ChrisB said...
useless_ said...


<snip>
If someone else would add paddles in the next week or so, we'd have a dosbox monochrome two-player game in time for the 40th anniversary of Pong(tm).

useless

Oh, well, why didn't you say (not sdl, allegro, an alternative)

http://euallegro.wikispaces.com/Games

Chris


I knew someone had done that, i forgot who and when! Just out of curiosity, now that we got the spotlight on it, does it work with Eu v4 and have all the include files in the download?

useless

new topic     » goto parent     » topic index » view message » categorize

29. Re: Image Not Appearing

eukat_ said...
jimcbrown said...
eukat_ said...


If one understand "works" as "demonstrating code without boring someone who is waiting on it to do something

Why would a 1 second wait be particularly boring?

I thought the object of the game was to see the bounce. Each one second move of the asterisk added up to 10 seconds to get to the bounce. That got excessive before the second bounce was on the horizon. And if one is tracing the code to see how it works, sitting there for one second nine times to get to the bounce is just wasting time.

I suppose this makes sense, depending on each individual's own POV.

eukat_ said...
jimcbrown said...

I am still placing the nick eukat and its derivatives under ignore, to protest your decision to use that name, <snip>


So you have a problem with the nick "useless", and "eukat" too? Gosh, i haven't used eukat on irc in 1 year, 17 weeks, 2 days, 6hours, it's remarkable you remember to be offended by it! Perhaps you could tell me a nick you and unkmar would approve of, so you would not have me on ignore despite my contributions being useful.

That was the result of an overaggressive spell checker. I've edited the previous post to fix that.

I don't have eukat on ignore. Only useless and its derivatives. Virtually any other nick would reach me. (I do have other nicks and ips in my ignore list, for reasons that I don't really want to go into.)

eukat_ said...

I did not "sign" that post with that nick, i signed it with the most truely descriptive i have: useless. It's a nick well suited to one on your ignore list, isn't it? And by editing my post to change my signature, invalidating my decision to use that nick, you are making my decision useless.

It's sorta like you are making sure i am useless by ignoring me, which is sorta ironic.

eukat

My decision to use the spell checker in this manner was done in reaction to this post:

http://openeuphoria.org/forum/m/116452.wc

KAT said...

You won't be the first today to call me names like useless

Simply because Derek had used the auto-quoting in the previous post:

http://openeuphoria.org/forum/m/116451.wc

new topic     » goto parent     » topic index » view message » categorize

30. Re: Image Not Appearing

jimcbrown said...

That was the result of an overaggressive spell checker. I've edited the previous post to fix that.

I don't have eukat on ignore. Only useless and its derivatives. Virtually any other nick would reach me. (I do have other nicks and ips in my ignore list, for reasons that I don't really want to go into.)

eukat_ said...

I did not "sign" that post with that nick, i signed it with the most truely descriptive i have: eukat. It's a nick well suited to one on your ignore list, isn't it? And by editing my post to change my signature, invalidating my decision to use that nick, you are making my decision useless.

It's sorta like you are making sure i am eukat by ignoring me, which is sorta ironic.

eukat


Your editing is changing the meaning of my posts. I object, and i ask whoever is the authority on this site to put a halt to jimcbrown's editing on posts other than his own writing.

useless

new topic     » goto parent     » topic index » view message » categorize

31. Re: Image Not Appearing

eukat_ said...
jimcbrown said...

That was the result of an overaggressive spell checker. I've edited the previous post to fix that.

I don't have eukat on ignore. Only useless and its derivatives. Virtually any other nick would reach me. (I do have other nicks and ips in my ignore list, for reasons that I don't really want to go into.)

eukat_ said...

I did not "sign" that post with that nick, i signed it with the most truely descriptive i have: eukat. It's a nick well suited to one on your ignore list, isn't it? And by editing my post to change my signature, invalidating my decision to use that nick, you are making my decision useless.

It's sorta like you are making sure i am eukat by ignoring me, which is sorta ironic.

eukat


Your editing is changing the meaning of my posts. I object, and i ask whoever is the authority on this site to put a halt to jimcbrown's editing on posts other than his own writing.

eukat

This (automated and accidental) editing only occured within my own posts, resulting in misquotes. I've corrected those. Your original posts are still in the thread, unmodified.

The only person with a higher authority than I on this website is euphoric, though several share an equal rank with me.

new topic     » goto parent     » topic index » view message » categorize

32. Re: Image Not Appearing

useless_ said...
ChrisB said...
useless_ said...


<snip>
If someone else would add paddles in the next week or so, we'd have a dosbox monochrome two-player game in time for the 40th anniversary of Pong(tm).

useless

Oh, well, why didn't you say (not sdl, allegro, an alternative)

http://euallegro.wikispaces.com/Games

Chris


I knew someone had done that, i forgot who and when! Just out of curiosity, now that we got the spotlight on it, does it work with Eu v4 and have all the include files in the download?

useless

pretty much, yes, all the includes and dlls are in http://euallegro.wikispaces.com/file/view/Allegro.zip, then install eupong and the pong sounds, and off you go. (This is Ray Smith's library, just a bit re organised)

Chris

new topic     » goto parent     » topic index » view message » categorize

33. Re: Image Not Appearing

eukat_ said...
jimcbrown said...

I am still placing the nick useless and its derivatives under ignore, to protest your decision to use that name, <snip>


Perhaps you could tell me a nick you and unkmar would approve of, so you would not have me on ignore despite my contributions being useful. It's sorta like you are making sure i am useless by ignoring me, which is sorta ironic.

I had to think about this for a while. I almost removed that nick from my ignore list before I realized why this is not true.

When you are in the irc channel, you're able to talk with any other member there. Nothing is being taken away in that regard.

As virtually every on-topic issue discussed on IRC ends up on the forum, there's no loss to the community.

I won't be able to benefit from your comments and insights on things about life in general, so this will probably hurt me, but this only affects me and does not diminish your contributions here. That's a burden that I'm willing to bear.

eukat_ said...
jimcbrown said...
eukat_ said...

I was not aware unkmar was staying out of the channel because of me. I shall now leave the channel.

eukat


I did not "sign" that post with that nick, i signed it with the most truely descriptive i have: useless. It's a nick well suited to one on your ignore list, isn't it? And by editing my post to change my signature, invalidating my decision to use that nick, you are making my decision useless.

eukat

Agreed. However, I continue to feel justified in doing so due to http://openeuphoria.org/forum/m/116452.wc and I also believe there is a huge difference between making one decision of yours less than moderately useful and stating that you are less than moderately useful.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu