Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    50
  • comments
    27
  • views
    46561

About this blog

Cool projects and programming insight!

Entries in this blog

 

Android/NDK experimentation

So, I've successfully ported my game framework to Android. It currently runs on Windows, Mac, Linux, and iOS. Android has been added to the list!

However...

It's been an interesting adventure working with NDK, which I need to compile all the C/C++ code into a .so shared library. Suppose I make a change in the C code. Here's the steps to actually see it take effect on the device:
Compile the library (from the command line, using ndk-build.
/cygdrive/c/android-ndk-r7/ndk-build

Copy the library into the project into the Eclipse project, if it isn't being built there already.
cp -r libs/* /cygdrive/c/Users/Matt/workspace/MyProject/libs

Eclipse project "Build Clean", click OK. For some reason, updating the .so files does not cause them to be transferred to the device.

Click "Debug". Wait about 8-20 seconds, depending on if the app is already running and needs to be terminated or not.


App is now running!

What if there's a crash in the library? You have to use the addr2line utility on the unstripped version of your library. [ Reference ]

/cygdrive/c/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-addr2line.exe -C -f -e obj/local/armeabi/libmylib.so
Type in the pc value specified in the stack trace.

It might be a good idea to set up your PATH in .bashrc.

Thoughts

This is incredibly tedious. That's about it, really. XCode 4.2 might be pretty sluggish these days, but at least the build process and simulator run at acceptable speeds, at least compared to Android.

I can really understand the popularity of the Corona engine now. Visual Studio still remains my preferred tool for main development work, and this experience has taught me to write games in such a way that the porting process is as quick and painless as possible.

Questions

Can anyone help me out with these?
Why does copying files into my workspace not cause them to be packed into the apk file without a clean build? I would think that Eclipse would notice that the .so files have been modified.
How do I move the compile+copy step into a build phase in Eclipse?

Having it print the output somewhere in Eclipse and fail if there's a compilation error is even more handy.


matt_j

matt_j

 

Update, shameless plug!

Just to remind everyone, be sure to check out my official iPhone and iPad remake of the classic Mac game, Spectre. It hasn't been doing very well in the App Store since it was released in May 2010 so be sure to check it out!




Official website | App Store Link | [twitter]spectre3d[/twitter] | Facebook
7 game modes - Multiplayer - Game Center - Incredible iPad support!





matt_j

matt_j

 

Update

Hello again!
So, does anyone even read these journals nowadays?

I haven't really posted anything since the new GDNet site rolled out. What's up with the front page? Why don't we have staff-written articles anymore? Where's the Journal Land posts? I always enjoyed reading those every Friday.

The front page is just a bunch of links to articles on other sites. Nobody even seems to comment on them anymore. The forums appear to be just as active as ever, but the front page just seems so lifeless and generic now.

Anyway, enough complaining about that.

Project updates

New game is in the works. It will be for iPad, Mac, and PC! It's still in early pre-production. I purchased a graphics tablet to help me make all the cool sprites that I'll need.

Trouble is, a lot of what I need to draw for this game is currently beyond my artistic abilities; there's a steep learning curve here.

As for Spectre, I'm slowly working on the desktop version of the game. There's a fair amount of polish left. It's really been struggling in the iOS App Store, so I am prioritizing it very conservatively compared to my other project. Check it out here

matt_j

matt_j

 

Spectre 1.2 released!

Spectre 1.2 has been released for the iPhone, iPad, and iPod Touch!

This is a massive patch adding a massive amount of new and long-awaited features!

iPad Support - A new HUD and weapon selection system - all on the game screen! The game host options and multiplayer join screen have also been revamped for the optimal iPad experience. Arcade Mode - The all-new single player mode that was designed for iOS. It's a fast-paced score attack with different power-ups, point multipliers, and chain-explosions! Your scores are sent to the Game Center leaderboard, so you can compete with friends! Retina Display Support - iPhone 4 and iPod Touch 4G users will enjoy crisp, bright Retina display-enhanced visuals! Game Center Enabled! - Over 25 achievements and 5 leaderboards have been added! New skyboxes! - There's even more skyboxes to add to the atmosphere. They're also HD-enabled for iPad and Retina Display users. Re - balanced gameplay. Spectre Classic and VR mode are easier now. Tons of bug fixes and adjustments.
Home Page | Available on the App Store!

iPhone screenshots below:















matt_j

matt_j

 

Game Center Matchmaking notes

Here's some thoughts I've been having over implementing Apple Game Center's matchmaking feature. I will clean up this post over time:

GC Matchmaking uses a 'Match' system, where players join together before the match starts. This is not unlike many 90s computer games, including Doom, and even Spectre.

GC Matchmaking uses a peer-to-peer system. My code does not, so one of the devices in the match must be the server. If the server leaves the game, then the rest of the players will leave the match as well, returning to the menu.

When GC matches up players, there is no distinction about which device should be the 'server'. This would have to be decided after they connect together.

If I still use the Host/Join buttons, where clicking "Host" sets a flag on that device that it wants to be the server, then there is still the possibility that two 'Hosts' will be matched together by the Game Center service. Only one will be the host, so a user may find that they wanted to host a CTF game, but are now playing Deathmatch (hosted by someone else)

Using 'player attributes' I might be able to write a quick hack identifying one player as the game host, but there is no guarantee this will work.


Reason I ** don't ** want to use it: There is no way to know how much latency is involved with any player that joins. GC Matchmaking may create a lot of games that have very high latency.

Reason I * do * want to use it: GC Matchmaking provides an easy way to invite friends into a game. If they're not in the same room, they'd have to contact each other out-of-game to specify who is hosting, or what server they should connect to.

GC provides an API function to show how many players are (from what I can tell so far) are waiting to play. Apple's documentation reads "A query allows your application to see how many players have recently searched for a match, across all player groups." In this case I can display a number showing how many players were interested in playing during some past time interval, but there is still no guarantee you will be playing with anyone at all if you decide to wait to join a match.

GC Matchmaking has a lot of advantages to many kinds of games, but I don't believe a client-server based action game to be one of them. I think it would be a significant amount of work to write a feature that will use the less-than-ideal matchmaker to connect users together over 3G and provide high latency that the users have no control over.

matt_j

matt_j

 

Moving!

I've got a new job, and I'm moving to Kelowna, BC, Canada!

The Spectre update is looking great so far and should hopefully be done within the next 1 to 1.5 months.

matt_j

matt_j

 

Another arcade mode video

Check out another video I recorded ">here.

Not the most action-packed, but shows some new power-ups and the flag mechanic. Picking up flags will give you a random power-up. Some last till the end of the round, like score multipliers, and others only last a few seconds.

matt_j

matt_j

 

Spectre update

A new single-player timed mode is coming. Chain explosions (for extra points) will be one of the fun new features. Combos, weird power-ups, even bot allies to help you gain as many points as possible!

">Video link

matt_j

matt_j

 

Spectre+OpenFeint

OpenFeint support is coming to Spectre for iPhone! Some optimizations will be necessary as I'm getting some low memory warnings and crashes.

Skybox loader
So, the skyboxes eat a fair amount of memory, I assume, and I have all 6 loaded into memory at startup. It's slow and they take a lot of memory when not being used. So, I sat down and wrote a background loader.

1. Decompresses PNG files into byte arrays in the background thread.
2. Run glGenTexture/glBindTexture/glTexImage2D in the main thread (it won't work otherwise).I do only 1 texture per frame to keep this from slowing down the UI too much


Achievements
The preliminary list of achievements has been written up:

Single Player

Level completions
Complete 10 levels 10
Complete 20 levels 20
Complete 40 levels 30
Complete 80 levels 40

Combo level completions - complete in a row
Complete 5 SP levels in a row 10
Complete 10 SP levels in a row 40
Complete 15 SP levels in a row 90
Complete 20 SP levels in a row 180

SP Robot destruction
Destroy 10 robots 5
Destroy 50 robots 10
Destroy 100 robots 20
Destroy 200 robots 30
Destroy 500 robots 40


Multiplayer

De-rez opponents without dying
6x 15
12x 25
18x 40
24x 60

Combos - de-rez opponents within 6 seconds of last de-rez

3x 5
4x 10
5x 15
6x 20
7x 25
8x 35
9x 50
10x 100

Total 925


Leaderboards
- 1 Spectre Classic
- 3 for each difficulty in Spectre VR

matt_j

matt_j

 

Update

Well, it's been a week, and Spectre is doing fine on the App Store.

">Here's a video review by AppSpy

It's been all 4 and 5-star reviews in the App Store, which is fantastic for a game at $4.99.

Update Featured in the Appolicious games of the week!

matt_j

matt_j

 

Untitled

Multiplayer tank action!

Now available for iPhone!

I know I'm a little late for the journal round-up, but I'll announce anyway!

I hope everyone enjoys it! This begins the start of my indie game development career!






matt_j

matt_j

 

Almost there...

Brilliant Bytes Software Inc. has just been incorporated!

The big game release should hopefully be next week! I'm just getting some pre-launch issues sorted out.

matt_j

matt_j

 

Excitement!

So I had to take VRTank off the App Store shortly after it was released... but for a very good reason! Big things are coming! Stay tuned!

matt_j

matt_j

 

iPhone networking woes.

I spent the last 3 days trying to figure out why there was serious packet latency issues. Because wifi and bluetooth share the same antenna, you cannot be sending data over both.

Here's what I've figured out:


You do not need to turn off Bluetooth in order to use wifi.
I have not verified if you need to do this if you have other bluetooth gadgets communicating with your device. I would assume yes, as they would be interfering with your wifi.
You should not create a GKSession if you won't be using Bluetooth, otherwise it seems to eat up Bluetooth resources, therefore causing problems even if it is not connected to another iPod/iPhone.

So this presents a dilemma when it comes time for the user to decide how to host or connect to another game! I will likely do something like this:

Hosting:

[ Local Game ]
Visible on bluetooth only. Doesn't advertise on the lobby or respond to LAN broadcasts.
[ WiFi/3G game ]
Visible on LAN and 3G (I don't have an iPhone to test this with yet).


Join game:

[ Local game ]
Starts a GKSession and picker, looking for servers.
[ Internet game ]
LAN broadcasts, lobby server, etc.


It's probably less user-friendly, but should have better performance overall.

The above 4 options are one more than my current UI is using, which includes a one-click host game button which starts a GKSession and uses sockets. Obviously I have to fix that now.

So, what's the disadvantage here? Mostly just having really diverse connection options, like Laptop (( wifi )) iPhone 1 (( Bluetooth )) iPhone 2

matt_j

matt_j

 

Untitled

Fixed a bug where players in this situation might start being carried up into the sky due to the bouncing effect when they land on something. Now they just stack nicely :)

Also, testing out new skyboxes. And CTF bots!

iPhone version is coming along well. The interface is 95% done, I'd say. Bluetooth support is going in this week, and I'll be cleaning up the network code a bit more.

matt_j

matt_j

 

HUD stuff

Lately I've been working on the iPhone HUD for the multiplayer modes. Since the screen is smaller it's hard to see other players, so I added handy little indicators to make them easier to see.


matt_j

matt_j

 

Multiplayer menu screens

Now almost completely functional! Here's the screens the user can interact with after selecting "Multiplayer" from the main menu:



This is essentially the iphone UI portfolio work I'm doing so I can apply for jobs.

Game-wise, almost all of these screens function properly except for the game filters. The user can now start, configure, and join games with this interface.

Today I added the bot management features that adds or removes bots to maintain a minimum number of players. Basically how I see it done in UT.

I still need to make an extra screen or two for in-game bot management. I don't even have that done on the desktop side yet, so, in due time.

matt_j

matt_j

 

Happy New Year!

Happy New Year to everyone!

Tonight wasn't too eventful, I mostly just coded, drank wine and watched TV. I worked on adding the game browser menu for the iPhone. Then I was able to connect to another game over wifi!

The interface and HUD for the multiplayer mode hasn't even been looked into yet on the iPhone, so it's still kinda messy.




matt_j

matt_j

 

Untitled

Chatted with a fellow named Moonbeam today. He was trying out the 0.3.5 demo. Here's a shot of the results of his painstaking harvesting of 4950 base XP himself in base wars mode! I joined the game just before it ended.



I guess it's time to start posting more updates here!

matt_j

matt_j

 

Update

Improved HUD


New curvier buttons:


A screenshot I took because I'm going to use it to decide how I want to finalize the HUD layout:

matt_j

matt_j

Sign in to follow this  
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!