Well, here a question to discuss
¿What do you think about use Squeak for make professional games? (with actual VM or possible future StrongTalk VM)
I'm not talking about something like MineSweeper or Solitarie. I'm talking about a game with good graphics to sell. MMORPG (Lineage 2, EntropiaUniverse, Life...), RTS (Starwars, Warcraft...), Turn-Based Games (UFO, Civilization....)
Lord ZealoN wrote:
Well, here a question to discuss
¿What do you think about use Squeak for make professional games? (with actual VM or possible future StrongTalk VM)
I'm not talking about something like MineSweeper or Solitarie. I'm talking about a game with good graphics to sell. MMORPG (Lineage 2, EntropiaUniverse, Life...), RTS (Starwars, Warcraft...), Turn-Based Games (UFO, Civilization....)
If I was working on a commercial game in smalltalk I would be looking at something like Smalltalk MT.
Keith Send instant messages to your online friends http://uk.messenger.yahoo.com
Hi,
Am 13.10.2006 um 14:24 schrieb Lord ZealoN:
Well, here a question to discuss
¿What do you think about use Squeak for make professional games? (with actual VM or possible future StrongTalk VM)
I'm not talking about something like MineSweeper or Solitarie. I'm talking about a game with good graphics to sell. MMORPG (Lineage 2, EntropiaUniverse, Life...), RTS (Starwars, Warcraft...), Turn-Based Games (UFO, Civilization....)
up-to-date games uses high-level languages for scripting and basic gameplay. So from the principle, there is no reason why it should not work with Squeak, if putting some critical stuff in C libraries. But in practice, it may depend on the kind of game and the exact requirements. There is a guy (xbox developer) who plays with Dolphin smalltalk, see here: http://learningtotalk.blogspot.com/2006/09/ introduction-to-talking.html. See also Croquet (www.opencroquet.org) DirectX in Squeak may be a problem. I don't know if there is any package for this. Dolphin and Smalltalk MT have very good bindings to DirectX and Microsoft APIs in general.
Regards
Hans
-- ::Mi blog:: http://blog.lordzealon.com
Linux-User: #370919
Lord,
I suspect which language you use is much less important than the tools you use to make a professional game. The bar is very high and one person, or even a small team, cannot make all the tools needed. Many of those tools are purchase from 3rd parties for significant sums. At least, that's true for the games that you mentioned. Also, quality of game play is more important that the language it's written in, which is a skill that takes years to learn by practice and failure and lots of testing. For now, Smalltalk does not link to these tools very well. Most are file based which is not so compatible with Smalltalk's image. Managing large art content files and large quantities of them is required which might put a strain on Smalltalk's memory management. Professional games us a lot of tricks at the compiler level and code architecture level to squeeze every bit of optimization at the expense of ease of programming.
Smalltalk's strength is that it's easy to change, but that may be a weakness here. Often in professional games, you don't want the games easy to change by the players because the temptation to cheat is too large.
If you have a game where it's good for the player to change the code, then you may have an advantage with Smalltalk over other games.
If you have a good game design or subject environment niche, Smalltalk might help you make an interesting game one can sell. It allows you to make many design mistakes and correct them quickly. But your niche will be more important than your platform or how professional it is.
That said, Croquet can use Direct X. Maybe you could test out your game design in SecondLife and, when it starts to be popular, migrate it to Croquet.
You might want to check out the Gamasutra game developer site for pointers how to get started for the Independent Game Developer.
Cheers, Darius
Darius,
I'm going to pick a nit with one thing you said:
Smalltalk's strength is that it's easy to change, but that may be a weakness here. Often in professional games, you don't want the games easy to change by the players because the temptation to cheat is too large.
When I was a kid--and the bar was MUCH lower on games, as in, a single person could code a viable commercial game in a month--I used to enter games from listings, and changing them was an excellent way to learn this particular skill:
Also, quality of game play...is a skill that takes years to learnby practice and failure and lots of testing.
Nothing gives you that skill faster than being able to tweak the rules of a game.
Hell, even some of the commercial games we bought back in those days came as Basic programs that you could stop and hack. And you'd learn pretty quickly which rules were important and why.
That's afield of the commercial issues, of course, though it should probably be pointed out that modding is at least one source of game programming talent these days.
===Blake===
Blake,
OK. Point taken. :-)
On 10/13/06, Blake blake@kingdomrpg.com wrote:
Darius,
I'm going to pick a nit with one thing you said:
I would like to create something similar to the Damien's ImageForDevelopers but... ImageForGameDevelopers ;)
Packaged with the tools and tutorials to create simple games in Squeak (OpenGL and SDL bindings...).
I think that such image will attract more developers interested in game development. I think that e-toys are very powerful but not so attractive to teenagers who want to learn how to code games, so having a image with those tools makes sense to me :)
So I was looking for SDL bindings, I've found some mentions in the swiki and in the mail archive, but they seems outdated and I didn't found anything in Squeaksource or SqueakMap. So in my spare time I started an SDL binding using FFI (Andreas FFI is great :) thanks!!!). I didn't finish it yet but I could publish it "as is" into squeaksource.. so others can help me :)
I don't have a lot of time... but maybe if there are others interested we can create an "ImageForGameDevelopers" :)
(it's possible to load the OpenGL packages used in Croquet? how?)
On 10/13/06, Lord ZealoN lordzealon@gmail.com wrote:
Well, here a question to discuss
¿What do you think about use Squeak for make professional games? (with actual VM or possible future StrongTalk VM)
I'm not talking about something like MineSweeper or Solitarie. I'm talking about a game with good graphics to sell. MMORPG (Lineage 2, EntropiaUniverse, Life...), RTS (Starwars, Warcraft...), Turn-Based Games (UFO, Civilization....)
-- ::Mi blog:: http://blog.lordzealon.com
Linux-User: #370919
Sounds great!
I think you should be able to install the OpenGL package from
http://hedgehog.software.umn.edu:8888/hedgehogRC.html
in a non-Croquet image.
- Bert -
Am 13.10.2006 um 17:03 schrieb Diego Fernandez:
I would like to create something similar to the Damien's ImageForDevelopers but... ImageForGameDevelopers ;)
Packaged with the tools and tutorials to create simple games in Squeak (OpenGL and SDL bindings...).
I think that such image will attract more developers interested in game development. I think that e-toys are very powerful but not so attractive to teenagers who want to learn how to code games, so having a image with those tools makes sense to me :)
So I was looking for SDL bindings, I've found some mentions in the swiki and in the mail archive, but they seems outdated and I didn't found anything in Squeaksource or SqueakMap. So in my spare time I started an SDL binding using FFI (Andreas FFI is great :) thanks!!!). I didn't finish it yet but I could publish it "as is" into squeaksource.. so others can help me :)
I don't have a lot of time... but maybe if there are others interested we can create an "ImageForGameDevelopers" :)
(it's possible to load the OpenGL packages used in Croquet? how?)
On 10/13/06, Lord ZealoN lordzealon@gmail.com wrote:
Well, here a question to discuss
¿What do you think about use Squeak for make professional games? (with actual VM or possible future StrongTalk VM)
I'm not talking about something like MineSweeper or Solitarie. I'm talking about a game with good graphics to sell. MMORPG (Lineage 2, EntropiaUniverse, Life...), RTS (Starwars, Warcraft...), Turn-Based Games (UFO, Civilization....)
-- ::Mi blog:: http://blog.lordzealon.com
Linux-User: #370919
Bert Freudenberg puso en su mail :
I think you should be able to install the OpenGL package from
http://hedgehog.software.umn.edu:8888/hedgehogRC.html
in a non-Croquet image.
Bert, the page is from SqueakSource and several .mcz are listed.
Which one is the interface to OpenGL package ?
Edgar
__________________________________________________ Pregunt�. Respond�. Descubr�. Todo lo que quer�as saber, y lo que ni imaginabas, est� en Yahoo! Respuestas (Beta). �Probalo ya! http://www.yahoo.com.ar/respuestas
Andreas Raab puso en su mail :
Let's see ... could it possibly be the one called "OpenGL"? ;-)
Cheers,
- Andreas
Filename Author Timestamp Actions 3DTransform-bgf.18.mcz Andreas Raab 2006-09-25 17:46:55 details download 3DTransform-ar.13.mcz Andreas Raab 2006-04-05 00:15:38 details download 3DTransform-ar.11.mcz Andreas Raab 2006-03-27 01:19:59 details download 3DTransform-ar.10.mcz Andreas Raab 2006-03-13 19:55:08 details download 3DTransform-ar.9.mcz Andreas Raab 2006-03-10 18:32:48 details download 3DTransform-ar.8.mcz Andreas Raab 2006-03-07 22:01:01 details download 3DTransform-das.7.mcz Andreas Raab 2006-02-28 14:40:03 details download 3DTransform-ar.4.mcz Andreas Raab 2006-02-03 22:30:54 details download 3DTransform-ar.2.mcz Andreas Raab 2006-02-03 18:46:50 details download Croquet-Contacts-ar.3.mcz Andreas Raab 2006-04-19 16:08:19 details download Croquet-Contacts-ar.2.mcz Andreas Raab 2006-03-31 16:04:03 details download Croquet-Contacts-ar.1.mcz Andreas Raab 2006-03-23 23:40:51 details download Croquet-Copier-ar.8.mcz Andreas Raab 2006-10-07 17:26:44 details download Croquet-Copier-bgf.7.mcz Andreas Raab 2006-09-25 17:47:15 details download Croquet-Copier-ar.6.mcz Andreas Raab 2006-04-04 20:58:13 details download Croquet-Copier-ar.5.mcz Andreas Raab 2006-03-07 22:02:55 details download Croquet-Copier-ar.4.mcz Andreas Raab 2006-02-03 18:47:13 details download Croquet-Demo-das.23.mcz Andreas Raab 2006-09-25 17:47:41 details download Croquet-Demo-ar.20.mcz Andreas Raab 2006-06-19 14:43:34 details download Croquet-Demo-ar.17.mcz Andreas Raab 2006-04-05 00:16:22 details download
Andreas, as you see no package said " OpenGL" in the provided link. I'm not familiar with Croquet and my only interest is try on not Croquet image (as Bert said).
Cheers and continue good work (and be more nice with fools like me)
Edgar
__________________________________________________ Preguntá. Respondé. Descubrí. Todo lo que querías saber, y lo que ni imaginabas, está en Yahoo! Respuestas (Beta). ¡Probalo ya! http://www.yahoo.com.ar/respuestas
Edgar,
You just listed the contents of the first page. Try page 7 or so (links are at the bottom of the page).
Josh
On Oct 13, 2006, at 5:01 PM, Edgar J. De Cleene wrote:
Andreas, as you see no package said " OpenGL" in the provided link.
Edgar
__________________________________________________ Preguntá. Respondé. Descubrí. Todo lo que querías saber, y lo que ni imaginabas, está en Yahoo! Respuestas (Beta). ¡Probalo ya! http://www.yahoo.com.ar/respuestas
When I follow the link (http://hedgehog.software.umn.edu:8888/hedgehogRC.html) and am not logged in, I click the 'Latest' tab, and see the last package listed as OpenGL-ar.26.mcz. There is a download link on that line, which seems to work for me (again, without being logged in).
From the list you've provided, Edgar, I think maybe you clicked on 'Versions', which is several pages long. You might have to do a lot of page jumping before you hit an OpenGL package.
Edgar J. De Cleene wrote:
Andreas Raab puso en su mail :
Let's see ... could it possibly be the one called "OpenGL"? ;-)
Filename Author Timestamp Actions 3DTransform-bgf.18.mcz Andreas Raab 2006-09-25 17:46:55 details download 3DTransform-ar.13.mcz Andreas Raab 2006-04-05 00:15:38 details download 3DTransform-ar.11.mcz Andreas Raab 2006-03-27 01:19:59 details download 3DTransform-ar.10.mcz Andreas Raab 2006-03-13 19:55:08 details download 3DTransform-ar.9.mcz Andreas Raab 2006-03-10 18:32:48 details download 3DTransform-ar.8.mcz Andreas Raab 2006-03-07 22:01:01 details download 3DTransform-das.7.mcz Andreas Raab 2006-02-28 14:40:03 details download 3DTransform-ar.4.mcz Andreas Raab 2006-02-03 22:30:54 details download 3DTransform-ar.2.mcz Andreas Raab 2006-02-03 18:46:50 details download Croquet-Contacts-ar.3.mcz Andreas Raab 2006-04-19 16:08:19 details download Croquet-Contacts-ar.2.mcz Andreas Raab 2006-03-31 16:04:03 details download Croquet-Contacts-ar.1.mcz Andreas Raab 2006-03-23 23:40:51 details download Croquet-Copier-ar.8.mcz Andreas Raab 2006-10-07 17:26:44 details download Croquet-Copier-bgf.7.mcz Andreas Raab 2006-09-25 17:47:15 details download Croquet-Copier-ar.6.mcz Andreas Raab 2006-04-04 20:58:13 details download Croquet-Copier-ar.5.mcz Andreas Raab 2006-03-07 22:02:55 details download Croquet-Copier-ar.4.mcz Andreas Raab 2006-02-03 18:47:13 details download Croquet-Demo-das.23.mcz Andreas Raab 2006-09-25 17:47:41 details download Croquet-Demo-ar.20.mcz Andreas Raab 2006-06-19 14:43:34 details download Croquet-Demo-ar.17.mcz Andreas Raab 2006-04-05 00:16:22 details download
Andreas, as you see no package said " OpenGL" in the provided link. I'm not familiar with Croquet and my only interest is try on not Croquet image (as Bert said).
Cheers and continue good work (and be more nice with fools like me)
Edgar
Preguntá. Respondé. Descubrí. Todo lo que querías saber, y lo que ni imaginabas, está en Yahoo! Respuestas (Beta). ¡Probalo ya! http://www.yahoo.com.ar/respuestas
Edgar J. De Cleene wrote:
Andreas, as you see no package said " OpenGL" in the provided link.
I think you should learn a little about using Squeaksource: "Versions" will display all the versions ever committed for each package in the given repository. In the hedgehog repository that takes about eight pages of stuff (if you look at the bottom you can see there are more pages than the first one) so just because you can't see a package on the very first page doesn't mean it's not there.
However, more useful is "Latest" which will only display the latest committed version for each package in the repository. If you click on "Latest" you will see the OpenGL package on the first page, right at the bottom.
Cheers, - Andreas
Andreas :
Apologize.
I found OpenGL-ar.36.mcz in page 7.
Edgar
__________________________________________________ Pregunt�. Respond�. Descubr�. Todo lo que quer�as saber, y lo que ni imaginabas, est� en Yahoo! Respuestas (Beta). �Probalo ya! http://www.yahoo.com.ar/respuestas
please do :)
Stef
On 13 oct. 06, at 17:03, Diego Fernandez wrote:
I would like to create something similar to the Damien's ImageForDevelopers but... ImageForGameDevelopers ;)
Packaged with the tools and tutorials to create simple games in Squeak (OpenGL and SDL bindings...).
I think that such image will attract more developers interested in game development. I think that e-toys are very powerful but not so attractive to teenagers who want to learn how to code games, so having a image with those tools makes sense to me :)
So I was looking for SDL bindings, I've found some mentions in the swiki and in the mail archive, but they seems outdated and I didn't found anything in Squeaksource or SqueakMap. So in my spare time I started an SDL binding using FFI (Andreas FFI is great :) thanks!!!). I didn't finish it yet but I could publish it "as is" into squeaksource.. so others can help me :)
I don't have a lot of time... but maybe if there are others interested we can create an "ImageForGameDevelopers" :)
(it's possible to load the OpenGL packages used in Croquet? how?)
On 10/13/06, Lord ZealoN lordzealon@gmail.com wrote:
Well, here a question to discuss
¿What do you think about use Squeak for make professional games? (with actual VM or possible future StrongTalk VM)
I'm not talking about something like MineSweeper or Solitarie. I'm talking about a game with good graphics to sell. MMORPG (Lineage 2, EntropiaUniverse, Life...), RTS (Starwars, Warcraft...), Turn-Based Games (UFO, Civilization....)
-- ::Mi blog:: http://blog.lordzealon.com
Linux-User: #370919
Diego Fernandez a écrit :
I would like to create something similar to the Damien's ImageForDevelopers but... ImageForGameDevelopers ;)
If you want to do it, you should use ImageForDevelopers (available in squeak source). Then, you just have to create a subclass and tell what packages you want to be part of your image. Some refactorings will be usefull too.
Please ask if I can help.
On 10/13/06, Diego Fernandez diegof79@gmail.com wrote:
I would like to create something similar to the Damien's ImageForDevelopers but... ImageForGameDevelopers ;)
Packaged with the tools and tutorials to create simple games in Squeak (OpenGL and SDL bindings...).
I would like to help with this, I develop games for children with Squeak.
We could make a page called "Game Programming" on the swiki. Was about to do that right now, but I have no password for the swiki. Anyone knows how to get one?
Currently, we are using Morphic, which works ok for the kind of "game-making games" we develop (visual programming tools for children, similar in spirit to eToys). To have the UI-model of Morphic with support for components, drag&drop, etc, is a big productivity advantage for us. Have also been experimenting with Tweak which is really nice, but as I understand it Tweak, like Morphic, uses standard Squeak Forms and Display to render graphics.
What concerns me is the blit speed of Form and Display. Have searched the mailing list and the swiki and obviously there are lots of issues that have been up for discussion previously, like conversion between pixel formats, endianness, etc. Have seen mention of FXBlt, ExternalForm, and ExternalScreen, which seems to be in the Balloon3D package (which has been replaced by Croquet?). Also found the NuBlt-project about speedier blits (between Forms in the image, not to the screen?).
I am confused about the current status of Squeak technologies for high speed graphics. From what I understand, Croquet is the most recent work in this area, based on OpenGL.
I have found SDL to be a very good library, have been working with SDL in Python, using the Pygame library. It has good blitting performance (will post some performance tests later on, comparing Pygame to Squeak). Pygame/SDL uses bitmaps in the current format of the display screen, and I would like to look at how this could be done in Squeak.
As I understand it, there are two ways of using libraries like OpenGL and SDL in Squeak:
1. As an "add on" that bypasses the Display, and renders "on top of" Morphic/Tweak. This is how I understand that Croquet works. Drawback is you cannot use Morphic/Tweak but have to do your own UI system (like the one in Croquet).
2. As an integrated part of the VM, making Display and Forms use the native display format. Then you could use Morphic/Tweak with the best performance.
I have a feeling that it is not as simple as just throwing in SDL as the graphics engine for the VM, as class Form in the image has its own platform-neutral format. While it seems to be challenging to be both platform independent and get maximum graphics performance at the same time, have there been any work in this direction? I have seen discussions about converting Forms to native format, but this has an impact on BitBlt? What is the current status regarding these issues? What happened to ExternalForm and ExternalScreen? I know many of you have been working on these things for years, and it would be interesting to hear your thoughts.
I think that such image will attract more developers interested in game development. I think that e-toys are very powerful but not so attractive to teenagers who want to learn how to code games, so having a image with those tools makes sense to me :)
So I was looking for SDL bindings, I've found some mentions in the swiki and in the mail archive, but they seems outdated and I didn't found anything in Squeaksource or SqueakMap. So in my spare time I started an SDL binding using FFI (Andreas FFI is great :) thanks!!!). I didn't finish it yet but I could publish it "as is" into squeaksource.. so others can help me :)
Yes, I would be interested to look at it. How do you use SDL with Squeak? Do you open a separate window/screen as with wxSqueak? Or do you render graphics on the Squeak window and use Squeak events for input? What are your thoughts of using SDL vs. OpenGL for Squeak games?
There is information about our upcoming game here, there is also a page with English text: http://www.kreativaspel.se/
Best regards, Micke
I don't have a lot of time... but maybe if there are others interested we can create an "ImageForGameDevelopers" :)
(it's possible to load the OpenGL packages used in Croquet? how?)
On 10/13/06, Lord ZealoN lordzealon@gmail.com wrote:
Well, here a question to discuss
¿What do you think about use Squeak for make professional games? (with actual VM or possible future StrongTalk VM)
I'm not talking about something like MineSweeper or Solitarie. I'm talking about a game with good graphics to sell. MMORPG (Lineage 2, EntropiaUniverse, Life...), RTS (Starwars, Warcraft...), Turn-Based Games (UFO, Civilization....)
-- ::Mi blog:: http://blog.lordzealon.com
Linux-User: #370919
Am 05.11.2006 um 12:27 schrieb Mikael Kindborg:
Have also been experimenting with Tweak which is really nice, but as I understand it Tweak, like Morphic, uses standard Squeak Forms and Display to render graphics.
Tweak does not use Display directly. This allows for rendering to multiple display surfaces simultaneously, like when using Host Windows (a.k.a. Areithfa Ffenestri). Also, an experimental version of Tweak exists that uses Rome for rendering, although this also writes to Display in the end for now.
What concerns me is the blit speed of Form and Display. Have searched the mailing list and the swiki and obviously there are lots of issues that have been up for discussion previously, like conversion between pixel formats, endianness, etc. Have seen mention of FXBlt, ExternalForm, and ExternalScreen, which seems to be in the Balloon3D package (which has been replaced by Croquet?).
No, FXBlt has been rolled into regular BitBlt. You can use BitBlt to render to any surface registered via SurfacePlugin. Like, RomePlugin registers Cairo surfaces that can be used as source or destination of BitBlt.
I am confused about the current status of Squeak technologies for high speed graphics. From what I understand, Croquet is the most recent work in this area, based on OpenGL.
Yes, which also is a severe limitation for general use as there is one important platform lacking good general OpenGL support.
I have found SDL to be a very good library, have been working with SDL in Python, using the Pygame library. It has good blitting performance (will post some performance tests later on, comparing Pygame to Squeak). Pygame/SDL uses bitmaps in the current format of the display screen, and I would like to look at how this could be done in Squeak.
As I understand it, there are two ways of using libraries like OpenGL and SDL in Squeak:
- As an "add on" that bypasses the Display, and renders "on top of"
Morphic/Tweak. This is how I understand that Croquet works. Drawback is you cannot use Morphic/Tweak but have to do your own UI system (like the one in Croquet).
Actually, Tweak or Morphic run fine as an overlay inside an OpenGL window. That's how Plopp implements its UI, for example.
- As an integrated part of the VM, making Display and Forms use the
native display format. Then you could use Morphic/Tweak with the best performance.
Actually I think Forms are outdated now, you really want a vector graphics API. So what would be best IMHO is opening a host window and a canvas on its surface, then using canvas commands to draw onto it. I think we have almost all needed bits in place (Host Window Plugin, Rome Plugin), they just need to be integrated.
- Bert -
On 11/5/06, Bert Freudenberg bert@freudenbergs.de wrote:
Am 05.11.2006 um 12:27 schrieb Mikael Kindborg:
Have also been experimenting with Tweak which is really nice, but as I understand it Tweak, like Morphic, uses standard Squeak Forms and Display to render graphics.
Tweak does not use Display directly. This allows for rendering to multiple display surfaces simultaneously, like when using Host Windows (a.k.a. Areithfa Ffenestri). Also, an experimental version of Tweak exists that uses Rome for rendering, although this also writes to Display in the end for now.
Ok, that sounds great. I will look at how Tweak does its rendering. I was thinking it used Display since a Tweak Morphic window works together with other Morphic windows, but that is perhaps a special case, when running Tweak in Morphic, or perhaps I miss something about how the rendering process works.
What concerns me is the blit speed of Form and Display. Have searched the mailing list and the swiki and obviously there are lots of issues that have been up for discussion previously, like conversion between pixel formats, endianness, etc. Have seen mention of FXBlt, ExternalForm, and ExternalScreen, which seems to be in the Balloon3D package (which has been replaced by Croquet?).
No, FXBlt has been rolled into regular BitBlt. You can use BitBlt to render to any surface registered via SurfacePlugin. Like, RomePlugin registers Cairo surfaces that can be used as source or destination of BitBlt.
I will look at the surface plugin, sounds promising!
I am confused about the current status of Squeak technologies for high speed graphics. From what I understand, Croquet is the most recent work in this area, based on OpenGL.
Yes, which also is a severe limitation for general use as there is one important platform lacking good general OpenGL support.
What platform is that?
I have found SDL to be a very good library, have been working with SDL in Python, using the Pygame library. It has good blitting performance (will post some performance tests later on, comparing Pygame to Squeak). Pygame/SDL uses bitmaps in the current format of the display screen, and I would like to look at how this could be done in Squeak.
As I understand it, there are two ways of using libraries like OpenGL and SDL in Squeak:
- As an "add on" that bypasses the Display, and renders "on top of"
Morphic/Tweak. This is how I understand that Croquet works. Drawback is you cannot use Morphic/Tweak but have to do your own UI system (like the one in Croquet).
Actually, Tweak or Morphic run fine as an overlay inside an OpenGL window. That's how Plopp implements its UI, for example.
Well, that is extremely nice, does that boost performance of Tweak/Morphic or is it mainly a way to integrate the UI with the 3D objects?
- As an integrated part of the VM, making Display and Forms use the
native display format. Then you could use Morphic/Tweak with the best performance.
Actually I think Forms are outdated now, you really want a vector graphics API. So what would be best IMHO is opening a host window and a canvas on its surface, then using canvas commands to draw onto it. I think we have almost all needed bits in place (Host Window Plugin, Rome Plugin), they just need to be integrated.
Ok, great! I have to learn how this works. Why are forms outdated? Are there other, better, options when working with bitmapped graphics? Like rendering bitmaps in OpenGL? If I draw on the canvas (I assume you mean a Squeak canvas) then it renders transparently onto the host window surface?
Many thanks indeed for your pointers!
Best, Micke
Here are performance tests that compares blit speed of Squeak and Pygame, a game programming library for Python built on top of SDL (www.pygame.org).
Test were done on an IBM Thinkpad T40 1.2 MHz, running latest Squeak 3.9 on Windows XP, and latest version of Pygame.
The extent of the image 'Waterfall.png' is 1024@768. The extent of the image 'Jewel.png' is 140@194 (this is a sprite that has transparency).
Squeak test code follows here:
background := (Form fromFileNamed: 'Waterfall.png') asFormOfDepth: 32. sprite := (Form fromFileNamed: 'Jewel.png') asFormOfDepth: 32. buffer := Form extent: 1024@768 depth: 32.
bb := BitBlt current new. bb setDestForm: buffer sourceForm: sprite fillColor: nil combinationRule: Form over destOrigin: 0@0 sourceOrigin: 0@0 extent: sprite extent clipRect: buffer boundingBox.
t := [1000 timesRepeat: [bb copyBits]] timeToRun. Transcript show: 'Time for 1000 sprite blits Form over: ', t asString; cr.
bb combinationRule: Form paint. t := [1000 timesRepeat: [bb copyBits]] timeToRun. Transcript show: 'Time for 1000 sprite blits Form paint: ', t asString; cr.
bb combinationRule: Form blend. t := [1000 timesRepeat: [bb copyBits]] timeToRun. Transcript show: 'Time for 1000 sprite blits Form blend: ', t asString; cr.
bb := BitBlt current new. bb setDestForm: buffer sourceForm: background fillColor: nil combinationRule: Form over destOrigin: 0@0 sourceOrigin: 0@0 extent: background extent clipRect: buffer boundingBox.
t := [1000 timesRepeat: [bb copyBits]] timeToRun. Transcript show: 'Time for 1000 image blits Form over: ', t asString; cr.
rect:= 0@0 extent: 1024@768. t := [1000 timesRepeat: [ Display forceToScreen: rect]] timeToRun. Transcript show: 'Time for 1000 screen updates: ', t asString; cr.
Here goes the Python code:
import pygame from pygame.locals import *
GScreenWidth = 1024 GScreenHeight = 768
pygame.init()
screen = pygame.display.set_mode((GScreenWidth, GScreenHeight))
background = pygame.image.load("Waterfall.png") background = background.convert()
sprite = pygame.image.load("Jewel.png") sprite1 = sprite.convert() colorkey = sprite1.get_at((0,0)) sprite1.set_colorkey(colorkey, RLEACCEL) sprite2 = sprite.convert_alpha()
buf = pygame.Surface((1024, 768)) buf.convert()
startTime = pygame.time.get_ticks(); destPoint = 0,0 for i in xrange(1000): buf.blit(sprite1, destPoint) endTime = pygame.time.get_ticks(); print "Time for 1000 sprite1 blits:", endTime - startTime
startTime = pygame.time.get_ticks(); destPoint = 0,0 for i in xrange(1000): buf.blit(sprite2, destPoint) endTime = pygame.time.get_ticks(); print "Time for 1000 sprite2 blits:", endTime - startTime
startTime = pygame.time.get_ticks(); destPoint = 0,0 for i in xrange(1000): buf.blit(background, destPoint) endTime = pygame.time.get_ticks(); print "Time for 1000 image blits:", endTime - startTime
startTime = pygame.time.get_ticks(); for i in xrange(1000): pygame.display.update() endTime = pygame.time.get_ticks(); print "Time for 1000 screen updates:", endTime - startTime
pygame.quit()
Here are the results from the Squeak tests:
Time for 1000 sprite blits Form over: 250 Time for 1000 sprite blits Form paint: 775 Time for 1000 sprite blits Form blend: 1051 Time for 1000 image blits Form over: 8579 Time for 1000 screen updates: 21955
Here are the results from the Pygame tests:
Time for 1000 sprite1 blits: 50 (very fast transparent blit) Time for 1000 sprite2 blits: 373 Time for 1000 image blits: 7090 (Squeak is not that slower) Time for 1000 screen updates: 7031
I have looked a bit at the Windows VM sources and in sqWin32Window.c in function ioShowDisplay it seems that the Windows call SetDIBitsToDevice is used to put the pixels on the display. Is this a bottleneck when it comes to the display update speed? I guess SetDIBitsToDevice converts the DIB to the pixel format of the graphics card?
Best, Micke
Hi again,
I discovered that when you have many smaller non-overlapping animated morphs (sprites) the display rate suddenly drops in an unexpected way when adding new sprites. That was puzzling me, but then I stumbled across a method in class DamageRecorder and found that when having more that 15 dirty rectangles they are merged. That causes a much bigger area of the screen to be redrawn, casing the drop in update rate.
Attached is a change set that adds a class method to DamageRecorder that makes it easy to experiment and change the maximum number of invalid rectangles to fit with the game/application at hand.
Best, Micke
On 11/5/06, Mikael Kindborg mikael.kindborg@gmail.com wrote:
On 10/13/06, Diego Fernandez diegof79@gmail.com wrote:
I would like to create something similar to the Damien's ImageForDevelopers but... ImageForGameDevelopers ;)
Packaged with the tools and tutorials to create simple games in Squeak (OpenGL and SDL bindings...).
I would like to help with this, I develop games for children with Squeak.
Great!! :)
We could make a page called "Game Programming" on the swiki. Was about to do that right now, but I have no password for the swiki. Anyone knows how to get one?
I've created a project in SqueakSource, with public Read&Write permissions, so we can share our "experiments" there:
MCHttpRepository location: 'http://www.squeaksource.com/GameDevTools' user: '' password: ''
There you can get the pre-pre-pre-alpha version of the SDL bindings. They doesn't do anything useful yet, only Init, SetVideoMode and LoadBMP. I'm doing this in my spare time, so the advances are really slow, so if you want to help we can learn more about FFI, SDL Surfaces et. al. together :)
- As an "add on" that bypasses the Display, and renders "on top of"
Morphic/Tweak. This is how I understand that Croquet works. Drawback is you cannot use Morphic/Tweak but have to do your own UI system (like the one in Croquet).
This option is more simple for us (the developers of the SDL bindings :) ). So this is my first approach, develop the interfaces to interact with SDL.
- As an integrated part of the VM, making Display and Forms use the
native display format. Then you could use Morphic/Tweak with the best performance.
I don't know is there is a performance gain in using SDL for this. SDL is only an "adapter" for the OS libraries (DirectX, OpenGL, etc). So I don't want to use SDL as the graphic engine for the VM.
My intentions are at first much much less ambitious: collect a series of packages for game development in Squeak, and put them together, with tutorials and examples.
I started the SDL bindings because I didn't found the ones mentioned in: http://minnow.cc.gatech.edu/squeak/1833
Regards, Diego,-
Hi!
On 11/6/06, Diego Fernandez diegof79@gmail.com wrote:
I've created a project in SqueakSource, with public Read&Write permissions, so we can share our "experiments" there:
MCHttpRepository location: 'http://www.squeaksource.com/GameDevTools' user: '' password: ''
There you can get the pre-pre-pre-alpha version of the SDL bindings. They doesn't do anything useful yet, only Init, SetVideoMode and LoadBMP. I'm doing this in my spare time, so the advances are really slow, so if you want to help we can learn more about FFI, SDL Surfaces et. al. together :)
Great, updated the SDL page on the swiki with this info, and made a link from the game programming page: http://minnow.cc.gatech.edu/squeak/5891
Anyone knows if previous work on SDL-bindings is available somewhere? Would be useful as a reference.
- As an "add on" that bypasses the Display, and renders "on top of"
Morphic/Tweak. This is how I understand that Croquet works. Drawback is you cannot use Morphic/Tweak but have to do your own UI system (like the one in Croquet).
This option is more simple for us (the developers of the SDL bindings :) ). So this is my first approach, develop the interfaces to interact with SDL.
I see, but it would be good to also improve the speed of Morphic/Tweak.
The performance tests I did with Pygame shows that in terms of blit speed, both between images/forms and to the display, we could have something to learn from SDL. I am wondering if the generality of BitBlt is what makes it perform less well than Pygame/SDL, or if other aspects are involved.
For blitting between forms it could be worthwhile to continue the development of NuBlt, and make a speedy blitter for specialised cases of 32-bit forms and Form over and Form paint operations.
For high-end games Morphic/Tweak support might not be relevant, but I wonder if the previous SDL-bindings where using SDL as the engine for the VM, or if they were using your approach.
Also, with the Surface Plugin, it should be possible to use SDL surfaces transparently as Forms in Squeak. Then again, OpenGL might be a better option, as you and Bert discussed previously.
- As an integrated part of the VM, making Display and Forms use the
native display format. Then you could use Morphic/Tweak with the best performance.
I don't know is there is a performance gain in using SDL for this. SDL is only an "adapter" for the OS libraries (DirectX, OpenGL, etc). So I don't want to use SDL as the graphic engine for the VM.
Yes, in my tests, blitting to the display took the longest time, and perhaps this is not possible to optimise without using a bitmap organisation that matches the display surface (which is was SDL does). But is should be possible to convert forms in the Squeak image to the format of the display, e.g. on startup or on the fist use of the form (or simply manually in the application code). This this approach can be a promising one, given how well Pygame performs.
My intentions are at first much much less ambitious: collect a series of packages for game development in Squeak, and put them together, with tutorials and examples.
Yes, we should get a collection of code examples.
I started the SDL bindings because I didn't found the ones mentioned in: http://minnow.cc.gatech.edu/squeak/1833
Regards, Diego,-
Best regards, Micke
Hi!
"Mikael Kindborg" mikael.kindborg@gmail.com wrote:
For high-end games Morphic/Tweak support might not be relevant, but I wonder if the previous SDL-bindings where using SDL as the engine for the VM, or if they were using your approach.
Also, with the Surface Plugin, it should be possible to use SDL surfaces transparently as Forms in Squeak. Then again, OpenGL might be a better option, as you and Bert discussed previously.
What about Rome - the new Cairo plugin? I have of course no idea, just giving a headsup. :)
regards, Göran
Thanks! Found Rome on Squeak source. Ha det bra! Micke
On 11/7/06, goran@krampe.se goran@krampe.se wrote:
Hi!
"Mikael Kindborg" mikael.kindborg@gmail.com wrote:
For high-end games Morphic/Tweak support might not be relevant, but I wonder if the previous SDL-bindings where using SDL as the engine for the VM, or if they were using your approach.
Also, with the Surface Plugin, it should be possible to use SDL surfaces transparently as Forms in Squeak. Then again, OpenGL might be a better option, as you and Bert discussed previously.
What about Rome - the new Cairo plugin? I have of course no idea, just giving a headsup. :)
regards, Göran
Great, updated the SDL page on the swiki with this info, and made a link from the game programming page: http://minnow.cc.gatech.edu/squeak/5891
Anyone knows if previous work on SDL-bindings is available somewhere? Would be useful as a reference.
Reda Forth is using SDL for doing all the rendering. It might be a good reference starting point.
http://www.geocities.com/redaforth/reda4pc.zip
I am also attaching the source code files where SDL is being referenced (comments are in Spanish, but Diego won't have a problem with that).
Umhhh, now I understand why it Reda4 looked so bad on a double monitor...
if(!(gr_screen=SDL_SetVideoMode(1024,768,32,SDL_DOUBLEBUF|SDL_FULLSCREEN))) //if(!(gr_screen=SDL_SetVideoMode(800,600,16,SDL_SWSURFACE|SDL_DOUBLEBUF|SDL_FULLSCREEN))) //if(!(gr_screen=SDL_SetVideoMode(640,480,32,SDL_DOUBLEBUF|SDL_FULLSCREEN))) return -1;
Cheers, Francisco
Hi Diego,
On 10/13/06, Diego Fernandez diegof79@gmail.com wrote:
So I was looking for SDL bindings, I've found some mentions in the swiki and in the mail archive, but they seems outdated and I didn't found anything in Squeaksource or SqueakMap. So in my spare time I started an SDL binding using FFI (Andreas FFI is great :) thanks!!!). I didn't finish it yet but I could publish it "as is" into squeaksource.. so others can help me :)
I have looked a bit at how to access surfaces from Squeak using the SurfacePlugin pointed to by Bert. Found some useful information in an email from Andreas, which I have put on this page: http://minnow.cc.gatech.edu/squeak/5891
What do you think about doing an SDL plugin and draw on SDL surfaces via the SurfacePlugin?
Which approach did you use for your SDL binding?
Best regards, Micke
Lord ZealoN wrote:
Well, here a question to discuss
¿What do you think about use Squeak for make professional games? (with actual VM or possible future StrongTalk VM)
I'm not talking about something like MineSweeper or Solitarie. I'm talking about a game with good graphics to sell. MMORPG (Lineage 2, EntropiaUniverse, Life...), RTS (Starwars, Warcraft...), Turn-Based Games (UFO, Civilization....)
I think the biggest game platform today is flash and shockwave games on the internet. Squeak could be a great alternative in that arena. And by the time the tools are done and developer numbers pick up, hardware will be so fast one can do really do advanced games. Karl
The Croquet Project is built on Squeak and goes FAR beyond the vast majority of game engines, to the extent that "games like" those you've mentioned are really poised to become quite outdated.
Take a look at the Croquet website (http://www.opencroquet.org/) as well as the Wikipedia Croquet entry for some ideas about the potential Squeak gives the creative game designer. The videos at http://www.lisarein.com/alankay/tour.html are a good introduction.
All the best,
Gary
----- Original Message ----- From: "Lord ZealoN" lordzealon@gmail.com To: "The general-purpose Squeak developers list" squeak-dev@lists.squeakfoundation.org Sent: Friday, October 13, 2006 8:24 AM Subject: Games with Squeak
Well, here a question to discuss
¿What do you think about use Squeak for make professional games? (with actual VM or possible future StrongTalk VM)
I'm not talking about something like MineSweeper or Solitarie. I'm talking about a game with good graphics to sell. MMORPG (Lineage 2, EntropiaUniverse, Life...), RTS (Starwars, Warcraft...), Turn-Based Games (UFO, Civilization....)
squeak-dev@lists.squeakfoundation.org