2D game engine with newLisp

Started by ale870, July 01, 2011, 02:55:10 PM

Previous topic - Next topic

ale870

Hello,

after several months of absence, I restarted to work with newLisp. In this time I made a lot of experience making 2D and 3D games.

Now I wanted to make "a big step": I'm working to create a program to make GUI and 2D games using newLisp as scripting language.

I'm working also to create an IDE to work with it and, maybe, I will restart to make the fancy editor I started in the past (ZuQu Editor).



I have a couple of questions:



1) Can I sell the environment for a cheap price (e.g.: 5 euro)? There are some problems to sell my complete environment regarding newLisp license? Am I obliged to publish the source code of my game engine if I use newLisp (due to its license)? Can I include newLisp DLL in the distribution or I only need to supply the web address so the people can download newLisp? I wanted to sell the game just to get some funds to maintain the site, the tools I bought, and to get some money (I could even accept some donations or sponsors).



2) Do you think it could be an interesting product?



Consider that I already made several tests, and I already made some optimizations and, it is FAAAAST!

Can you give me some comments, suggestions, etc... about it?



Thank you!
--

HPW

#1
Hello,



Lutz has posted some interesting new infos here:



http://newlispfanclub.alh.net/forum/viewtopic.php?f=2&t=3903">http://newlispfanclub.alh.net/forum/vie ... f=2&t=3903">http://newlispfanclub.alh.net/forum/viewtopic.php?f=2&t=3903



So when you deliver a unchanged DLL and provide a link to the newLISP-site you should be fine.



Some questions:



On which OS ?

Do you use other development systems for the GUI or native system calls?

Do you plan to package your lisp-source to hide them from the end-user?



>Do you think it could be an interesting product?



Depends on the game-conzept.

A used tool does not make it interesting alone, gamer does not really care about the used language I think.



Regards



Hans-Peter
Hans-Peter

ale870

#2
Thank you for the link, I will read it immediately :-)


QuoteSome questions:



On which OS ?


Cross platform: Linux, Mac & Win


QuoteDo you use other development systems for the GUI or native system calls?


This new environment will contain functions to build a GUI (so unrelated to 2D game engine self). IN that way you can use this engine to build efficient GUI to make programs with GUI. The system is faaast since I don't use sockets to let newLisp communicate with my engine, instead I map engine functions in newLisp, so newLisp can call engine functions like you can do using a DLL: it means the function call is fast and efficient.



No native system calls for now. This is the concept: if you use a scripting language, it means you need to do something quickly, so you will have some functions that automatically manage the "dirty" job. Obviously, every function will have several options to make it flexible.


QuoteDo you plan to package your lisp-source to hide them from the end-user?


No! I think newLisp is a wonderful language (I used it from several years), so newLisp will be the official programming language to use this engine. Furthermore, I'm working hard to try to find a good compromise between efficiency (a.k.a speed!) and newLisp "philosophy" (programming concepts, coherent syntax, etc...).

Even if the engine will not be open source (and will cost a "symbolic" price of about 5 euros), I will leave "open" as much as possible. Furthermore, if I will interrupt the project for some reasons I will release the source code of the project self. About this last point, consider that I'm already commenting the source code in english language (even if I'm italian), and I will apply comments to be clear for everyone (I hope! :-)


QuoteA used tool does not make it interesting alone, gamer does not really care about the used language I think.


Yes, of course you are right. But consider that this engine is not for "the final user", but for the programmer. And a programmer is really interested to the programming language, the IDE, etc...



EDIT: Ops, I forgot to talk about 2D engine!

You will be able to make full screen games, windowed games, andyou will be able to use 2D acceleration in a kind of canvas inside the GUI (as part of your program).
--

HPW

#3
QuoteDo you use other development systems for the GUI or native system calls?


So where is your engine writtem in?

C or Java or ......?



Of course the project sounds interesting.

Happy coding.



Regards



Hans-Peter
Hans-Peter

ale870

#4
I'm using 3 technologies:



1) newLisp for scripting :-)

2) BLitzmax for application engine (manage GUI, 2D and more) http://www.blitzbasic.com">//http://www.blitzbasic.com

3) LiveCode (ex Runtime Revolution) to create the IDE  http://www.runrev.com/">//http://www.runrev.com/
--

ale870

#5
Hello,



I made several steps forward in 2D Game engine side.

Now newLisp directly maps engine functions (no ICP communication or socket communication, but direct call, like a DLL).



Now I'm working to fix some issues, and I'm creating some conventions and fix function names structure.



I will open a dedicated web site soon, just to show a works-in-progress of the engine.



NOTE: I can manage, from newLisp, in real time, thousand of rectangles in real-time ;-) (60 FPS)



One thing more: I called this engine (GUI and 2D game engine) "Bite The Byte" :-)



I will supply more info very soon!



Cheers!
--

ale870

#6
Hello,



I just opened a new domain for this program: http://www.bitethebyte.net">www.bitethebyte.net



