luckykaa: (Exterminate)
So, if we only allow 3 levels of lighting, we get a nice cartoonish effect.


No idea what happened to my shadows though. Will have to look into that one.
luckykaa: (Exterminate)
Added shadows.


Also a wavefront object loader so I actually have something to cast shadows. Also, there are a lot of sites offering free objects for download.
luckykaa: (Wolf)
I did some OpenGL stuff.I've been meaning to get around to doing some shader stuff for a while. My OpenGL skills are a little stuck in the 1990's.

So experiment 2 was lighting.Experiment 1 was bump mapping and I did that some time ago. So, after a lot of debugging, I'm fairly happy with what I have.


It's all a little bit matte, because I'm not trying to do anything too clever here. No specular or anything; just ambient lighting and a spotlight. There's also no shadow. That requires a whole load more work, and I want to refactor my renderer before I do that. The other things that I need to look into is attenuation with distance. A lightsource twice the distance away is a quarter of the brightness. But that actually doesn't look as good.

Might do shadows next. Might have a go at a toon shader, but that adds an extra annoyance of really needing models. And really I want to get the render-to-texture thing happening. And multipass.

Anyway, I think I can call this done for today. I have something to show for my efforts after all.
luckykaa: (Robot)
In our previous installment (which I don't think I actually mentioned) I managed to get Pi-fighter - my Raspberry Pi - working. Also got X working. This is nice because it means I can access the system from the comfort of my laptop PC.

Today I started tinkering with bluetooth.  It should involve 3 commands:
sudo apt-get install --no-install-recommends bluetooth
sudo service bluetooth status
hcitool scan

The first command worked fine. The second one had an odd error message. A bit of googling told me I can ignore this. The third one simply refused to work. After much googling I found out that there was an hciconfig command it told me the interface was DOWN. So I needed to turn it UP

hciconfig hci0 cc up

Should have worked. Turns out I need to run as root.

So I scanned and i saw my mobile phone and my wiimote. Yay! Even managed to work out how to set up a connection (although there didn't seem an obvious way to maintain a connection). Still, doesn't matter. There are python modules to do that. Tried a cut and paste.

socket connect error (control Channel)

So I tried to use a genuine remote instead. Yeah... That worked. That's a little disappointing. I want to use a cheaper controller. I guess I can probably get this to work with a bit of C tinkering. It's network stuff though. Network stuff scares me.

The next problem - how do I actually read it. There are plenty of tutorials, but doesn't seem to be any actual documentation! Still, I think I have a basic idea about it now. I can at least read the values I want to read. And probably make it rumble :)

For my next trick I need to control some motors. Pondring concepts for ball balance bot.
luckykaa: (Exterminate)
I like feeling creative. It's fun producing something. I just can't decide what.

In the past, I did programming. That's a good weekend activity - actually working on something I want to work on, but my weekends seem to be frequently busy these days. After a day at work, I'm really not in the mood for even more staring at computers.

I am rather pleased that I seem to be slowly improving at drawing, and I quite like the idea of making a comic. Shame I still don't have a plot. Or a setting. I think I have a character but that might change.

My initial idea was 1920's dieselpunk. But then I figured I don't really like the fashions. 1960's is much more relaxed and colourful. I don't want to do historical though. I want to do speculative. So atompunk/raygungoth it is.

This does require some worldbuilding. Obviously the year is something futuristic sounding like 2000AD. The cold war is still going on, of course. There are space stations, rocket ships, and everyone wears shiny silver outfits.

No plot though. Also, not sure if my ace reporter is a good fit. Ponering if I should furry the whole thing up and create some anthros instead. I'm often accused of being a furry. Why not go the whole hog? Pigs are cool!
luckykaa: (geometry)
I've finally had time and energy to make some sort of progress on my comic editor. I can now draw speech bubbles, and change the shope of the tails. Change the outline, change the colour, hook them to a frame, and the tail will stick in place. Taken forver to get this to work satisfactorily. Partly out of a pigheaeded desire not to add curve editing controls. Realized that was daft. Spent a chink of time dealing with inexplicably bugs as well, and drawing icons takes longer than you might expect.

What I have found is that UI design is hard.
Images under the cut )
I will say I'm fairly pleased with my progress today. I could technically use this to create a strip. I have a million and one more features to add, and about half a dozen before I actually think it's ready to put on sourceforge or something. Still need to work out what licences Qt allows me to release under. Honestly I doubt anyone would want to use my code but if they do I want them to be able to without any obligation.
luckykaa: (Wolf)
Qt has several different types of line pattern. Solid, dotted, dashed, dotdashed and so on. I wanted to come up with filenames for icons that are more concise and distinguishable than dashdotdashLine and dashdashdotLine. Doesn't need to be obvious to the user. Just to me, and expandable in an obvious way

It suddenly became obvious.

My lines are now saved as:

While it is only for my own purpose, I wonder it it is obvious to others which is which.
luckykaa: (Gune)
Currently, the biggest limitation of my comic maker is that speech bubbles are limited. I can draw bubble shapes, or at least I will be able to once the UI and save mechanism are hooked up, but it's the tail (a.k.a the pointy bit) that's causing problems. Most comics use curved tails.

I already had a mechanism for selecting and editing points, and for doing the same with bounding boxes. I didn't want to modify that, so I found an algorithm online for computing a curve through points. After spending a day fiddling with numbers, working out where I went wrong, and debugging, I had a nice curve. Unless it's too short. Or there are only two points.

Today I realise that the reason I didn't want to modify the point editing no longer apply. It would have been a whole lot easier to just create a curve editor and let the user specify the curves. And that means I don't have to use black magic of maths I don't really understand.

So having spend two days on this I have produced approximately zero useful code. Doh! Ah well.

Still need a decent algorithm for drawing thought bubbles.
luckykaa: (Car)
I've been writing an application. A web comic maker. The idea is that you can draw bozes, load images into them, move them around and save to a PNG. There are apparently tools that allow you to do this but they look expensive.

Essential features:
  • Draw panels.
  • Add pictures to panels
  • Draw speech bubbles
  • Add text to speech bubbles
  • Free!
It's actually a little morre sophisticated than that. Panels can be any polygon shape. There's a snap to grid option. Speech bubbles have slectable font and colour. I have code, but no UI to draw square, anger and thought bubbles. They don't look great though. There is some nice auto-sizing going on with importing images and resizing panels though.

Things to do:
  • Improve the way speech bubbles work. They're rubbish at the moment. Specifically - it should be possible to chain several of them. Also I want to have more options when it comes to shapes.
  • Comic title
  • Captions
  • Undo buffer
  • Drop shadows
  • Control over lines
  • Ability to add and remove points
  • A size dialog. Actually this should be basic funtionality, but I don't want to worry about that when debugging.
My problem right now is what to do with it. It's in an alpha version right now. Somewhat buggy and lacks essential features. What can I do with a half finished application? I could create a web page but that involves the hassle of setting up a web page. Maybe I should put it on github or sourceforge or something.
luckykaa: (Video games)
I should really finish the game I was working on before I was unlucky enough to get a job.

Finishing is always a problem. There's a lot of tedious things to do that really don't interest me. I need some extra rules, and an end game screen, a start screen, a game over screen, 8 more levels, possibly a score mechanism, and better graphics.

The game itself is a simple sliding tile game. Essentially a clone of "Split personalities" on the C64, except I don't want to copy too much of it. The original game had bonus tiles where you could throw corresponding blocks together to get extra points, and bombs, which you have to get rid of or they'll end the level. I might take the bomb idea but do it differently (destroy neighbouring tiles). Still wondering if there are other special items I could add.

Really I want to start the next project. My starship management game. Not that I've really got much of an idea except the elevator pitch (Championship Manager for Star Trek fans), and the name generation (essentially this boils down to how to generate a non-repeating sequence of integers). I have no idea about basic plot, exactly how hands on the captain should be during battle, how serious to make it (I like the idea of reckless redshirt sacrifice). Still, that can come later.

First though I really ought to finish a game.
luckykaa: (Video games)
A game I've been intrigued by recently is PSI-5 trading company. I have these retro-gaming whims.

The basic premise is that you're captain of the trading ship. You need to get from point A to point B as quickly as possible, while avoiding or destroying raiders. You have 5 crew operating scanners, weapons, navigation, engineering and repairs, and the game involved telling them what to do. It's also really hard, but that's one of those retro gaming things. The game involves micromanaging 5 different stations and keeping track of who's saying what during intense situations.

Essentially it's like Artemis Bridge Simulator except you don't need friends.

The captaining simulation is a very underdeveloped game concept. Real Time Strategy is a lot of fun, but everything in that area seems to be battlefield. I just have a hankering for a game that involves sending disposable redshirts on suicide away missions, investigating anomalies, and fighting invading Glorkons. No idea how the game itself would work, but I think there's potential in there. Something semi-scripted with a set of missions, where your level of success determines how good your next ship is. I wanna be Captain Kirk! Or maybe Picard.
luckykaa: (Wolf)
So, am currently looking for a new contract. In the meantime I need to keep my skills up to date, and keep in the working frame of mind, so it's time to work on one of my stockpile of projects. Which shall I choose?
  • Playlist editor for Android - Have not found a decent one that works exactly how I want it to. They're all so clunky. I'm sure I could do better. It's a simple project.
  • Android game - Sliding block game. Slightly in development hell while I work out details of rules
  • Podcast receiver (Qt) - I actually have something that performs almost as I want. Would be good practice with Qt.
  • Comic editor (Qt) - possibly too big a project but this is something that doesn't seem to adequately exist.
Decisions decisions.

Wish I had a desk. A laptop isn't great for this.
luckykaa: (Video games)
I've written a game for Android!

Air Duel - (based on biplanes on the Amiga)

I can at least say I did it all myself, except the sounds.  This may be a bad thing since my artistic skills are abysmal. 

Downside is that the textures aren't working on several devices.  Anyone have and HTC desire I can borrow?
luckykaa: (Video games)
I've been writing a game for Android.  This is mainly so I can put Android Development on my CV, so I'll have to put it on Android Market at some point...

I think it's almost done.  The remaining issues:
It's a bit slooooow.  60ms per frame gives less than 20fps, and I want at least 30!  I can probably do some clever stuff where I just clear sections of screen that have been drawn. 
The actual game logic is plenty fast (2ms per tick) although I do seem to slow down to a 20th of the speed when debugging.
I have no idea how to do the control system. 
There's a glitch in my AI.  The plane is firing before it turns.  I have no idea why.  I have a fix explicitly for that but it doesn't work.  This sort of thing is really hard to debug since it relies on things being just so. 

Now, the control system is a headache.  This is based off an Amiga game where you pushed the stick left to rotate anti-clockwise and right to rotate clockwise.  Android of course has no stick.  It has an optical trackball, but people have huge problems understanding the control system.

So I have to work how to deal with that one.  I could add a tutorial screen.  I could add controls on the touch screen.  I could change the control method.  I think I need playtesters. 

On the whole though I'm reasonably happy with it.  Really would like to finish it off so I can stick it on the android market and start project #2.

What's project #2?  A sound board.  Because I should be able to do that in a couple of days. 
luckykaa: (Games)
So, having failed to get actual employment, I've been playing around with Android development.  This did involve learning Java.  Not exactly hard, although I keep finding little niggles with the language where I miss the control of C.

The current project is a conversion of the Amiga game - Biplanes. 

So far, I have:
  • Start screen
  • Game screen
  • Plane "physics",
  • Basic enemy AI,
  • Collision detection.
  • Obstacles
What I need to add
  • Explosions
  • Scoring
  • End game screen
  • Setup screens
  • Sound
  • Credits Screen
  • Multiplayer options.
  • Improved AI.
  • Improved collision detection
  • Lots of playtesting.
  • Debugging.
  • New control system.
  • Probably lots of other niggling details that will come up
Right now I'm playing with explosions.  I thought I'd have a go at converting the plane sprite into a series of dots and moving them separately.  I discovered that Android doesn't seem to allow me to apply textures to points.  I used a colour buffer array instead.  I discovered that Android also has a really bad implementation of the only method of directly copying an array of floats to a buffer.  I have to do a bitwise conversion to integer one one element at a time.  Very annoying.  And still not all that fast.

I've decided that probably isn't the best way of doing things.  Instead I'll just do a simple particle system.  This just involves reminding myself how OpenGL point sprites work.

I frequently find myself missing the elegance of C. I so need to learn to use JNI.  One thing at a time though.  How I envy those iPhone developers who can write in C without jumping through hoops. 
luckykaa: (geometry)
So, I'm trying to work out whether a projectile will hit a moving target.  That is, it its closest approach within the collision sphere of the target.

I have the position and velocity of the target and the position and velocity of the target.  The obvious way of doing this is work out the position w.r.t time, use pythagoras to work out the distance (or distance squared because it makes things easier), differentiate to work out the time of closest approach and then put t back into the previous formula to work out the distance. 

It works.  Probably.  But there has to be a nicer way.  It's not like I need to know the time this happens or the actual positions.  Just the distance.  Adding the extra variable just seems to be making things horribly complicated. 

So far what I have it that we can assume that the target is stationary at the origin, and subtract its position and velocity from our projectile, and work out closest approach to the origin.  Now, this will be when the origin is at a right angle to the modified vector.  I just can't work out how to establish how close this is.

Advice, mathematical geniuses of the interwebs?
luckykaa: (Robot)
Been whacked by a bug.   This is never fun. 
Whining about illness )

Have an interview with SCEE tomorrow.  I'm getting sick of all this games stuff.  Still, it's a contract and it's at a convenient location. 

Need to decide what to wear.  Suit or something that I feel comfortable in...  I think I'll go for smart casual.

So that's about it since last update.  Been ill.

Actually that's not everything...  Have the one player, zero collision version of android game written.  Yay!
Page generated Jul. 23rd, 2017 10:48 am
Powered by Dreamwidth Studios