Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411507 Posts in 69374 Topics- by 58429 Members - Latest Member: Alternalo

April 25, 2024, 11:29:32 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Lo-fi game dev.
Pages: [1]
Print
Author Topic: Lo-fi game dev.  (Read 5184 times)
jcromartie
Level 0
***


View Profile
« on: April 18, 2008, 12:55:25 PM »

OS X users (dustin, I'm looking at you) out there can check out this tiny proof of concept.

** New version: 0.0.1 **

Download it here.

Run the app and then open the accompanying Lua script (road.lua).  Left and right move your dot.  Command+Q quits.  Check out the source, and let me know if you have any suggestions.  Write your own stuff (init gets called when the script is loaded, draw gets called every frame, the rest is all up to you) and post it back here in code tags for all to enjoy.

It is very rough around the edges, and I need a volunteer to port it to Windows.  It uses SDL and Lua.  I have not documented any features yet.

At the moment, if you have errors in your Lua code they will be reported in Console.app (in Utilities).
« Last Edit: April 21, 2008, 08:05:09 AM by jcromartie » Logged
Corpus
Guest
« Reply #1 on: April 18, 2008, 01:04:21 PM »

I'll take a look, but it kinda seems like you were heavily inspired, shall we say, by BaronCid's idea.
Logged
jcromartie
Level 0
***


View Profile
« Reply #2 on: April 18, 2008, 01:09:41 PM »

I'll take a look, but it kinda seems like you were heavily inspired, shall we say, by BaronCid's idea.

I've actually been playing with low-res ideas for a while.  This is actually just a scaled back version of something that was using OpenGL and arbitrary resolutions and color schemes.  This version is most certainly inspired by the super-limited environment BaronCid described.

Unfortunately, since he posted his idea he hasn't written a line of code.  He also thinks I'm totally off base for wanting to use a language that does not have colons at the beginning of every line, use "#" for left-to-right assignment, limit arrays to 100 elements in size, and not have any facility for defining functions.  With that in mind, and consider my attempts to gently nudge the idea in the "right" (in my opinion) direction, here is a working app that people can play with, and not just some crackpot ideas and wishful thinking.

Enjoy.
« Last Edit: April 18, 2008, 02:11:43 PM by jcromartie » Logged
Corpus
Guest
« Reply #3 on: April 18, 2008, 03:50:21 PM »

That was unpleasant, so I'm afraid there's something I have to say.

The dropshadow on your icon is insufficiently lo-fi. Good day, sir.
Logged
Lukas
Level 3
***



View Profile
« Reply #4 on: April 18, 2008, 04:05:51 PM »

The dropshadow on your icon is insufficiently lo-fi. Good day, sir.

Pwnt.

http://youtube.com/watch?v=eBGIQ7ZuuiU (insert purpose for that link here)
Logged

I make (60s/70s) rock music. Listen to my band's new album here: www.speicher.bandcamp.com
Zaphos
Guest
« Reply #5 on: April 18, 2008, 04:08:14 PM »

This also looks a lot like goldbrick's qixl.
Logged
jcromartie
Level 0
***


View Profile
« Reply #6 on: April 18, 2008, 05:07:24 PM »

This also looks a lot like goldbrick's qixl.

That's pretty much what I had going with the initial effort.  You could set arbitrary resolutions, and it used sqlite to store scripts and data.  I didn't really think a SQL database would be too useful for the average little pixel art game, but maybe I'll go back and polish it up.
Logged
Ryan
Level 1
*



View Profile
« Reply #7 on: April 18, 2008, 06:37:14 PM »

Looks really nice! Pretty charming, the one issue I saw is that the title bar just had L... rather than 'Low' due to the small size of the window. Also, 2x, 4x, and fullscreen modes would be great features to have. Looked through the source, pretty neat game for only 24 lines. I'll mess around with it once you release some sort of documentation. Also, icon is great. You should use that icon for the app archive.

Keep us updated! Smiley

Edit: Also, why all the hate... did I miss something? Manlove is starting to dissapear on TIGS Cry


« Last Edit: April 18, 2008, 06:39:29 PM by Ryan » Logged
dustin
Level 6
*


View Profile
« Reply #8 on: April 18, 2008, 08:16:50 PM »

yeah I was the one who asked him to post it anyway to so I don't see what people are being so uppity about

edit:

lowerquarry-3-160:~/Desktop/Low/Low.app/Contents/MacOS dustin$ ./Low
Setting up package loader path as ./?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/lib/lua/5.1/?.lua;/usr/local/lib/lua/5.1/?/init.lua;Low.app/Contents/Resources/?.lua;Low.app/Contents/Resources/?.lc
Error requiring core: [string "require('core')"]:1: module 'core' not found:
        no field package.preload['core']
        no file './core.lua'
        no file '/usr/local/share/lua/5.1/core.lua'
        no file '/usr/local/share/lua/5.1/core/init.lua'
        no file '/usr/local/lib/lua/5.1/core.lua'
        no file '/usr/local/lib/lua/5.1/core/init.lua'
        no file 'Low.app/Contents/Resources/core.lua'
        no file 'Low.app/Contents/Resources/core.lc'
        no file './core.so'
        no file '/usr/local/lib/lua/5.1/core.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'


is what I get when I try to run it from command line.  By double clicking it opens up and then I select the game and a window opens and then crash.  I don't have lua installed though so I assume it's something to do with that?  I like the lua though. I finished translated my pseudo code into in my java version and it looks like this...
Code:
	int playerx=50,playery=90,playervelx=0,playerspeed=1;
int roadx=50,roadw=40,roadvelx=0;

public void tick(){
if(keys['d'])playerx++;
if(keys['a'])playerx--;
scroll(playerspeed);
drawline(roadx-roadw/2,1,roadx+roadw/2,1); //this needs to be repeated for however much I scroll
drawsquare(playerx,playery,2,2);
if(collision) reset();
if(rand()>0.9){
if(rand()>0.5 && roadvelx!=1) roadvelx++;
else if(roadvelx!=-1) roadvelx--;
}
if(roadx<0)roadvelx=1;
else if(roadx>100)roadvelx=-1;
roadx+=roadvelx;
if(frame%100==0)roadw--;
}

So as you can see it's very very similar.  Mine scrolls vertically though not horizontally Smiley  It's fun to see that from the same pseudo code we get pretty much the same real code even in two different languages and two different engines written by us both independantly.
« Last Edit: April 18, 2008, 09:02:33 PM by dustin » Logged
Corpus
Guest
« Reply #9 on: April 19, 2008, 01:00:10 AM »

Yeah, sorry for instigating. I know that lo-fi engines are by no means unheard of. I just thought he should have given acknowledgement where it was due. There's still a place for BaronCid's idea (which is by no means crackpot,) because his is focused more on working with restrictions for the sake of working with restrictions.

Anyway, I have some work and painting (and Noitu Love 2) to get out of the way this morning and then I'll take a look at it.
Logged
jcromartie
Level 0
***


View Profile
« Reply #10 on: April 19, 2008, 08:41:11 AM »

        no file 'Low.app/Contents/Resources/core.lua'

That's the odd part... the file should be there.  Hmm, I'll have another build up soon with some other improvements though.
Logged
Hideous
That's cool.
Level 10
*****


3D models are the best


View Profile WWW
« Reply #11 on: April 19, 2008, 11:52:34 AM »

Need. Windows. Port.
Logged

Golds
Loves Juno
Level 10
*


Juno sucks


View Profile WWW
« Reply #12 on: April 19, 2008, 12:36:22 PM »

You need to include Lua.framework in your executable.  Make sure you add it as a Linked Framework as well as Targets->Copy Frameworks into .app bundle in XCode.
Logged

@doomlaser, mark johns
jcromartie
Level 0
***


View Profile
« Reply #13 on: April 19, 2008, 04:17:52 PM »

You need to include Lua.framework in your executable.  Make sure you add it as a Linked Framework as well as Targets->Copy Frameworks into .app bundle in XCode.

It's there.
Logged
Eclipse
Level 10
*****


0xDEADC0DE


View Profile WWW
« Reply #14 on: April 20, 2008, 01:04:54 AM »

Unfortunately, since he posted his idea he hasn't written a line of code.  He also thinks I'm totally off base for wanting to use a language that does not have colons at the beginning of every line, use "#" for left-to-right assignment, limit arrays to 100 elements in size, and not have any facility for defining functions.  With that in mind, and consider my attempts to gently nudge the idea in the "right" (in my opinion) direction, here is a working app that people can play with, and not just some crackpot ideas and wishful thinking.

Enjoy.

Actually i like BaronCid crackpot ideas better
Logged

<Powergloved_Andy> I once fapped to Dora the Explorer
Hideous
That's cool.
Level 10
*****


3D models are the best


View Profile WWW
« Reply #15 on: April 20, 2008, 09:40:06 AM »

I say this looks better. Maybe because I'm used to Python, and from the little I've seen Lua looks very similar...
Logged

jcromartie
Level 0
***


View Profile
« Reply #16 on: April 20, 2008, 12:30:03 PM »

I say this looks better. Maybe because I'm used to Python, and from the little I've seen Lua looks very similar...

Lua has a few things going for it:

1) It has a simple, well-defined, unambiguous, but still flexible syntax.