It is still empty, but now I will use it to store a draft of the engine.

Basically it is an executable, and will allow you to make some trivial scripts, just to "taste" the engine.



Very few functions are available, but good enough to realize a simple game like "Game of Life".



I will publish the engine (now for WIndows only, sorry) and  some basic scripts just to explain some key-concepts (this engine contains some intersting features).



I will publish the files within this week.



Cheers!
--

ale870

#7
Some days ago, some friends of mine made me an interesting question: (they said): "do you think it is useful to make another 2d engine? no body wants any more 2d engines, and in the market there are good engines".



So my mind "crashed": do you think it could be nice making a 2d engine (with an IDE) using newLisp?



Please "unlock" my mind!



Thank you :-)
--

TedWalther

#8
If you want to make money, well, who knows.



But, I think it is beautiful.  My favorite games are 2D.  I play flash games in my browser, mainly "Tower Defense" games.  There are a lot of "little old ladies" around who are addicted to "Bejewelled", "Majhong", and "Solitaire".  I miss the old platform run and jump games.  With the right 2D engine, maybe I'd try an update of Duke Nukem 2, Sonic, or Mario.  Who knows...



Dino Run is fun, but imagine how much nicer it would be with better graphics, and smoother gameplay.  The GC in Flash gives these games unacceptable limits and slowdowns that kill the gameplay.  Having rock-solid physics would be the best.



Puzzle games aren't going out of style.  The 'Zuma" family of "shoot colored marbles" games is a lot of fun too.



So... please do finish your 2D engine!  Can you do a sprite based compositor?



SDL is crossplatform; perhaps make your 2D engine be a wrapper on top of that?  That way a person could bundle a game for Windows, Linux, and Mac.



Another another game related topic; what is the "secret" for transitioning music in games?  I've noticed that music "transitions" depending on game state, from different themes, to just different tempo and mood.  How do they do it so it doesn't miss a beat or sound glitchy?  It is always a smooth transition.  It is as if there are breakpoints set inside each tune for potential transitions.
Cavemen in bearskins invaded the ivory towers of Artificial Intelligence.  Nine months later, they left with a baby named newLISP.  The women of the ivory towers wept and wailed.  \"Abomination!\" they cried.

ale870

#9
Thank you, your words are like "honey" for my brain.

My friends said that there are a pletora of 2D engines already in the market (Yoyo Game Maker, Multimedia Fusion, Blitzmax, DarkBasic, Torque 2d, Love 2d, etc...).



http://en.wikipedia.org/wiki/List_of_game_engines">//http://en.wikipedia.org/wiki/List_of_game_engines



http://rampantgames.com/community/viewtopic.php?t=697">//http://rampantgames.com/community/viewtopic.php?t=697



So I like your happiness about newLisp in 2D, but... don't you think that there are already enough engines available?

In my mind I think all those engines have similar languages for programming, and use similar tools.



I think newLisp, a functional language, could be REALLY different. Furthermore, I'm working to make an engine based on templates and detachable properties.



Ok, I will publish a version 0.00000000001 of BiteTheByte very soon.
--

ale870

#10
Thank you, your words are like "honey" for my brain.

My friends said that there are a pletora of 2D engines already in the market (Yoyo Game Maker, Multimedia Fusion, Blitzmax, DarkBasic, Torque 2d, Love 2d, etc...).



http://en.wikipedia.org/wiki/List_of_game_engines">//http://en.wikipedia.org/wiki/List_of_game_engines



http://rampantgames.com/community/viewtopic.php?t=697">//http://rampantgames.com/community/viewtopic.php?t=697



So I like your happiness about newLisp in 2D, but... don't you think that there are already enough engines available?

In my mind I think all those engines have similar languages for programming, and use similar tools.



I think newLisp, a functional language, could be REALLY different. Furthermore, I'm working to make an engine based on templates and detachable properties.



Ok, I will publish a version 0.00000000001 of BiteTheByte very soon.
--

TedWalther

#11
Sure there are lots of engines available.  But I don't have time to write the newLISP interface for it.  So if you are writing one, great!  I suggest you take libsdl, import the necessary functions, and then write your own interface on top of that.  But the ByteMax 2D engine you link to, does look very nice.  I only base that on the screenshots; I didn't see any sample code of how it is conceptually organized and designed.  Maybe it is a mess. I don't know.



Personally, I would like to be able to draw sprites, plunk arbitrary graphics on the canvas, detect collisions, etc.



Here is a use for the alpha channel; it could be totally transparent, and totally opaque.  This would make compositing AND COLLISION DETECTION trivial.  libsdl already supports alpha channel I believe.  Then I could just use PNG files for graphics.



What do you think?



Remember, don't redo anything you don't have to.
Cavemen in bearskins invaded the ivory towers of Artificial Intelligence.  Nine months later, they left with a baby named newLISP.  The women of the ivory towers wept and wailed.  \"Abomination!\" they cried.

ale870

#12
Hello,

thank you for your suggestions.



My tools are the following (see some posts before ;-) :



1) Blitzmax 2D (http://www.blitzbasic.com">//http://www.blitzbasic.com)

2) LiveCode for IDE (http://www.runrev.com">//http://www.runrev.com)



My engine is called BiteTheByte and will be cross platform (this is the reason I selected those tools: Linux Mac PC).



There are:



1) PRimitives (rectangles, oval, lines)

2) Color channel (change color of an image or primitive)

3) Alpha channel

4) Object rotation in real time (no need to create a lot of sprites for rotation!)

5) Collision detection (I'm writing it in these days) it will not be based on pixel perfect, since that method is really Slow. But since I know that a rectangle/oval collision is fast but, sometimes, not so precise, you will be able to create multiple primitives to better fit your sprite.

6) This is a small example of code (working example):


(btb2d:engine-start 800 600)

(context 'Example1)
(setq objRect (btb2d:model-create btb2d:MODEL-RECTANGLE))
(btb2d:size objRect 50 50)
(btb2d:pos objRect 30 30)
(btb2d:visible objRect btb2d:TRUE)
(btb2d:color objRect 255 0 0)
(context MAIN)


As you can see, I created a Rectangle, then I setup position, size, visibility (true), and it's color (RRGGBB).

No need to create forever loop (as many 2D engines do), no need to create an update procedure, etc...



How templates work? Well, imagine a game like Space Invaders. You have a ton of aliens really replicated on the screen, and they change only for position, and maybe, for its color.

Well, in BiteTheByte you will simply load an alien image (in white color, so you can "repaint" it at runtime). Then create a ton of aliens (instances) using that template. When you create an object-instance, the instance is not an independent object (as in many engines happen), but they are tightly linked: if you change something in the template, also all the instances are affected.



Well, since when you create some instances you need to change the position, then you will DETACH THE POSITION property.

Look at this example:


(btb2d:engine-start 800 600)

(context 'Example1)

; OBJECT TEMPLATE (this is your Alien template)

(setq objRect (btb2d:model-create btb2d:MODEL-RECTANGLE))
(btb2d:size objRect 50 50)
(btb2d:pos objRect 50 50)
(btb2d:visible objRect btb2d:TRUE)
(btb2d:color objRect 255 0 0)

; I will create an object instance (clone).
(setq objAlien (btb2d:model-instantiate objRect))

; Detach the properties that will not be "linked together (MODEL<->INSTANCE)"
(btb2d:prop-detach objAlien btb2d:PROP-POS)

; Now I can set a new position for this alien.
(btb2d:pos objAlien 200 200)

(context MAIN)


As you can see, "objAlien" is attached to its template "templateAlien". Then I "detached" the property "position" so the instance is not attached any more to its template.

Finally I set a new position for the instance.

The other properties are still attached together, so if I change the color of the template, then the color of all attached instances is changed also.



Ok, I hope you like this concept. I'm creating a site for this engine, so I will be able to publish something very soon.



Cheers!
--

ale870

#13
Hi!!!!



During these holidays I spent some time to improve some functions, to fix the syntax, to make the engine more and more "aligned" to the "philosophy" of a functional language.



Even if a ton of things are still missing, I opened the site, and I published (inside "ABOUT" page) some more information about this engine.

I even published some working examples. Check that page to "taste" this engine, to understand some key-concepts and to discover some interesting features (I worked so much to implement them, so I hope you will appreciate them :-)  ).



This is the homepage: http://www.bitethebyte.net/blog/?page_id=2">//http://www.bitethebyte.net/blog/?page_id=2



I created a wiki page also, but I'm working to fill-in documentation.

In fact now I'm working to create documentation for API, for Tutorials, etc...



Today or tomorrow i will publish, in that site, the EXECUTABLE FOR Ms Windows (Linux will arrive soon, and for Mac... I have a problem: I haven't a Mac so I cannot compile and test for it :-(  ). I'm looking for a solution (sorry but I haven't money to buy a new Mac now!).



Since the engine version is 0.0000000001  :-)  I will distribute it for free now. Later, when it will be to an advanced development stage, I will apply a "symbolic" fee (I think about 5 euro). So donations are really appreciated :-) (thank you in advance!).



Any opinion or comments are really appreciated also, so please write write and write! Send me your comments and suggestions!



I will keep you informed for development status.



Cheers!
--

ale870

#14
The download version is ready!

As I said, this is a draft version, but can be used to make easy games like "The game of life" (someone wants to try to make it?).

In these days I'm writing the documentation API and some tutorials.

Check also the page "About" in the blog!



Download Windows version: http://www.bitethebyte.net/wiki/doku.php?id=start">//http://www.bitethebyte.net/wiki/doku.php?id=start



Blog: http://www.bitethebyte.net/blog">//http://www.bitethebyte.net/blog



Cheers!
--