2) It has three scalar data types (numbers, strings, and functions), one complex data type (tables), and nil

3) You can build whatever sort of object system you'd like (single-inheritance, multiple-inheritance, prototype-based, etc.)

4) It's currently the fastest and smallest "scripting" language available

5) You can use tables for anything... lists, hashes, stacks, queues, objects (when used with metatables)

6) Coroutines can act like lightweight threads

7) Multiple return values.  That means you can swap variables like: x, y = y, x

There's a lot more that can be said about it, but those are some of my favorite features.  I'm planning to make several "tiers" of features for this app, which is going to have a proper name soon.  Tier 1 is just what you see in the example I have posted so far, plus simple sound generators.  Rectangles, pixels, two colors, simple input.  Tier 2 is 256-colors, 320x240, palletized, with support for proper image and sound loading.
Logged
Hideous
That's cool.
Level 10
*****


3D models are the best


View Profile WWW
« Reply #17 on: April 20, 2008, 09:26:20 PM »

I keep looking in here everyday for a Windows port.
Logged

jcromartie
Level 0
***


View Profile
« Reply #18 on: April 21, 2008, 08:07:13 AM »

I have posted a new version that adds text output, which is demonstrated in the road.lua example.  The game also flows top-to-bottom, since dustin mentioned it and that is the classic way this game was presented.  It is much better than right-to-left.
Logged
jcromartie
Level 0
***


View Profile
« Reply #19 on: April 22, 2008, 07:29:55 AM »

I've got some very exciting new stuff coming up:

A remote debugging console which lets you set breakpoints and evaluate code.

Save file capabilities.
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic